FS#67183 - Please add notice about calibre-alternatives when installing calibre-python3

Attached to Project: Community Packages
Opened by B. F. Goodger (goodger) - Friday, 03 July 2020, 12:43 GMT
Last edited by Eli Schwartz (eschwartz) - Friday, 03 July 2020, 17:28 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Eli Schwartz (eschwartz)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Upon installing community/calibre-python3 and then removing community/calibre, launching Calibre from its .desktop file does not work.

Investigating showed that:
* /usr/bin/calibre, provided by calibre-common, is symlinked to /usr/lib/calibre/bin/calibre;
* /usr/lib/calibre/bin/calibre does not exist;
* /usr/lib/calibre/bin is symlinked to /usr/lib/calibre/bin-py2;
* after removing and reinstalling calibre-python3, /usr/lib/calibre/bin is now symlinked to /usr/lib/calibre/bin-py3.

Apparently, because calibre-python3 was installed alongside calibre, the former's install script found the existing symlink and did not alter it. I think that is correct behaviour. However, in this case, it led to unexpected behaviour.

I think the install script for one or more of the Calibre packages should be updated to help with this. For instance, a message along the lines of
:: Python 2 is the current Calibre runtime. Use `sudo calibre-alternatives set 3` to select the Python 3 runtime.
would have been extremely helpful.

Thanks.

Additional info:
* Package version: 4.19.0-1 (calibre-common & -python3)
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Friday, 03 July 2020, 17:28 GMT
Reason for closing:  Fixed
Additional comments about closing:  calibre 4.20.0-1
Comment by Eli Schwartz (eschwartz) - Friday, 03 July 2020, 17:28 GMT
The notice is originally printed when installing calibre-common, not for each of calibre/calibre-python3.

The problem here is that removing one doesn't force the selection to be recalculated. I've added a post_remove cleanup which removes the broken symlink and resets it. No need to manually fix it up.

(One day pacman will actually support this properly, for real, and I won't ever need to resort to this... hack. One day...)

Loading...