Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 548920 - app-admin/checkrestart-0.47-r3 - File "/usr/sbin/checkrestart", line 123, in portage_fQuery // packages[packagename].processes.extend(programs[program]) // KeyError: '/etc/wpa_supplicant'
Summary: app-admin/checkrestart-0.47-r3 - File "/usr/sbin/checkrestart", line 123, in ...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2015-05-08 16:46 UTC by Amadeusz Żołnowski (RETIRED)
Modified: 2017-05-28 21:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Should fix this problem (checkrestart.patch,547 bytes, patch)
2016-02-22 16:26 UTC, Karl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Amadeusz Żołnowski (RETIRED) gentoo-dev 2015-05-08 16:46:25 UTC
$ sudo checkrestart                                                    
Found 59 processes using old versions of upgraded files
(37 distinct programs)
Traceback (most recent call last):
  File "/usr/sbin/checkrestart", line 495, in <module>
    main()
  File "/usr/sbin/checkrestart", line 183, in main
    fQuery(programs, packages)
  File "/usr/sbin/checkrestart", line 123, in portage_fQuery
    packages[packagename].processes.extend(programs[program])
KeyError: '/etc/wpa_supplicant'


Reproducible: Always
Comment 1 Amadeusz Żołnowski (RETIRED) gentoo-dev 2015-05-08 16:56:23 UTC
At first run I got:

Found 61 processes using old versions of upgraded files
(38 distinct programs)
Traceback (most recent call last):
  File "/usr/sbin/checkrestart", line 495, in <module>
    main()
  File "/usr/sbin/checkrestart", line 183, in main
    fQuery(programs, packages)
  File "/usr/sbin/checkrestart", line 123, in portage_fQuery
    packages[packagename].processes.extend(programs[program])
KeyError: '/etc/syslog-ng'

After restarting syslog-ng, I get this for another process: wpa_supplicant. I suppose it is gonna be something similar for all ~60 processes.

This is what I have just upgraded:

dev-python/setuptools-15.2::gentoo [15.0::gentoo] USE="{-test}" PYTHON_TARGETS="python2_7 python3_3 -pypy -pypy3 -python3_4" 614 KiB
dev-python/six-1.9.0-r1::gentoo [1.9.0::gentoo] USE="-doc {-test}" PYTHON_TARGETS="python2_7 python3_3 -pypy -pypy3 -python3_4" 0 KiB
dev-python/pycparser-2.12::gentoo [2.10::gentoo] USE="{-test}" PYTHON_TARGETS="python2_7 python3_3 -pypy -python3_4" 291 KiB
sys-apps/gawk-4.1.2::gentoo [4.1.1-r1::gentoo] USE="nls readline -mpfr" 2226 KiB
dev-libs/libpcre-8.37:3::gentoo [8.36:3::gentoo] USE="bzip2 cxx jit pcre16 readline recursion-limit (unicode) zlib -libedit -pcre32 -static-libs" ABI_X86="32* (64) (-x32)" 1522 KiB
dev-util/cdiff-0.9.7::gentoo [0.9.6::gentoo] PYTHON_TARGETS="python2_7 python3_3 -python3_4" 32 KiB
dev-python/requests-2.7.0::gentoo [2.6.0::gentoo] PYTHON_TARGETS="python2_7 python3_3 -pypy -pypy3 -python3_4" 442 KiB
dev-python/lxml-3.4.3::gentoo [3.4.2::gentoo] USE="threads -beautifulsoup3 -doc -examples {-test%}" PYTHON_TARGETS="python2_7 python3_3 -python3_4" 3459 KiB
dev-perl/DateManip-6.490.0::gentoo [6.430.0::gentoo] USE="{-test}" 15110 KiB
sys-apps/openrc-0.15.1::gentoo [0.14::gentoo] USE="ncurses netifrc pam unicode -audit -debug -newnet (-prefix) (-selinux) -static-libs -tools" 154 KiB
dev-libs/jsoncpp-0.10.2::gentoo [0.10.1::gentoo] USE="-doc {-test}" 193 KiB
sys-apps/util-linux-2.26.2::gentoo [2.26.1-r1::gentoo] USE="caps cramfs ncurses nls pam suid udev unicode -fdformat -python (-selinux) -slang -static-libs -systemd {-test} -tty-helpers" ABI_X86="32 (64) (-x32)" PYTHON_SINGLE_TARGET="python2_7 -python3_3 -python3_4" PYTHON_TARGETS="python2_7 python3_3 -python3_4" 3774 KiB
Comment 2 Pacho Ramos gentoo-dev 2015-06-16 13:28:57 UTC
It looks like upstream webpage is dead, and looks like this version is from 2008 :/, maybe this should be treecleaned
Comment 3 Amadeusz Żołnowski (RETIRED) gentoo-dev 2015-06-16 15:52:42 UTC
:-/ Is there a replacement?

Although it's working back now,
 - probably after some next upgrade.
Comment 4 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-01-06 21:17:33 UTC
It's not that dead:

https://github.com/tpo/debian-goodies/blob/master/checkrestart
Comment 5 Karl 2016-02-22 16:26:37 UTC
Created attachment 426234 [details, diff]
Should fix this problem

The output of qfile is used by checkrestart to get a list of programs owning certain files. A feature of qfile is that its output is dependent on the current working directory. Some of the files in its output aren't programs and checkrestart crashed. This patch sets the cwd to / for the qfile subprocess, so its output is as expected.
Comment 6 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-02-23 20:13:29 UTC
Thanks for investigating the issue!

So it looks that `programs` passed to `portage_fQuery()` is a list of programs names, not paths. While cwd to `/` seems to be a good workaround, the real fix would be to provide a list of absolute paths to programs instead.
Comment 7 Pacho Ramos gentoo-dev 2016-08-21 11:47:47 UTC
is the patch finally being committed... or is anyone willing to proxy maintain this? (or we should finally treeclean this?)
Comment 8 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-08-21 13:10:26 UTC
There is no alternative to checkrestart... I will try to improve the patch and commit it. Or I will just commit Karl's patch if I don't find time to look at this closer today.
Comment 9 Amadeusz Żołnowski (RETIRED) gentoo-dev 2016-08-21 21:28:02 UTC
I have committed Karl's patch. When I've got more time, I'll improve the solution.

Thanks Karl!
Comment 10 Amadeusz Żołnowski (RETIRED) gentoo-dev 2017-05-28 21:20:34 UTC
app-admin/checkrestart has been marked for removal.