[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#935910: marked as done (apt: Should be less tolerant of dpkg errors when forcing removal)



Your message dated Thu, 19 Sep 2019 20:34:11 +0000
with message-id <E1iB37z-00070d-Vn@fasolo.debian.org>
and subject line Bug#935910: fixed in apt 1.8.4
has caused the Debian Bug report #935910,
regarding apt: Should be less tolerant of dpkg errors when forcing removal
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
935910: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=935910
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Version: 1.8.3
Severity: important

Dear apt maintainers,

This report is a result of my investigation of #934491 which shows that when
trying to migrate a sid install from systemd to sysvinit and elogind by the most
obvious route it is possible to break the system in a way that is difficult to
recover with the fairly simple command:

 apt install libpam-elogind sysvinit-core

I think the root cause of the issue is the way apt invokes dpkg when forcing
removals which is not sufficiently responsive to errors.

In this case apt's dpkg commands are:

 echo 'libpam-systemd:amd64 deinstall' | /usr/bin/dpkg --set-selections 
 echo 'systemd-sysv:amd64 deinstall' | /usr/bin/dpkg --set-selections 
 echo 'systemd:amd64 deinstall' | /usr/bin/dpkg --set-selections 
 echo 'libsystemd0:amd64 deinstall' | /usr/bin/dpkg --set-selections 
 /usr/bin/dpkg --status-fd 18 --no-triggers --force-depends --remove libpam-systemd:amd64 
 /usr/bin/dpkg --status-fd 18 --no-triggers --unpack --auto-deconfigure /var/cache/apt/archives/libpam-elogind_241.3-1+debian1_amd64.deb 
 /usr/bin/dpkg --status-fd 18 --no-triggers --force-depends --remove systemd-sysv:amd64 
 /usr/bin/dpkg --status-fd 18 --no-triggers --unpack --auto-deconfigure /var/cache/apt/archives/sysvinit-core_2.96~beta-1_amd64.deb 
 /usr/bin/dpkg --status-fd 18 --no-triggers --force-depends --remove systemd:amd64 libsystemd0:amd64 
   ^^^ The line above causes the problem ^^^
 /usr/bin/dpkg --status-fd 18 --no-triggers --unpack --auto-deconfigure /var/cache/apt/archives/libelogind0_241.3-1+debian1_amd64.deb 
 /usr/bin/dpkg --status-fd 18 --no-triggers --configure libelogind0:amd64 
 /usr/bin/dpkg --status-fd 18 --no-triggers --unpack --auto-deconfigure /var/cache/apt/archives/elogind_241.3-1+debian1_amd64.deb 
 /usr/bin/dpkg --status-fd 18 --configure --pending 

The problem is caused by the invocation forcing the removal of systemd and
libsystemd0. If systemd is pid 1 then its prerm will fail to prevent
removal. However, dpkg still continues to remove libsystemd0 as requested
*before* exiting and signalling an error. apt then stops in response to the dpkg
error. The system is then broken as there is no libsystemd.so.0 installed which
apt itself requires.

My solution is to invoke dpkg with --abort-after=1.  The command line

 apt install -o DPkg::Options::="--abort-after=1" install libpam-elogind sysvinit-core

no longer breaks a sid systemd system. This means that dpkg exits immediately
after the systemd prerm fails and libsystemd0 remains installed. The
dependencies can then be fixed with apt.

I suggest that --abort-after=1 should be apt's default when forcing package
removal.

Thanks

Mark

--- End Message ---
--- Begin Message ---
Source: apt
Source-Version: 1.8.4

We believe that the bug you reported is fixed in the latest version of
apt, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 935910@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Julian Andres Klode <jak@debian.org> (supplier of updated apt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 19 Sep 2019 22:06:45 +0200
Source: apt
Architecture: source
Version: 1.8.4
Distribution: unstable
Urgency: medium
Maintainer: APT Development Team <deity@lists.debian.org>
Changed-By: Julian Andres Klode <jak@debian.org>
Closes: 935910
Changes:
 apt (1.8.4) unstable; urgency=medium
 .
   * CMake: Pass -Werror=return-type to gcc
   * apt.systemd.daily: Do not numerically check if intervals equal 0
     (LP: #1840995)
   * Pass --abort-after=1 to dpkg when using --force-depends (Closes: #935910)
     (LP: #1844634)
   * Fix use of GTest to adjust for GTest 1.9
Checksums-Sha1:
 15d59774b0263f3896f134aedda4e98bac23ecb1 2766 apt_1.8.4.dsc
 6078d37984a2638a45254f6133ed441a6aced413 2188876 apt_1.8.4.tar.xz
 1abbcf2fe49129a74add5cdbeb1db600db4bb14c 7109 apt_1.8.4_source.buildinfo
Checksums-Sha256:
 492d4d6de28a26d46b63ac360c3ea3bcc106970a6521f3812dd86ae33cbeaccc 2766 apt_1.8.4.dsc
 f40fe4475f3ab775a915569911326ff31c12c09eb8518bd82ba87aa570d6c43e 2188876 apt_1.8.4.tar.xz
 553d558f8acb3dcc6afcba2966f16a1d5af3dad6227ec490f36d1396d026952e 7109 apt_1.8.4_source.buildinfo
Files:
 31bd5e7f1a4cd9e92019e04efcbe848e 2766 admin important apt_1.8.4.dsc
 9fdddb5d3e2b2a629f484dfb6b218bd3 2188876 admin important apt_1.8.4.tar.xz
 6f71a62d983e31320d763249947e7010 7109 admin important apt_1.8.4_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJDBAEBCgAtFiEET7WIqEwt3nmnTHeHb6RY3R2wP3EFAl2D4EkPHGpha0BkZWJp
YW4ub3JnAAoJEG+kWN0dsD9xZZgQAKOsUuaP59P+hdi0EgPxAWlRhTIIv2mDVQvB
4Bt/tcPw7wF4BcBhfKmICItRAwjTFSAWTTnhs0ZaJX/WUL9xQ/ciJUW1y8+7HsTV
bkslbTBgtx+/cXRpd+tYSx3+J+jEsJgWJEb2uDVg8c9l4nPi3XVieXuknMXVl5fa
8cyy5udVdt53MQf9h/At9tVcWfx1cmWRACWGpWexkAfHuQ7fwQy0m8MqPC+q/89C
veKuG+Y49VnyTd09qOlBIcu6+mg/VUQBJEBhRESe3rttTXal9o3ch2ZllYb7FF5V
wI/6vIbRgo8cGABCWfh8eS0v5m70t3tdpFc/LmmznK3pV6Ciz/LH4juWbZYZpAP5
bUKUTjvcJzV1/bSI3+IijlGWh8TEIh13FlRTCOKzjSuy1XRiokJbUBwVBnffaS05
FIPxp6tXgG5b2//c1sY0Sgo3vA0NKuZD+I4APnw9aR+n48QN0lCJdkUYSQQShaTl
3F+x9qFDzoNB0X9sB00OSUw09ALndmfeluZJS9Y37NcufTePR2FF4P6QjacfjSdN
6hXqFmbHX7Uirs2qZhqCkqHtI7o58FXgUhmq2jbgiY6j/fCSkPpki+38iSrS/cnO
uTfcjqFRFqJV/1DbA5AkEneXdYbmUisPOVnlctKm9ropspLFWbay/lNRNQ1+MX+Q
pf3rxxSu
=eBiw
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: