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

Bug#948892: apt does not store .deb files in /var/cache/apt/archives



On Tue, Jan 14, 2020 at 03:37:07PM +0100, Vincent Lefevre wrote:
> On 2020-01-14 15:10:18 +0100, Julian Andres Klode wrote:
> > On Tue, Jan 14, 2020 at 02:59:25PM +0100, Vincent Lefevre wrote:
> > > Package: apt
> > > Version: 1.8.4
> > > Severity: normal
> > > 
> > > I've installed some packages with "apt install ...", but the
> > > corresponding .deb files are missing from the /var/cache/apt/archives
> > > directory (contrary to packages installed via aptitude).
> > > 
> > > This is either a bug or an undocumented behavior (both in the
> > > man pages and in /usr/share/doc/apt-doc/guide.text.gz). I also
> > > cannot see the reason of such a behavior: .deb packages are
> > > useful if one needs to revert to the previous version of a
> > > package.
> > 
> > It's a feature since 1.2 (see debian/NEWS).
> 
> I see (that's rather old, and I missed that, probably at some time
> I was not using the apt command at all).
> 
> > If you installed the package, you don't need it anymore, and
> > it's not going to help you revert to an older version, because
> > it's the same version you just installed. Keeping it is
> > useless.
> 
> You miss the point that with the next upgrade of the package,
> it will no longer be the same version as the installed one.
> If for some reason the next version is broken (which happens
> from time to time), one may want to revert to the old version,
> and the only way is via the .deb file.

By the next version it will have been removed by autoclean, unless
you have tons of disk space and don't use it. This seems like a bad
assumption.

> > A more sensible approach for people who do want revert abilities,
> > would be to keep $N versions of each deb in the archive, where
> > $N might be 3.
> 
> Yes.

I think we should figure out if we want a different behavior
here. Probably $N versions and $maxdiskspace or something, and
then implement that, and give it a sensible option.

> 
> > > Perhaps that's the default option
> > > 
> > >   Binary::apt::APT::Keep-Downloaded-Packages "0";
> > > 
> > > below, but it is not documented.
> > 
> > I don't see why it needs documentation, apart from
> > the change in default being announced.
> 
> *All* configuration options need to be documented somewhere,
> and man pages, if not containing the full documentation, should
> at least give a reference to the full documentation. Announces
> are useful, but do not constitute documentation.

All options are documented/listed in the configure-index. But no,
they should not all be documented. Just because there are a ton
of knobs, does not mean they are all supported.

I think a lot are not knobs you should turn, they are temporary
workarounds to enable you to keep your system uptodate while
you adapt to the new behavior. This should go away and be moved
into compat levels.

FWIW, Binary::$foo is a scope that gets moved into the root scope
after option parsing, so it can set per-binary options. This
does not work sensibly, as if apt sets Binary::apt::bar, and
you set bar, the default in Binary::apt still overrides it
- I don't like it.

-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en


Reply to: