[Yum] Using hdlist and some questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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).

The biggest problem with focusing support on the hdlist is that the
mechanism of using the header is going away in a future version of yum.
Instead of using the headers to figure out which packages we'll need we
use the metadata from the header to figure out which packages to try to
test with then we only download the header when we've got a greater
likelihood of needing it - for the transaction set check. 

So reading from the hdlist is fine except:
1. it's a red hat-only-thing - which isn't bad, per-se, but I hate too
many distro-specific things. (I said too many)
2. the header stuff, in the sense you're speaking of it, is going away.
3. I've honestly never liked the hdlist mechanism b/c it seems like a
kinda kludgy way of collapsing the headers, added to it that they don't
contain all the information, so supporting this then implementing things
like 'changelog query' is quite hard b/c last time I checked the
changelogs just aren't there - nor are the complete file data, iirc.

> 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.

only for the packages in the core distro, not for secondary
repositories.

> 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)?

it does that to ease rsyncing of the hdrs on remote repositories.
look back in the archives, there was a fair bit of gnashing of teeth
about this in the past.


> 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.

two reads (header and rpm, then compare) and a write (header) or 1 read
(rpm) and a write (header).


> 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?

If you've not asked it to do something why do it?

> P.S. Great program.
Thanks,
 And thanks for the patches, I don't think I'll include them, though,
b/c I'm not sure it's a longterm benefit.

Does that make sense?

-sv





[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux