Bug 449792 - kinfocenter does not find lspci in upstream default location (in /sbin/)
Summary: kinfocenter does not find lspci in upstream default location (in /sbin/)
Status: RESOLVED FIXED
Alias: None
Product: kinfocenter
Classification: Applications
Component: PCI (show other bugs)
Version: 5.24.0
Platform: OpenSUSE Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-08 14:56 UTC by Philippe ROUBACH
Modified: 2022-02-10 22:16 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.1


Attachments
error message (59.50 KB, image/png)
2022-02-08 14:56 UTC, Philippe ROUBACH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe ROUBACH 2022-02-08 14:56:36 UTC
Created attachment 146445 [details]
error message

SUMMARY


STEPS TO REPRODUCE
1. launch info center
2. go to "devices""
3. select " LSPCI"

OBSERVED RESULT

you get an error message : "the executable lspci could not be found in $PATH"

EXPECTED RESULT

you get pci info

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
kde gears : 21.12.2

ADDITIONAL INFORMATION
Comment 1 Antonio Rojas 2022-02-08 15:03:54 UTC
This is a packaging issue, please report it to your distribution
Comment 2 Philippe ROUBACH 2022-02-08 15:30:27 UTC
lspci is installed. I cheked this (/sbin/lspci)
Comment 3 Antonio Rojas 2022-02-08 15:44:34 UTC
Is that in your $PATH? It needs to be so that QStandardPaths::findExecutable can find it.
Comment 4 Philippe ROUBACH 2022-02-08 16:01:30 UTC
x@localhost:~> echo $PATH
/home/<user>/bin:/usr/local/bin:/usr/bin:/bin
x@localhost:~>
Comment 5 Antonio Rojas 2022-02-08 16:09:04 UTC
(In reply to Philippe ROUBACH from comment #4)
> x@localhost:~> echo $PATH
> /home/<user>/bin:/usr/local/bin:/usr/bin:/bin
> x@localhost:~>

So it's not, that's the problem.
Comment 6 Fabian Vogt 2022-02-08 17:00:21 UTC
pciutils installs lspci into /usr/sbin, so kinfocenter needs to search that as well:

https://github.com/pciutils/pciutils/blob/53e73b36c999ef091a51c0b6803604ce4f1ff315/Makefile#L133
Comment 7 Nate Graham 2022-02-08 17:48:42 UTC
What does `which lspci` in a terminal window say?
Comment 8 Bug Janitor Service 2022-02-08 18:39:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kinfocenter/-/merge_requests/84
Comment 9 Philippe ROUBACH 2022-02-08 22:26:34 UTC
(In reply to Nate Graham from comment #7)
> What does `which lspci` in a terminal window say?

 which lspci
which: no lspci in (/home/<user>/bin:/usr/local/bin:/usr/bin:/bin)
Comment 10 Fabian Vogt 2022-02-10 18:31:53 UTC
Git commit 1533db0a4e44623631a601cf72e7adffb9121ec2 by Fabian Vogt.
Committed on 10/02/2022 at 18:29.
Pushed by fvogt into branch 'master'.

Search in /usr/local/sbin:/usr/sbin:/sbin as fallback

Utilities such as lspci default to /usr/(local/)sbin/ as install location,
but that's not in $PATH for regular user sessions. It still works without
supeuser privileges, so just look there as well as a fallback.

M  +6    -0    src/CommandOutputContext.cpp
M  +1    -1    src/CommandOutputContext.h

https://invent.kde.org/plasma/kinfocenter/commit/1533db0a4e44623631a601cf72e7adffb9121ec2
Comment 11 Fabian Vogt 2022-02-10 18:33:19 UTC
Git commit c735a7481b6200d7a03f533476ed9f0fdb53fde9 by Fabian Vogt.
Committed on 10/02/2022 at 18:33.
Pushed by fvogt into branch 'Plasma/5.24'.

Search in /usr/local/sbin:/usr/sbin:/sbin as fallback

Utilities such as lspci default to /usr/(local/)sbin/ as install location,
but that's not in $PATH for regular user sessions. It still works without
supeuser privileges, so just look there as well as a fallback.


(cherry picked from commit 1533db0a4e44623631a601cf72e7adffb9121ec2)

M  +6    -0    src/CommandOutputContext.cpp
M  +1    -1    src/CommandOutputContext.h

https://invent.kde.org/plasma/kinfocenter/commit/c735a7481b6200d7a03f533476ed9f0fdb53fde9