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

Re: dpkg --compare-versions

On Tue, Jun 01, 1999 at 07:16:33PM -0600, Jason Gunthorpe wrote:
> On Tue, 1 Jun 1999, Michael Merten wrote:
> > I set up the /etc/apt/apt.conf file to turn off the autoclean feature
> > when using dselect, and as a result, my /var/cache/apt/archives
> > directory is growing quite large.  I decided to write a script that 
> > uses "dpkg --compare-versions" automatically clean out the older
> > versions of package files.  Here's the script I came up with...
> > it doesn't actually delete anything yet...
> You do realize that this is exactly what the apt-get autoclean feature
> does?
> The trouble you are having is that APT renames files to their proper full
> name including arch and epochs by escaping special characters with a %,
> when it goes to re-read the directory it can reassemble the correct
> versions of everything.
> Autoclean removes any version that is no longer present in the archive
> which is one step further than what you are doing here.
> Jason

I was under the impression (from reading "man apt.conf") that the auto
option wasn't working, at this time...  I'll go back and have a look
at it.  


Michael Merten        ironfoot@popaccount.com         NRA Life Member
"Guard with jealous attention the public liberty. Suspect everyone
who approaches that jewel." -- Patric Henry -- Virginia's U.S.
Constitution ratification convention
[NRA-ILA (www.nraila.org)]

Reply to: