[Yum-devel] Flexible file globs for createrepo and yum.
Phil Knirsch
pknirsch at redhat.com
Thu Sep 8 14:45:48 UTC 2005
Hi folks.
I've proposed a while ago a small change to creatrepo and yum in order
to allow flexible handling of file globs in both tools. The reasoning is
that (as i think Eric Troan pointed out somewhere a while ago) the
current regex file globs tend to detect 98% files that are never
required anywhere but still put into the primary.xml.
The idea now was extend the repomod.xml spec to accomodate file and
directory globs for each repo.
Those globs can be set via createrepo using 2 new options. I've also
implemented a 3rd option which does autoglobbing which adds a pass
before actually writing out the data where it scans every rpm for
filerequirements and stores them individually in the file and dir globs.
Using autoglobbing i get down to approx 200-300 <file> entries in
primary.xml, down from over 8000 in FC3. The space saving is naturally
also quite good.
I've attached 2 patches, one for createrepo-0.4.3 that actually adds
those options to it and correctly writes the data.
The 2nd patch is for yum where the new data from repomod is read if
available. The fallback is of course the default behaviour and fileglobs
from the previous version, so these patches allow a nice backward
compatibility.
Please take a look at them and give feedback/comments and if you think
it's a good idea it would be great if it gets included into createrepo
and yum.
Thanks,
Read ya, Phil
PS: The nice sideeffect of autoglobbing btw. is that the filelist is
never needed for a single repo. Of course this won't help for
interdependancies between repos where a file is required from a
different repo but not in that repo itself. But i haven't had such a
case yet with FC4 and Extras as all filerequires of Extras were already
covered in FC4 itself. YMMV though ;)
--
Philipp Knirsch | Tel.: +49-711-96437-470
Development | Fax.: +49-711-96437-111
Red Hat GmbH | Email: Phil Knirsch <phil at redhat.de>
Hauptstaetterstr. 58 | Web: http://www.redhat.de/
D-70178 Stuttgart
Motd: You're only jealous cos the little penguins are talking to me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: createrepo-0.4.3-glob.patch
Type: text/x-patch
Size: 6242 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20050908/b98086e4/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-2.4.0-glob.patch
Type: text/x-patch
Size: 5274 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20050908/b98086e4/attachment-0001.bin
More information about the Yum-devel
mailing list