diff --git a/createrepo-head.patch b/createrepo-head.patch index 6827238..c5c69a4 100644 --- a/createrepo-head.patch +++ b/createrepo-head.patch @@ -996,7 +996,7 @@ index 27d3690..54863cb 100644 + print po.xml_dump_other_metadata() + diff --git a/createrepo/utils.py b/createrepo/utils.py -index 995c3b9..84a43ba 100644 +index 995c3b9..d66b115 100644 --- a/createrepo/utils.py +++ b/createrepo/utils.py @@ -23,6 +23,12 @@ import bz2 @@ -1109,7 +1109,22 @@ index 995c3b9..84a43ba 100644 def returnFD(filename): try: fdno = os.open(filename, os.O_RDONLY) -@@ -133,6 +192,22 @@ def split_list_into_equal_chunks(seq, num_chunks): +@@ -124,15 +183,36 @@ def encodefiletypelist(filetypelist): + return result + + def split_list_into_equal_chunks(seq, num_chunks): ++ if num_chunks <= 1: ++ return [seq[:]] + avg = len(seq) / float(num_chunks) + out = [] + last = 0.0 +- while last < len(seq): ++ # Due to floating point math, we do one less than the number of chunks ++ # and then the rest. Eg. range(1,6), 9 ++ while len(out) < (num_chunks - 1): + out.append(seq[int(last):int(last + avg)]) + last += avg ++ out.append(seq[int(last):]) return out @@ -1164,7 +1179,7 @@ index e3c4c3b..4734392 100644 .SH "EXAMPLES" Here is an example of a repository with a groups file. Note that the diff --git a/genpkgmetadata.py b/genpkgmetadata.py -index 8c98191..ce8e452 100755 +index 8c98191..9bf8c8d 100755 --- a/genpkgmetadata.py +++ b/genpkgmetadata.py @@ -100,6 +100,8 @@ def parse_args(args, conf): @@ -1193,7 +1208,17 @@ index 8c98191..ce8e452 100755 (opts, argsleft) = parser.parse_args(args) if len(argsleft) > 1 and not opts.split: -@@ -155,6 +162,11 @@ def parse_args(args, conf): +@@ -138,6 +145,9 @@ def parse_args(args, conf): + else: + directories = argsleft + ++ if opts.workers >= 128: ++ errorprint(_('Warning: More than 128 workers is a lot. Limiting.')) ++ opts.workers = 128 + if opts.sumtype == 'sha1': + errorprint(_('Warning: It is more compatible to use sha instead of sha1')) + +@@ -155,6 +165,11 @@ def parse_args(args, conf): if opts.nodatabase: opts.database = False @@ -1205,7 +1230,7 @@ index 8c98191..ce8e452 100755 # let's switch over to using the conf object - put all the opts into it for opt in parser.option_list: -@@ -240,6 +252,7 @@ def main(args): +@@ -240,6 +255,7 @@ def main(args): if mdgen.checkTimeStamps(): if mdgen.conf.verbose: print _('repo is up to date') diff --git a/createrepo.spec b/createrepo.spec index 8cdf05a..2a7e7e3 100644 --- a/createrepo.spec +++ b/createrepo.spec @@ -3,7 +3,7 @@ Summary: Creates a common metadata repository Name: createrepo Version: 0.9.9 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2 Group: System Environment/Base Source: %{name}-%{version}.tar.gz @@ -47,6 +47,10 @@ rm -rf $RPM_BUILD_ROOT %{python_sitelib}/createrepo %changelog +* Thu Feb 16 2012 James Antill - 0.9.9-11 +- update to latest head +- fix for lots of workers and not many rpms. + * Thu Jan 5 2012 Seth Vidal - 0.9.9-10 - update to latest head - fix for generating repos for rhel5 on fedora