Re: cleaning after apt-mirror
On Tue, 07 Oct 2014, Abdelkader Belahcene wrote: I am not satisfied by my script. I sorted the package in descending order and kept the first and deleted others. this seemed correct, It's not correct. You must sort on the basis of version number, which does not necessarily increase lexically. When there is no special character like + and extra b1, no problem, just with that name, which is I think , a temporary name. +b1 usually indicates a binary rebuild of a source package, and when we have them in the archive, you want them. please if anyone has a better script or idea, here are my script, I sort with python3, cause shell didn't do the task well ?? the second with awk/ The proper way to clean an archive is to remove package versions which are both: 1) Not present in the Packages file referenced by the Release file that you're using 2) Have a version number less than the version in the Packages file. #2 is optional, but will keep you from churning if your Packages file is slightly outdated. apt-mirror should really have a function to do this sort of cleaning for you; if it doesn't, please consider extending it to have one in collaboration with apt-mirror upstream. -- Don Armstrong http://www.donarmstrong.com It's brief and bright, dear children; bright and brief. Delight's the lightning; the long thunder's grief. -- John Frederick Nims Poetry in Motion p31 -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141007162719.gf6...@teltox.donarmstrong.com
Re: Re: cleaning after apt-mirror
thanks for reply, but the problem is 2) Have a version number less than the version in the Packages file. look at these packages: main/m/mutter/gir1.2-mutter-3.0_3.12.2-2_i386.deb main/m/mutter/gir1.2-mutter-3.0_3.12.2-2+b1_i386.deb the sort gives gir1.2-mutter-3.0_3.12.2-2_i386.deb more recent, but in fact gir1.2-mutter-3.0_3.12.2-2+b1_i386.deb is more recent regards
Re: cleaning after apt-mirror
On Tue, 07 Oct 2014, Abdelkader Belahcene wrote: but the problem is 2) Have a version number less than the version in the Packages file. look at these packages: main/m/mutter/gir1.2-mutter-3.0_3.12.2-2_i386.deb main/m/mutter/gir1.2-mutter-3.0_3.12.2-2+b1_i386.deb the sort gives gir1.2-mutter-3.0_3.12.2-2_i386.deb more recent, but in fact gir1.2-mutter-3.0_3.12.2-2+b1_i386.deb is more recent That's because sort sorts lexically, not by version numbers. See dpkg --compare-versions '3.12.2-2' '' '3.12.2-2+b1' \ echo Yes, -2+b1 is greater than -2. for example. -- Don Armstrong http://www.donarmstrong.com A people living under the perpetual menace of war and invasion is very easy to govern. It demands no social reforms. It does not haggle over expenditures on armaments and military equipment. It pays without discussion, it ruins itself, and that is an excellent thing for the syndicates of financiers and manufacturers for whom patriotic terrors are an abundant source of gain. -- Anatole France -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141007190327.gh23...@rzlab.ucr.edu