On Mon, Sep 07, 2009 at 04:06:17PM +0200, David Kalnischkies wrote: > On 2009-07-02 at 10:14:39, in #535364 , Filippo Giunchedi wrote: > > file. Otherwise it is not clear how one should write config files > > (the changelog isn't clear either). > The APT Team has not changed the syntax for years (i guess) > so i would be interested which changelog is not clear here (if any). I'm not Filippo, neither am I able to find the quoted text in his bts-Mail, but probably he meant the manpage? > ( It is really a bit strange that apt accepts "::" as a valid option name, > but this is the same category as accepting other completely wrong options, apt.conf(5) states: Lists can be appended too by adding a trailing :: to the list name. At least for some people (especially package maintainers) this leads to the assumption that it is more safe to add own stuff using 'append to list' instead of risking to overwrite something. See #501542 for an example. Btw.: in the phrase above the "too" is somewhat irritating because it implies that there is at least one other way to append something to a list, while the whole manpage does not show any other way to do it. In fact, from my #503481 DPkg::Post-Invoke example DPkg::Post-Invoke { "echo 99test1"; }; DPkg::Post-Invoke { "echo 99test2"; }; one would intuitively assume that the second line overwrites (i.e. redefines) the first one, while, especially together with the manpage statement, one would assume that DPkg::Post-Invoke:: { "echo 99test3"; }; DPkg::Post-Invoke:: { "echo 99test4"; }; appends two lines to the DPkg::Post-Invoke list. The current behaviour seems to be exactly the opposite. Thus, IMHO either the code or the manpage should be corrected. > The documentation definitely lacks the clear statement that the use > of both syntax's for lists in one line will have an "unexpected" result. More than this: as you have shown by yourself, the manpage-recommended way to append to lists leads to an overwrite. > Maybe it is also a misunderstanding that a newer scope entry could > override an older entry with the same name and so the user tries to > say explicit that he wants to append to the list? Yes, this is what I think. > I have attached a little documentation patch which tries to be a bit > clearer in what is the use case for :: and {}. To be honest - it does not make things more clear for me :) Maybe this is because it's unclear to me what is the difference between a "scope", a "name", and a "list" - and maybe a "value" :) For example, what exactly does DPkg::Post-Invoke describe? Does it have a type? How does it differ from DPkg::Post-Invoke:: and is it different from, i.e. APT::Cache-Limit or APT::Get::Assume-Yes? And if it is - how? regards Mario -- There are trivial truths and the great truths. The opposite of a trivial truth is plainly false. The opposite of a great truth is also true. -- Niels Bohr
Attachment:
signature.asc
Description: Digital signature