Re: dpkg --compare-versions
On Wed, Jun 02, 1999 at 02:49:58AM -0500, Michael Merten wrote:
> 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.
>
> Thanks,
> Mike
>
Ok, my mistake... I attempted to RTFM before doing this, but it seems the
FM isn't quite up-to-date on this subject. ;) I took a look at the
/usr/lib/dpkg/methods/apt/install script and it does correctly call
apg-get autoclean now (dangit... I distinctly remember looking at it last
year and it seeing apt-get clean in there. ;/ )
Ah well, live 'n learn.
Thanks,
Mike
--
Michael Merten ironfoot@popaccount.com NRA Life Member
---------------------------------------------------------------------
"The price of freedom is eternal vigilance" --Thomas Jefferson
[The Federalist (www.Federalist.com)]
Reply to: