:: Re: [DNG] systemd is haunting me
Forside
Slet denne besked
Besvar denne besked
Skribent: Rainer Weikusat
Dato:  
Til: dng
Emne: Re: [DNG] systemd is haunting me
Didier Kryn <kryn@???> writes:
> Le 02/02/2016 04:39, Simon Wise a écrit :
>> so looking at apt.conf I see as the very first text 'DESCRIPTION'


[...]

>> FILES
>>        /etc/apt/apt.conf
>>            APT configuration file. Configuration Item:
>>            Dir::Etc::Main.

>>
>> /etc/apt/apt.conf.d/
>>            APT configuration file fragments. Configuration Item:
>>            Dir::Etc::Parts.

>
>     This is also in man apt.conf, but - call me an idiot - I still
> can't make sense of it. What the hell is the meaning of the words
> Dir', 'Etc', 'Main' and 'Parts'? Why the hell do '::' translate to '/'
> ? What document did you learn that "language" from?


:: is used as component separator in the hierarchical namespaces of C++
and Perl (these are the two I know of). The Dir ('directory') is a bit
stupidly name as it apparently means "top-level configuration section
specifying pathnames'. 'Etc' means 'configuration stuff' (cf /etc),
consequently,

Dir::Etc::Main

is the pathname of the main configuration file and

Dir::Etc::Parts

that of a directory containing additional configuration-file snippets
supposed to be included into the main configuration.

A {}-based notation is also supported, ie,

Dir::Etc::Main

is the short form of

Dir {
    Etc {
            Main {
                }
       }
}


The syntax is explained in the apt.conf(5) manpage.