[Rpm-metadata] createrepo 0.4.11
Florian La Roche
laroche at redhat.com
Wed Nov 28 13:25:20 UTC 2007
On Tue, Nov 27, 2007 at 01:48:36AM -0500, seth vidal wrote:
> I released createrepo 0.4.11 - it adds a new feature and fixes a couple
> of bugs:
>
> new feature: -i or --pkglist - this takes a filename which is the list
> of packages (full relative path to the dir where you're making the repo)
> that you want to use from that dir. Sort of the inverse of exclude and
> takes a file list
>
> bugs:
> - make the checksum cache tag more precise - helps stop the problem of
> people signing pkgs after having made repodata, then re-running
> createrepo and not getting updated checksums
> - make sure that createrepo follows dirs which are symlinks
>
> you can get the new release here:
>
> http://linux.duke.edu/createrepo/download/createrepo-0.4.11.tar.gz
>
> let me know what breaks,
> -sv
Hello Seth,
below is a patch to sort the output, otherwise createrepo
depends on the order of the local filesystem and how rpms
are stored there.
Also createrepo is not listed as project on http://linux.duke.edu/
until now.
regards,
Florian La Roche
--- dumpMetadata.py
+++ dumpMetadata.py
@@ -377,7 +377,9 @@
except TypeError:
del u # move on to the next method
else:
- return u.keys()
+ ret = u.keys()
+ ret.sort()
+ return ret
# We can't hash all the elements. Second fastest is to sort,
# which brings the equal elements together; then duplicates are
@@ -472,7 +474,7 @@
for glob in self.filerc:
if glob.match(item):
returns[item] = 1
- return returns
+ return returns.keys()
def usefulGhosts(self):
"""search for useful ghost file names"""
@@ -483,7 +485,7 @@
for glob in self.filerc:
if glob.match(item):
returns[item] = 1
- return returns
+ return returns.keys()
def usefulDirs(self):
@@ -668,16 +670,22 @@
if prereq == 1:
entry.newProp('pre', str(prereq))
- for file in rpmObj.usefulFiles():
+ ff = rpmObj.usefulFiles()
+ ff.sort()
+ for file in ff:
files = format.newChild(None, 'file', None)
file = utf8String(file)
files.addContent(file)
- for directory in rpmObj.usefulDirs():
+ ff = rpmObj.usefulDirs()
+ ff.sort()
+ for directory in ff:
files = format.newChild(None, 'file', None)
directory = utf8String(directory)
files.addContent(directory)
files.newProp('type', 'dir')
- for directory in rpmObj.usefulGhosts():
+ ff = rpmObj.usefulGhosts()
+ ff.sort()
+ for directory in ff:
files = format.newChild(None, 'file', None)
directory = utf8String(directory)
files.addContent(directory)
More information about the Rpm-metadata
mailing list