Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#58476 - [libsmbios] Python imports are pointing to wrong directory

Attached to Project: Arch Linux
Opened by David White (dwhite54) - Sunday, 06 May 2018, 19:38 GMT
Last edited by Doug Newgard (Scimmia) - Tuesday, 08 May 2018, 03:20 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Jan de Groot (JGC)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


Python imports broken for all smbios-* commands in /usr/bin

After changing these two lines in each smbios-* command, things are fixed:

pythondir=os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "..", "python")
clidir=os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "..", "py-cli")

pythondir=os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "../share/smbios-utils")
clidir=os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "../share/smbios-utils")

Additional info:
* package version: latest
* config: default

Steps to reproduce:
$ pacman -S libsmbios
$ smbios-sys-info
Traceback (most recent call last):
File "/usr/bin/smbios-token-ctl", line 36, in <module>
import cli
ModuleNotFoundError: No module named 'cli'
This task depends upon

Comment by David White (dwhite54) - Sunday, 06 May 2018, 19:41 GMT
First bug and I already messed there a way to edit the summary after the bug report is created?
Or, if this must be done by someone else, please change the summary to "Python imports are pointing to wrong directory."
I would also be happy to change "package version" to "2.4.1-1"
Comment by deusstultus (deusstultus) - Sunday, 06 May 2018, 21:16 GMT
This was a bad build, substitutions did not occur for path or versions in these files. Bump pkgrel++ and rebuild should fix this. Tested on fresh chroot build date of post -10minutes.
Comment by David White (dwhite54) - Sunday, 06 May 2018, 22:06 GMT
That worked! Thanks.