diff --git a/SOURCES/BZ-1022028-wrong-package-count.patch b/SOURCES/BZ-1022028-wrong-package-count.patch new file mode 100644 index 0000000..3b245e1 --- /dev/null +++ b/SOURCES/BZ-1022028-wrong-package-count.patch @@ -0,0 +1,58 @@ +diff --git a/createrepo/__init__.py b/createrepo/__init__.py +index dfdc8ab..452a3ac 100644 +--- a/createrepo/__init__.py ++++ b/createrepo/__init__.py +@@ -399,7 +399,17 @@ class MetaDataGenerator: + self._setup_old_metadata_lookup() + # rpms we're going to be dealing with + if self.conf.pkglist: +- packages = self.conf.pkglist ++ packages = [] ++ for pkg in self.conf.pkglist: ++ if '://' in pkg: # remote ++ packages.append(pkg) ++ continue ++ path = os.path.join(self.conf.basedir, self.conf.directory, pkg) ++ if os.access(path, os.R_OK): ++ packages.append(pkg) ++ continue ++ # not fatal, yet ++ self.callback.errorlog('Cannot read file: %s' % path) + else: + packages = self.getFileList(self.package_dir, '.rpm') + +@@ -670,6 +680,8 @@ class MetaDataGenerator: + return # EOF, EOF + if stream is job.stdout: + if line.startswith('*** '): ++ if line == '*** \n': ++ return True + # get data, save to local files + for out, size in zip(files, line[4:].split()): + out.write(stream.read(int(size))) +@@ -678,12 +690,14 @@ class MetaDataGenerator: + else: + self.callback.errorlog('Worker %s: %s' % (num, line.rstrip())) + ++ err = 0 + for i, pkg in enumerate(pkgfiles): + # insert cached packages + save_keptpkgs(pkg) + + # save output to local files +- log_messages(i % self.conf.workers) ++ if log_messages(i % self.conf.workers): ++ err += 1 + + for (num, job) in worker_jobs.items(): + # process remaining messages on stderr +@@ -697,6 +711,9 @@ class MetaDataGenerator: + if not self.conf.quiet: + self.callback.log("Workers Finished") + ++ if err: ++ raise MDError, "Failed to process %d package(s)." % err ++ + for pkgfile in pkgfiles: + if self.conf.deltas: + try: diff --git a/SPECS/createrepo.spec b/SPECS/createrepo.spec index 931328e..eabe2cc 100644 --- a/SPECS/createrepo.spec +++ b/SPECS/createrepo.spec @@ -15,12 +15,13 @@ BuildRequires: bash-completion Summary: Creates a common metadata repository Name: createrepo Version: 0.9.9 -Release: 21%{?dist} +Release: 23%{?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 URL: http://createrepo.baseurl.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArchitectures: noarch @@ -36,6 +37,7 @@ packages. %setup -q %patch0 -p1 %patch1 -p0 +%patch2 -p1 %build @@ -59,6 +61,13 @@ rm -rf $RPM_BUILD_ROOT %{python_sitelib}/createrepo %changelog +* Thu Jan 16 2014 Valentina Mukhamedzhanova - 0.9.9-23 +- Make sure the "packages" attribute is always correct. +- Resolves: bug#1022028 + +* Fri Dec 27 2013 Daniel Mach - 0.9.9-22 +- Mass rebuild 2013-12-27 + * Wed Apr 17 2013 Zdenek Pavlas - 0.9.9-21 - update to latest HEAD - don't BuildRequire bash-completion in rhel