Package: debian-goodies
Version: 0.67
Severity: important

Hi

Running checkrestart with the -p option throws the following error:

Traceback (most recent call last):
  File "/usr/sbin/checkrestart", line 742, in <module>
    main()
  File "/usr/sbin/checkrestart", line 149, in main
    toRestart = lsoffilescheck(blacklist = blacklist)
  File "/usr/sbin/checkrestart", line 358, in lsoffilescheck
    toRestart = [process for process in list(processes.values()) if
process.needsRestart(blacklist)]
  File "/usr/sbin/checkrestart", line 358, in <listcomp>
    toRestart = [process for process in list(processes.values()) if
process.needsRestart(blacklist)]
  File "/usr/sbin/checkrestart", line 726, in needsRestart
    if isdeletedFile(f, blacklist):
  File "/usr/sbin/checkrestart", line 526, in isdeletedFile
    file_query_check[file_name] = ispackagedFile(file_name)
  File "/usr/sbin/checkrestart", line 438, in ispackagedFile
    if line.find('no path found matching pattern ' + f) > 0:
TypeError: a bytes-like object is required, not 'str'

Without the -p option, I get the output (without error):
Found 3 processes using old versions of upgraded files
(2 distinct programs)
(0 distinct packages)
No packages seem to need to be restarted.
(please read checkrestart(1))

If I use python2 to start checkrestart (python2 /usr/sbin/checkrestart -p):
The error does not occur, output:
Found 3 processes using old versions of upgraded files
(2 distinct programs)
(0 distinct packages)
No packages seem to need to be restarted.
(please read checkrestart(1))

For reverence here is the output of  python2 /usr/sbin/checkrestart -pv:
[DEBUG] Checking if file /lib/x86_64-linux-gnu/libapparmor.so.1.4.0
belongs to any package
[DEBUG] Running: dpkg-query --search
/lib/x86_64-linux-gnu/libapparmor.so.1.4.0
[DEBUG] Running: dpkg-query --search
/lib/x86_64-linux-gnu/libapparmor.so.1.4.0
[DEBUG] YES: File belongs to package libapparmor1
Found 3 processes using old versions of upgraded files
(2 distinct programs)
[DEBUG] Process /lib/systemd/systemd (PID: 1)
List of deleted files in use:
        /lib/x86_64-linux-gnu/libapparmor.so.1.4.0
[DEBUG] Process /usr/bin/dbus-daemon (PID: 370)
List of deleted files in use:
        /lib/x86_64-linux-gnu/libapparmor.so.1.4.0
[DEBUG] Process /lib/systemd/systemd (PID: 28419)
List of deleted files in use:
        /lib/x86_64-linux-gnu/libapparmor.so.1.4.0
[DEBUG] Running: dpkg-query --search /lib/systemd/systemd
/usr/bin/dbus-daemon
[DEBUG] Reading line from dpkg-query: systemd: /lib/systemd/systemd

[DEBUG] Found package systemd for program /lib/systemd/systemd
[DEBUG] Reading line from dpkg-query: dbus: /usr/bin/dbus-daemon

[DEBUG] Found package dbus for program /usr/bin/dbus-daemon
[DEBUG] Removing systemd from the package list (ignored)
[DEBUG] Removing dbus from the package list (ignored)
(0 distinct packages)
No packages seem to need to be restarted.
(please read checkrestart(1))


Thanks for taking care ;)

Benedikt Trefzer

Reply via email to