From fb5bfe537434012fd1706ef9f16d2de267e4c521 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Feb 16 2016 10:11:49 +0000 Subject: import createrepo-0.9.9-25.el7_2 --- diff --git a/SOURCES/BZ-1178763-duplicates.patch b/SOURCES/BZ-1178763-duplicates.patch new file mode 100644 index 0000000..c285612 --- /dev/null +++ b/SOURCES/BZ-1178763-duplicates.patch @@ -0,0 +1,38 @@ +diff -up createrepo-0.9.9/createrepo/merge.py.old createrepo-0.9.9/createrepo/merge.py +--- createrepo-0.9.9/createrepo/merge.py.old 2015-12-08 11:08:51.998837759 +0100 ++++ createrepo-0.9.9/createrepo/merge.py 2015-12-08 11:09:58.868951847 +0100 +@@ -70,9 +70,7 @@ class RepoMergeBase: + + for repo in repos: + for pkg in repo.sack: +- others = self.yumbase.pkgSack.searchNevra(name=pkg.name, arch=pkg.arch) +- # NOTE the above is definitely going to catch other versions which may +- # be an invalid comparison ++ others = self.yumbase.pkgSack.searchNevra(pkg.name, pkg.epoch, pkg.version, pkg.release, pkg.arch) + if len(others) > 1: + for thatpkg in others: + if pkg.repoid == thatpkg.repoid: continue +commit b8904f59773a478aedd416963ec451c678a6bb72 +Author: Zdenek Pavlas +Date: Wed Jan 29 09:53:37 2014 +0100 + + Support API users that set pkglist=. BZ 1058975 + + Commit 84a237f6a2e661879147e1ee5f9a2be984267991 + broke this use case. Make it work again. + +diff --git a/createrepo/__init__.py b/createrepo/__init__.py +index b1875f6..85f2a3d 100644 +--- a/createrepo/__init__.py ++++ b/createrepo/__init__.py +@@ -400,7 +400,9 @@ class MetaDataGenerator: + if self.conf.update: + self._setup_old_metadata_lookup() + # rpms we're going to be dealing with +- if self.conf.pkglist: ++ if isinstance(self.conf.pkglist, MetaSack): ++ packages = self.conf.pkglist ++ elif self.conf.pkglist: + packages = [] + for pkg in self.conf.pkglist: + if '://' in pkg: # remote diff --git a/SOURCES/BZ-1256216-cifs-share-oserror.patch b/SOURCES/BZ-1256216-cifs-share-oserror.patch new file mode 100644 index 0000000..f483fb1 --- /dev/null +++ b/SOURCES/BZ-1256216-cifs-share-oserror.patch @@ -0,0 +1,10 @@ +--- a/createrepo/__init__.py 2015-08-24 14:58:31.510985403 +0900 ++++ b/createrepo/__init__.py 2015-08-24 14:58:52.842172340 +0900 +@@ -230,6 +230,7 @@ class MetaDataGenerator: + except (OSError, IOError), e: + raise MDError, _("Could not create exclusive lock in %s and sqlite database generation enabled. Is this path on nfs? Is your lockd running?") % direc + else: ++ f.close() + os.unlink(direc + '/locktest') + + if self.conf.deltas: diff --git a/SPECS/createrepo.spec b/SPECS/createrepo.spec index eabe2cc..2ba4bd9 100644 --- a/SPECS/createrepo.spec +++ b/SPECS/createrepo.spec @@ -15,13 +15,15 @@ BuildRequires: bash-completion Summary: Creates a common metadata repository Name: createrepo Version: 0.9.9 -Release: 23%{?dist} +Release: 25%{?dist} License: GPLv2 Group: System Environment/Base Source: %{name}-%{version}.tar.gz Patch0: createrepo-head.patch Patch1: ten-changelog-limit.patch Patch2: BZ-1022028-wrong-package-count.patch +Patch3: BZ-1256216-cifs-share-oserror.patch +Patch4: BZ-1178763-duplicates.patch URL: http://createrepo.baseurl.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArchitectures: noarch @@ -38,6 +40,9 @@ packages. %patch0 -p1 %patch1 -p0 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 + %build @@ -61,6 +66,16 @@ rm -rf $RPM_BUILD_ROOT %{python_sitelib}/createrepo %changelog +* Wed Dec 10 2015 Valentina Mukhamedzhanova - 0.9.9-25 +- mergerepo: fix getattr() crash. +- Related: bug#1178763 + +* Tue Dec 08 2015 Valentina Mukhamedzhanova - 0.9.9-24 +- mergerepo: merge package versions from multiple repos. +- Related: bug#1178763 +- Close lock file before unlink(). +- Related: bug#1256216 + * Thu Jan 16 2014 Valentina Mukhamedzhanova - 0.9.9-23 - Make sure the "packages" attribute is always correct. - Resolves: bug#1022028