Comment 3 for bug 1076237

Revision history for this message
David Kalnischkies (donkult) wrote :

Just for the record: APT really supports # as comments as a convenience:

apt (0.7.22) unstable; urgency=low

  * [ABI break] support '#' in apt.conf and /etc/apt/preferences
    (closes: #189866)

 -- Michael Vogt <email address hidden> Wed, 29 Jul 2009 19:16:22 +0200

I really don't get why everyone thinks config file parsing is so damn cool that it must be reimplemented everywhere. I guess I have to try it some time. Sounds like a lot of fun.
Unnecessary to mention that aptdaemon will fail on other for-APT-valid config files also, like these including #clear option; and this time there is not even an excuse as this syntax is present since ever. Even though it might be hard to give a valid excuse provided the copyright year of config.py is 2010 … Oh dear …

My python is to limited, but from a first look it seems like it incorporates quiet a few issues like parsing/editing files which aren't parsed by APT (e.g. config.dpkg-new), #clear, #include, #-comments, …

(yes, I know that aptdaemon "needs" it to rewrite the configuration file as nobody has implemented it in libapt-pkg – properly because it sounds like so much fun – but I still don't get why because you could just append a new line to file to set a different value …)