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

Re: apt-get autoclean configuration



On Wed 19 Jul 2017 at 16:21:57 (+0200), tomas@tuxteam.de wrote:
> On Wed, Jul 19, 2017 at 03:48:03PM +0200, solitone wrote:
> > On Wednesday, 19 July 2017 15:22:33 CEST tomas@tuxteam.de wrote:
> > >   echo "APT::Clean-Installed no;" > /etc/apt/apt.conf.d/no-autoclean
> > 
> > I've set it to "false", not to "no". The manual says "off", but didn't find any 
> > occurence of "on" and "off" in the other apt config files, just "true" or 
> > "false". Hope it works:
> 
> I'd think so. But alas, I can't quote a document stating the "official" syntax.
> The man page doesn't say anything on this :-/

I don't understand. man apt.conf   has a whole section on syntax:

SYNTAX
       The configuration file is organized in a tree with options organized
       into functional groups. Option specification is given with a double
       colon notation; for instance APT::Get::Assume-Yes is an option within
       the APT tool group, for the Get tool. Options do not inherit from their
       parent groups.

       Syntactically the configuration language is modeled after what the ISC
       tools such as bind and dhcp use. Lines starting with // are treated as
       comments (ignored), as well as all text between /* and */, just like
       C/C++ comments. Each line is of the form APT::Get::Assume-Yes "true";.
       The quotation marks and trailing semicolon are required. The value must
       be on one line, and there is no kind of string concatenation. Values
       must not include backslashes or extra quotation marks. Option names are
       made up of alphanumeric characters and the characters "/-:._+". A new
       scope can be opened with curly braces, like this:


           APT {
             Get {
               Assume-Yes "true";
               Fix-Broken "true";
             };
           };

       with newlines placed to make it more readable. Lists can be created by
       opening a scope and including a single string enclosed in quotes
       followed by a semicolon. Multiple entries can be included, separated by
       a semicolon.


           DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};

       In general the sample configuration file
       /usr/share/doc/apt/examples/configure-index.gz is a good guide for how
       it should look.

etc etc, and the file referred to has between four and eight hundred
lines (jessie/stretch) of example configuration.

Cheers,
David.


Reply to: