[Bug 1309658] Re: Invalid comments in debian/apt.conf.autoremove
Stoyan Stoyanov
stoyansbg at gmail.com
Fri Apr 18 22:13:16 UTC 2014
I think that a single tool that allows you to edit various config files
preserving the validity of the syntax has its uses. Yes, it would be easier
to shoot yourself in the foot than if using the tools provided with the
distribution, but a single interface for changing name/value pairs in
different config files is priceless.
Anyway, documenting the ability to use '#' for comments in apt config files
should suffice. It will provide ground for pushing changes to other
projects parsing the apt config files.
Thanks,
Stoyan
On Fri, Apr 18, 2014 at 1:31 PM, David Kalnischkies <
1309658 at bugs.launchpad.net> wrote:
> As I implemented this years ago I am obviously biased, but I think not
> supporting "#" as a comment is a mistake as sources.list and preferences
> support it and most other config files you come across do comments with
> '#'. The autokernelremove code was an "external" contribution and it just
> shows that the default assumption is in fact '#'.
> (all apt config files I have on my systems include #-comments btw, and I
> doubt I am the only one)
> We should just document this fact properly instead of reverting support
> for it…
>
>
> I wonder more why augeas is parsing our config file (but then again, I
> have no idea what augeas is). We have the apt-config tool to extract
> settings as well as python-apt, libapt-perl and libapt proper. Doing it on
> your own leads to a disaster sooner or later…
> (just compare it with sources.list parsers… a simple codesearch reveals
> that most of them are fundamentally broken even in perfectly documented
> cases; but in most cases I have no idea why they they try to parse it in
> the first place…)
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1309658
>
> Title:
> Invalid comments in debian/apt.conf.autoremove
>
> Status in “apt” package in Ubuntu:
> New
>
> Bug description:
> According to apt.conf(5) man page, the only valid comments in apt
> config files are:
>
> "Lines starting with // are treated as comments (ignored), as well as
> all text between /* and */, just like C/C++ comments."
>
> There are comments in debian/apt.conf.autoremove
> (/etc/apt/apt.conf.d/01autoremove) that start with '#' which breaks
> other tools like augeas that follow strictly the definition of
> comments in apt.conf's man page and rely on it to function properly.
>
> 1)
> Description: Ubuntu 14.04 LTS
> Release: 14.04
>
> 2) apt:
> Installed: 1.0.1ubuntu2
> Candidate: 1.0.1ubuntu2
> Version table:
> *** 1.0.1ubuntu2 0
> 500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64
> Packages
> 100 /var/lib/dpkg/status
>
> The file can be patched by running:
> $ sed -i "s/#/\/\//" apt.conf.autoremove
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1309658/+subscriptions
>
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1309658
Title:
Invalid comments in debian/apt.conf.autoremove
Status in “apt” package in Ubuntu:
New
Bug description:
According to apt.conf(5) man page, the only valid comments in apt
config files are:
"Lines starting with // are treated as comments (ignored), as well as
all text between /* and */, just like C/C++ comments."
There are comments in debian/apt.conf.autoremove
(/etc/apt/apt.conf.d/01autoremove) that start with '#' which breaks
other tools like augeas that follow strictly the definition of
comments in apt.conf's man page and rely on it to function properly.
1)
Description: Ubuntu 14.04 LTS
Release: 14.04
2) apt:
Installed: 1.0.1ubuntu2
Candidate: 1.0.1ubuntu2
Version table:
*** 1.0.1ubuntu2 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
The file can be patched by running:
$ sed -i "s/#/\/\//" apt.conf.autoremove
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1309658/+subscriptions
More information about the foundations-bugs
mailing list