[Yum] Using hdlist and some questions

Josko Plazonic plazonic at Math.Princeton.EDU
Fri Oct 31 18:09:49 UTC 2003


Hello,

I've been looking into implementing some additional features into yum 
but wasn't sure how to do it and/or what are the reasons behind some yum 
defaults.  So, here it goes:

I'd like to teach yum to understand hdlist* files.  There are two times 
where this would be useful.  First one is if you are building list of 
headers with yum-arch for a full (installable) copy of a distribution.  
Why bother going through every rpm when all of their headers are already 
in hdlist files.  I ask because I maintain local copy of RH distro whose 
one of features is to incorporate updates into original distro so that 
upon install there is no further need to run any updates.  That process 
can take a while and in my scripts that do that I try to minimize how 
much rpms are touched by using hdlist wherever I can (e.g., when merging 
in updated or new rpms, don't scan the original RedHat/RPMS dir, load up 
hdlist).

Second, much more useful time is during initial download of headers.  
More recent RH distro's install comps rpm which carries with itself 
appropriate hdlist files and they are supposed to contain headers of all 
the rpms.  This would eliminate the need to download all headers for non 
installed pkgs on the first run.

I include an initial attempt to implement the second goal.  Rather crude 
(e.g. more error checking could be implemented) but seems to work.  I 
added a parameter called core for repositories so that one can indicate 
to yum that a particular repository is the one (or just like it) used to 
install the machine.  Only for those will the hdlist be used.

Now the questions.  First of all, why is yum-arch setting header file 
times equal to the ones of the rpm?  Any particular reason (as I can't 
really do that if dumping data from hdlist)?

Second, I dislike that yum-arch recreates the header list every time it 
is run.  I believe it should try to detect what changed and update only 
what's necessary.  Ok, I know - this is minor but it just bugs me 
slightly :).  Then again, in cases where you are updating an already 
existing headers dir, it would make it much faster.

Finally, it seems that yum is not removing cached headers for packages 
that have been installed until one runs yum clean.  Any particular 
reason for that?

Thanks,

Josko P.

P.S. Great program.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: yum-2.0.4-hdlist.patch
Url: http://lists.baseurl.org/pipermail/yum/attachments/20031031/1a47e0a9/attachment-0001.diff 


More information about the Yum mailing list