[Rpm-metadata] createrepo patch to optionally use /usr/bin/file to detect rpms
Jay Soffian
jay-yum at soffian.org
Tue Sep 12 19:01:51 UTC 2006
On Sep 11, 2006, at 8:30 AM, Florian La Roche wrote:
> Maybe adding an option to read the filelist from a new file or
> stdin would also be a good idea? Then you can script whatever you
> want to outside of createrepo.
Okay, please see the attached patch. I've implemented Florian's
suggestion. I've also cleaned up the usage statement a bit and
switched the shebang line to #!/usr/bin/env python. We might want to
change createrepo from
exec /usr/share/createrepo/genpkgmetadata.py "$@"
to
exec /usr/bin/python usr/share/createrepo/genpkgmetadata.py "$@"
So that the new version doesn't suddenly change which python gets
picked up for some folks.
I've attached my patch, an updated man page, and the script I used to
test for regressions.
Here's the part of the usage statement which describes the new behavior:
> The createrepo command creates a repomd (xml-based metadata)
> repository from a
> set of packages. It creates/updates a directory named "repodata"
> containing a
> set of XML files.
>
> If <pkgdir> is "-", then the list of packages is taken from stdin, one
> filename per line. Each filename must be an absolute path under the
> current-working-directory or --basedir or a relative path under the
> current-working-directory or --basedir. In this mode, repodata is
> created
> under the CWD or --basedir unless overridden with -o.
>
> If <pkgdir> is not "-", then it is taken as the name of a directory
> (absolute
> or relative to CWD or relative to --basedir) that createrepo should
> recurse
> over, looking for files with an extension of '.rpm' (case
> insensitive). In
> this mode, repodata is created under <pkgdir> or --basedir unless
> overridden
> with "-o"
I wasn't 100% clear on --split's behavior so I didn't add this new
functionality in combination with that option.
Thanks,
j.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: genpkgmetadata.patch
Type: application/octet-stream
Size: 7107 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/rpm-metadata/attachments/20060912/cbdf7d2c/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.sh
Type: application/octet-stream
Size: 1213 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/rpm-metadata/attachments/20060912/cbdf7d2c/attachment-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: createrepo.8.patch
Type: application/octet-stream
Size: 1174 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/rpm-metadata/attachments/20060912/cbdf7d2c/attachment-0002.obj
More information about the Rpm-metadata
mailing list