Bug#37963: apt: unneccessary prompts
On Wed, May 19, 1999 at 01:24:28PM +0100, Adrian Bridgett wrote:
> > > Do you want to erase the downloaded .deb files (Y/n)
> > >
> > > Um - _what_ downloaded files!
> >
> > The 1748kbs of files you previously downloaded, which are sitting in
> > apt's cache.
>
> Oh - I presumed that it was talking about the files it was installing -
> which are normally all on the local filesystem:
>
> /etc/apt/sources.list:
> deb file:/ilc/debian unstable main contrib non-free
> deb file:/ilc/debian-non-US unstable non-US
> deb file:/ilc/debian-ilc unstable ilc
> deb http://www.debian.org/~jules/gnome-stage-2 unstable main
Uhm, I was not considering "file:" uris. Maybe you want to add the
following to your /etc/apt/apt.conf:
===
DSelect
{
Clean "auto"; // or "always"
}
===
However, it isn't a bad idea to try and run apt-get clean only if
something to clean is there.
So, it might be worth adding something like:
===
CACHEDIR=/var/apt/cache/archives
RES=`apt-config shell A Dir::Cache B Dir::Cache::archives`
eval $RES
CACHEDIR=${A}${B}
if [ `ls $CACHEDIR|grep -v "^lock$"|grep -v "^partial$"|wc -l` \
-eq 0 -a `ls ${CACHEDIR}partial|wc -l` -eq 0 ]; then
.....
fi
===
in /usr/lib/dpkg/methods/apt/install; that would trigger cleanup only if
any files exist in the cache.
Ciao, William
Reply to: