Description of problem: Cache grows very big because of old packages remaining, especially on cauldron. Suggestion: have it delete old packages automatically (I suggest to as default, make it possible to switch off in config file) Luca Olivetti gave a good example code here that i now use manually now and then (after having cross linked the .noarch packages, Bug 14587.) https://ml.mageia.org/l/arc/discuss/2014-11/msg00035.html If for some reason some client want an old file version then urpmi-proxy will download it again provided it is still on the mirror it use of course. Reproducible: Steps to Reproduce:
i've thought about cleaning same versions of the same package in the same directories... but i thought it might be better to have a cron script for this to run nightly... patches are accepted :-)
Yes i think about setting a cron job to both cross link .noarch files, and then run that cleaning script. However i think it must first check so urpmi-proxy is not downloading during that process. Is there some way (for a cron job) to tell urpmi-proxy to stop after any ongoing download, and check when it has stopped, so the maintenance script then can run, and then restart urpmi-proxy? BTW that script I linked to do not clean the media_info directories. My solution for now is to empty those directories every cleaning pass. Usually the sysop (me) updates all systems same day, then do not update for a week, and often that files are old by then.
wouldn't stopping apache do the trick? but is it needed to check if urpmi-proxy is downloading or not? if they are checked for identical size or checksum, then they are downloaded already and will not change, so you would be free to cross link them.
Well yes apache could be shut down but may be used for other things. (Here it serves OwnCloud) Anyhow the clean way would be to tell urpmi-proxy to stop *w hen any ongoing file download+save is completed * and when it is stopped run the cleaning scripts. If we force-stop it while downloading it will probably end up the same as the zero size or otherwise truncated files; never getting repaired ? (unless that problem get fixed)
urpmi-proxy is started from apache, i'd have to change an apache config or similar... if you stop apache, it will by default wait until the threads are completed, iinm, and not force-stop. but, is that actually needed? if the files are equal in size or a checksum is the same, than they can be cross linked without problem and without stopping apache or urpmi-proxy.
CC: (none) => cooker
I guess you are right it need not be stopped. I am probably too cautious, as i believe I dont really know what (if anything) can go wrong.
With a little help from mailing list i have now put instructions and two scripts at https://wiki.mageia.org/en/Urpmi-proxy#Rinsing_the_cache I have been using them a while and they seem to work great.
CC: (none) => mageiatools, marja11