Re: Report a bug against which package - unattended-upgrades / apt / dpkg ??

2022-03-21 Thread Dr. Alex Sheppard


On 21/03/2022 14:02, Dan Ritter wrote:

Dr. Alex Sheppard wrote:

Hi,

     Unattended upgrades ended up removing some of the packages it was was
going to upgrade ... bind9 being one of them and thereby breaking DNS on a
client's network.

     Is this a bug in unattended upgrades, or a bug in apt or dpkg? Here is
an extract from my unattended-upgrades.log to illustrate.

     FTR: I'm struggling to think how bind9 could have been installed as a
dependency for something else on the machine in question. I am pretty sure I
would have installed it manually which gives extra surprise to it being
autoremoved.

unattended-upgrades should not be allowed to autoremove. Doing
so always ends up with surprises, unless you have pre-tested
everything and keep your own apt repo a day or two behind
Debian's.

Unattended-Upgrade::Remove-Unused-Dependencies "false";
Unattended-Upgrade::Remove-New-Unused-Dependencies "false";

However,
Unattended-Upgrade::Remove-Unused-Kernel-Packages
is usually safe, unless you have very specific reasons to keep
multiple old kernels around.

-dsr-

Thanks Dan, I've updated my config accordingly to avoid this happening 
in future :-)


It's not so urgent for me now, but I still get the feeling there is a 
bug to report.



My config had the normal "like apt-get autoremove" disabled as per default
"""
// Do automatic removal of unused packages after the upgrade
// (equivalent to apt-get autoremove)
// Unattended-Upgrade::Remove-Unused-Dependencies "false";
"""

Whereas removing newly unused packages was enabled  - also as per the 
default

"""
// Do automatic removal of newly unused dependencies after the upgrade
// Unattended-Upgrade::Remove-New-Unused-Dependencies "true";
"""


My issue arose not from doing "the equivalent to apt-get autoremove" but 
by whatever "Remove-New-Unused-Dependencies" does. Does anybody know how 
the logic of this works / what commands are run to achieve this?


The way I see it there is a bug in either:

    a) The logic in unattended-upgrades of how it goes about fulfilling 
"Remove-New-Unused-Dependencies"


        or

    b) An underlying command that is called to fulfill the 
"Remove-New-Unused-Dependencies" operation


        or

    c) Uninstalling a package that it just upgraded seems like a 
mistake that ought to be catchable, but if there is just no way to do 
the "Remove-New-Unused-Dependencies" operation without risk of something 
important getting installed, the bug is that this is enabled by default.



So, unless anyone can explain otherwise, I think there is a bug to 
report against unattended-upgrades.















Dr. Alex Sheppard
http://www.das-computer.co.uk <http://das-computer.co.uk>


Report a bug against which package - unattended-upgrades / apt / dpkg ??

2022-03-21 Thread Dr. Alex Sheppard

Hi,

    Unattended upgrades ended up removing some of the packages it was 
was going to upgrade ... bind9 being one of them and thereby breaking 
DNS on a client's network.


    Is this a bug in unattended upgrades, or a bug in apt or dpkg? Here 
is an extract from my unattended-upgrades.log to illustrate.


    FTR: I'm struggling to think how bind9 could have been installed as 
a dependency for something else on the machine in question. I am pretty 
sure I would have installed it manually which gives extra surprise to it 
being autoremoved.



"""
2022-03-19 00:50:02,051 INFO Checking if system is running on battery is 
skipped. Please install powermgmt-base package to check power status and 
skip installing updates when the system is running on battery.

2022-03-19 00:50:02,091 INFO Initial blacklist :
2022-03-19 00:50:02,092 INFO Initial whitelist:
2022-03-19 00:50:02,092 INFO Starting unattended upgrades script
2022-03-19 00:50:02,092 INFO Allowed origins are: 
origin=Debian,codename=buster,label=Debian, 
origin=Debian,codename=buster,label=Debian-Security
2022-03-19 06:26:44,369 INFO Checking if system is running on battery is 
skipped. Please install powermgmt-base package to check power status and 
skip installing updates when the system is running on battery.

2022-03-19 06:26:44,375 INFO Initial blacklist :
2022-03-19 06:26:44,375 INFO Initial whitelist:
2022-03-19 06:26:44,376 INFO Starting unattended upgrades script
2022-03-19 06:26:44,376 INFO Allowed origins are: 
origin=Debian,codename=buster,label=Debian, 
origin=Debian,codename=buster,label=Debian-Security
2022-03-19 06:26:48,609 INFO *Packages that will be upgraded: bind9 
bind9-host **bind9utils dnsutils* libbind9-161 libdns-export1104 
libdns1104 libirs-export161 libirs161 libisc-export1100 libisc1100 
libisccc161 libisccfg-export163 libisccfg163 liblwres161
2022-03-19 06:26:48,610 INFO Writing dpkg log to 
/var/log/unattended-upgrades/unattended-upgrades-dpkg.log
2022-03-19 06:26:49,218 WARNING Keeping auto-removable libirs161 
package(s) because it would also remove the following packages which 
should be kept in this step: bind9utils
2022-03-19 06:27:08,325 WARNING Keeping auto-removable liblwres161 
package(s) because it would also remove the following packages which 
should be kept in this step: bind9utils libbind9-161 libdns1104 
libisc1100 libisccc161 libisccfg163
2022-03-19 06:27:27,161 INFO *Packages that were successfully 
auto-removed:* avahi-daemon *bind9 bind9-host dnsutils host* 
libavahi-core7 libdaemon0 libnss-mdns
2022-03-19 06:27:27,161 INFO Packages that are kept back: libirs161 
liblwres161

"""

Thanks,

Alex


--
Dr. Alex Sheppard
http://www.das-computer.co.uk <http://das-computer.co.uk>