Re: 2 commits - createrepo/__init__.py createrepo/utils.py genpkgmetadata.py mergerepo.py modifyrepo.py
Anders F Björklund <[email protected]> Fri, 16 Sep 2011 22:02:10 +0200
| Newsgroups | gmane.linux.rpm.metadata |
|---|---|
| Message-ID | <[email protected]> |
seth vidal wrote: >>> That 'stable' series you added things to is not really in use anymore. >>> It's labeled as the maintenance branch since it is in maintenance mode >>> only. No new features will be added there. >>> >>> If you're going to fork it like that I'd appreciate it if you made a >>> different name for it. It's confusing to users. >> >> It was more of backports, but whatever. Adding changelog_limit >> and that collapse_glibc_requires flag that was fooling smart, >> in addition to the sha256 checksums and the lzma compression. >> Plus the compatibility patches required to make it run at all. >> >> There's nothing incompatible about the generated "repodata", >> except for those extra tags (primary_lzma and rpm:distepoch) ? >> >> Still seemed better than doing a separate rpm metadata format... >> > > I wasn't asking you to change the format. > > Just change the program name. > > I think calling it createrepo is just going to cause confusion. Is that really needed ? Like: the openSUSE program has the same name, even if it adds a few new tags for the weak dependencies (enhances/suggests) - and the rest are just backports of features already existing. The only remaining patch is the fixed epoch/distepoch parsing ? Without it, the distepoch (:2011) is included in the release... Hardly seems worth to rename the program, for such a bugfix. What is the confusion ? --anders _______________________________________________ Rpm-metadata mailing list [email protected] http://lists.baseurl.org/mailman/listinfo/rpm-metadata
createrepo-0.4.11-distepoch.patch
(application/octet-stream, 809 B)
--- createrepo-0.4.11.orig/dumpMetadata.py 2007-11-26 21:23:16.000000000 +0100
+++ createrepo-0.4.11/dumpMetadata.py 2011-08-18 23:49:33.000000000 +0200
@@ -344,12 +344,19 @@
def _stringToVersion(self, strng):
- i = strng.find(':')
- if i != -1 and strng[:i].isdigit():
- epoch = strng[:i]
+ m = re.match('^([0-9]+):', strng)
+ if m:
+ i = m.end(1)
+ epoch = m.group(1)
else:
i = -1
epoch = self.noepoch
+ m = re.search(':([^:-]+)$', strng[i + 1:])
+ if m:
+ distepoch = m.group(1)
+ strng = strng[:i + 1 + m.start()]
+ else:
+ distepoch = None
j = strng.rfind('-')
if j != -1:
if strng[i + 1:j] == '':
yum-3.2.29-distepoch-parse.patch
(application/octet-stream, 1.1 KB)
--- yum-3.2.29/rpmUtils/miscutils.py.orig 2010-06-15 20:51:38.000000000 +0200
+++ yum-3.2.29/rpmUtils/miscutils.py 2011-04-09 11:30:09.000000000 +0200
@@ -22,6 +22,7 @@ import os
import sys
import locale
import signal
+import re
import rpmUtils.transaction
@@ -387,15 +388,19 @@ def flagToString(flags):
def stringToVersion(verstring):
if verstring in [None, '']:
return (None, None, None)
- i = verstring.find(':')
- if i != -1:
- try:
- epoch = str(long(verstring[:i]))
- except ValueError:
- # look, garbage in the epoch field, how fun, kill it
- epoch = '0' # this is our fallback, deal
+ m = re.match('^([0-9]+):', verstring)
+ if m:
+ i = m.end(1)
+ epoch = m.group(1)
else:
+ i = -1
epoch = '0'
+ m = re.search(':([^:-]+)$', verstring[i + 1:])
+ if m:
+ distepoch = m.group(1)
+ verstring = verstring[:i + 1 + m.start()]
+ else:
+ distepoch = None
j = verstring.find('-')
if j != -1:
if verstring[i + 1:j] == '':