Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

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!
Tasklist

FS#79141 - [calibre] shebang line for executables

Attached to Project: Arch Linux
Opened by Kale Kundert (kalekundert) - Wednesday, 19 July 2023, 05:30 GMT
Last edited by Caleb Maclennan (alerque) - Tuesday, 15 August 2023, 03:06 GMT
Task Type General Gripe
Category Packages: Extra
Status Closed
Assigned To Caleb Maclennan (alerque)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

All of the non-binary executables installed by the calibre package (e.g. `/usr/bin/calibre`, `/usr/bin/ebook-viewer`, etc.) are installed with a `#!/usr/bin/env python3` shebang line. I believe that this should be `#!/usr/bin/python3` instead, because the user may have their own installation of python earlier in $PATH, and if so, it won't necessarily have all the dependencies installed that calibre requires.

I assume that this is a packaging bug and not an upstream bug, since the correct path to the python interpreter might vary between distributions. But let me know if I'm wrong; I don't have any familiarity with packaging, and I'd be happy to open an upstream bug if appropriate.


This task depends upon

Closed by  Caleb Maclennan (alerque)
Tuesday, 15 August 2023, 03:06 GMT
Reason for closing:  Won't implement
Comment by Toolybird (Toolybird) - Wednesday, 19 July 2023, 07:29 GMT
That's how it comes from upstream. There is nothing in the Arch Python package guidelines [1] against the current setup. It works for just about everybody.

python shebang style has come up *many* times in the past. Some even consider this a feature [2]. There are many ways to setup python virtual environments without messing up your system [3].

[1] https://wiki.archlinux.org/title/Python_package_guidelines
[2] https://lists.archlinux.org/pipermail/arch-general/2012-April/026205.html
[3] https://wiki.archlinux.org/title/Python
Comment by Kale Kundert (kalekundert) - Wednesday, 19 July 2023, 16:21 GMT
Regarding [3], I read the article, but I didn't see any way to put a virtual environment ahead of `/usr/bin/python` in $PATH without breaking calibre. Am I missing something?
Comment by Caleb Maclennan (alerque) - Tuesday, 15 August 2023, 03:05 GMT
If you put some python in your PATH *before* the system one, you should expect the system to use in cases like this and are expected to make it compatible. Optionally execute Calibre from a shell that doesn't have a messed up partial virtual environment that doesn't do what the system expects python to do. Sorry but I don't see how monkeying with this is going to improve things for anybody and in some cases it might make it worse.

Loading...