Acknowledgement sent
to Raphaël Halimi <[email protected]>:
New Bug report received and forwarded. Copy sent to APT Development Team <[email protected]>.
(Sat, 02 May 2015 23:15:06 GMT) (full text, mbox, link).
Package: apt
Version: 1.0.9.8
Severity: minor
Before modifying a config file, I like to make a backup, either with cp
-a or with dpkg-divert --rename.
By default dpkg-divert diverts a file with the ".distrib" extension. So
I tried to make apt silently ignore this extension, but it didn't work.
I created a file called /etc/apt/apt.conf.d/00ignore-files-silently with
the contents:
// I like to rename some files before modifying them
Dir::Ignore-Files-Silently:: "\.distrib$";
The config snippet is indeed accepted by apt :
$ apt-config dump | grep -i silent
Dir::Ignore-Files-Silently "";
Dir::Ignore-Files-Silently:: "~$";
Dir::Ignore-Files-Silently:: "\.disabled$";
Dir::Ignore-Files-Silently:: "\.bak$";
Dir::Ignore-Files-Silently:: "\.dpkg-[a-z]+$";
Dir::Ignore-Files-Silently:: "\.save$";
Dir::Ignore-Files-Silently:: "\.orig$";
Dir::Ignore-Files-Silently:: "\.distUpgrade$";
Dir::Ignore-Files-Silently:: "\.distrib$";
But I still have a warning about
"/etc/apt/apt.conf.d/50unattended-upgrades.distrib" after each apt command.
Additionally, since ".distrib" is the default extension added by
dpkg-divert, maybe it should be added to the built-in list of silently
ignored extensions. I can report a separate bug with severity wishlist
if you think this is necessary.
Regards,
--
Raphaël Halimi
Acknowledgement sent
to David Kalnischkies <[email protected]>:
Extra info received and forwarded to list. Copy sent to APT Development Team <[email protected]>.
(Wed, 10 Jun 2015 13:30:05 GMT) (full text, mbox, link).
Hi,
On Sun, May 03, 2015 at 01:09:52AM +0200, Raphaël Halimi wrote:
> By default dpkg-divert diverts a file with the ".distrib" extension. So
> I tried to make apt silently ignore this extension, but it didn't work.
The problem is that your setting is read too late to have any effect for
configuration files. It will effect e.g. sources or preferences through.
To have the desired effect you would need to set this option in a config
file specified by an APT_CONFIG environment variable.
apt.conf manpage defines such a file to be read before the 'usual'
configuration files which are read together and do not effect the
execution paths used to parse later files.
Theoretically we could change this (= to let the previous parsed file
effect the next one), but in practice I am not sure all this work would
have much point beside blowing up my head and the complexity meter.
I remember talking about adding a warning if apt notices that an option
is set "too late" in another bugreport, but I can't find it ATM. Someday
I might even implemented it…
> Additionally, since ".distrib" is the default extension added by
> dpkg-divert, maybe it should be added to the built-in list of silently
> ignored extensions. I can report a separate bug with severity wishlist
> if you think this is necessary.
Actually, I you aren't objecting I would like to repropose this
bugreport to request this as the rest should be covered by other
bugreports already.
I have to say that I wonder why you divert a config file through.
Changes to the file can be detected by dpkg and even if you remove it
dpkg will not add it again on a package upgrade.
Best regards
David Kalnischkies
Acknowledgement sent
to Raphaël Halimi <[email protected]>:
Extra info received and forwarded to list. Copy sent to APT Development Team <[email protected]>.
(Tue, 30 Jun 2015 12:45:04 GMT) (full text, mbox, link).
Le 10/06/2015 15:27, David Kalnischkies a écrit :
> Theoretically we could change this (= to let the previous parsed file
> effect the next one), but in practice I am not sure all this work would
> have much point beside blowing up my head and the complexity meter.
>
> I remember talking about adding a warning if apt notices that an option
> is set "too late" in another bugreport, but I can't find it ATM. Someday
> I might even implemented it…
I think this would be a reasonable compromise.
>> Additionally, since ".distrib" is the default extension added by
>> dpkg-divert, maybe it should be added to the built-in list of silently
>> ignored extensions. I can report a separate bug with severity wishlist
>> if you think this is necessary.
>
> Actually, I you aren't objecting I would like to repropose this
> bugreport to request this as the rest should be covered by other
> bugreports already.
I don't object at all.
> I have to say that I wonder why you divert a config file through.
> Changes to the file can be detected by dpkg and even if you remove it
> dpkg will not add it again on a package upgrade.
Well, you're right, and I don't do it any more for quite some time now,
but when I started this practice some months ago, it seemed like a good
idea.
The goal was to have a backup of the default config file, as provided by
the maintainer, which would be automatically updated during package
upgrades, without interrupting said upgrades. Unfortunately, this also
meant that I wouldn't be notified when the maintainer changed the
default configuration, which, after further thought, turned out to be a
more disturbing downside than having to compare/update the files
manually after each upgrade.
Regards,
--
Raphaël Halimi