Package: needrestart
Severity: normal
X-Debbugs-Cc: [email protected]
Control: affects -1 apt

needrestart currently wastes time each time we spawn dpkg to monitor
for unpacks. It should instead use Dpkg::Pre-Invoke and
DPkg::Post-Invoke and analyse the state difference like etckeeper
does.

You can check both which things were installed, as well as whether
there is a package in an erronous state this way, which also ends up
being more correct - just because dpkg produced an error does not
necessarily mean the outcome is an error.

The dpkg hook causes test suite failures in apt when needrestart is
installed, as it can't write to /run/needrestart (please don't ask me
why). Yes, I guess we can work around dpkg hooks writing in the middle
of our scripts, but this is really all madness.

(204/273) Testcase test-failing-maintainer-scripts:  P P P P P P P P P P
P P P P P P P P P P P P P P P PReading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  dependee
  The following NEW packages will be installed:
    dependee failure-postinst
    0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0 B/2520 B of archives.
    After this operation, 20.5 kB of additional disk space will be used.
    Get:1 file:/tmp/tmp.KEeJrchuqp/aptarchive unstable/main ppc64el
    dependee ppc64el 1.0 [1224 B]
    Get:2 file:/tmp/tmp.KEeJrchuqp/aptarchive unstable/main ppc64el
    failure-postinst ppc64el 1.0 [1296 B]
    PRE: START
    PRE: MaiN
    PRE: ENd
    Selecting previously unselected package dependee.
    (Reading database ... 
    (Reading database ... 50%
    (Reading database ... 100%
    (Reading database ... 0 files and directories currently installed.)
    Preparing to unpack .../pool/dependee_1.0_ppc64el.deb ...
    Unpacking dependee (1.0) ...
    touch: cannot touch '/run/needrestart/unpacked': Permission denied
    Selecting previously unselected package failure-postinst.
    Preparing to unpack .../failure-postinst_1.0_ppc64el.deb ...
    Unpacking failure-postinst (1.0) ...
    Setting up dependee (1.0) ...
    Setting up failure-postinst (1.0) ...
    WARNING: CHROOTing to /tmp/tmp.KEeJrchuqp/rootdir was ignored!
    REWRITE execvp call /var/lib/dpkg/info/failure-postinst.postinst
    into /tmp/tmp.KEeJrchuqp/rootdir
    dpkg: error processing package failure-postinst (--configure):
     installed failure-postinst package post-installation script
     subprocess returned error exit status 29
     Errors were encountered while processing:
      failure-postinst
      touch: POST: START
      POST: MaiN
      POST: ENd
      W: Using config option »dpkg::stoponerror« of type UNDEFINED as a
      type BOOL
      E: Sub-process /tmp/tmp.KEeJrchuqp/rootdir/usr/bin/dpkg returned
      an error code (1)
      Test for proper execution of invoke scripts in console log … FAIL
       P P P P P P P P P P P P P P P P P P P P
       Running test-failing-maintainer-scripts -> FAILED




-- System Information:
Debian Release: bullseye/sid
  APT prefers hirsute
  APT policy: (500, 'hirsute'), (500, 'groovy-updates'), (500, 
'groovy-security')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.11.0-13-generic (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to 
C.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages needrestart depends on:
ii  binutils                   2.36.1-6ubuntu1
ii  dpkg                       1.20.7.1ubuntu4
ii  gettext-base               0.21-3ubuntu2
pn  libintl-perl               <none>
pn  libmodule-find-perl        <none>
pn  libmodule-scandeps-perl    <none>
ii  libproc-processtable-perl  0.59-2build1
pn  libsort-naturally-perl     <none>
ii  libterm-readkey-perl       2.38-1build2
ii  perl                       5.32.1-3ubuntu2
ii  xz-utils                   5.2.5-1.0build2

Versions of packages needrestart recommends:
ii  libpam-systemd  247.3-3ubuntu2

Versions of packages needrestart suggests:
ii  iucode-tool    2.3.1-1
ii  libnotify-bin  0.7.9-3ubuntu2

-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en

Reply via email to