[Yum] Cleaning up repositories

Troy Dawson dawson at fnal.gov
Fri Feb 28 16:42:45 UTC 2003

Hi Seth,
This is a problem I doubt many people run into, but here at Fermilab we did, 
and we believe the fix is simple.  If the fix ends up not being as simple as 
we thought, then we'll work around it.

The problem:
If you have a repository, and you remove all the rpm's out of it, then do a 
yum-arch on the repository, it doesn't do anything, so you are left with the 
old header.info and header files.
If a person then yum's against that repository, they get the info that those 
rpm's are still there, but of course when yum tries to download the rpm's it 

The solution:
when yum-arch get's run, and it finds that there isn't any rpm's where it is 
told, have it check to see if there is a header directory with headers in it. 
  If there is, then clean it up, preferably leaving an empty header.info file 

How we came to find this.  We have mini workgroup repositories, that the 
owners of workgroups can add and remove rpm's for their workgroup.  This is 
done via cvs, and on our servers we update our area's every 15 minutes.  If 
there isn't a change, we don't do anything.  But if one of the workgroup 
area's change, we naturally rebuild the repository.  But sometimes the 
workgroup maintainer wants to remove everything out of their rpm's area.  We 
ended up changing our script so that it does this check, so this isn't 
critical, but I think it would be nice if yum-arch did this check.

Troy Dawson  dawson at fnal.gov  (630)840-6468
Fermilab  ComputingDivision/OSS  CSI Group

More information about the Yum mailing list