Bug 1213724 - python2 update sets /usr/bin/python link to 2.7
Summary: python2 update sets /usr/bin/python link to 2.7
Status: RESOLVED INVALID
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Python (show other bugs)
Version: Leap 15.4
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Python maintainers (group account)
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-27 15:39 UTC by Robert Simai
Modified: 2023-07-28 07:11 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Simai 2023-07-27 15:39:08 UTC
Current update python-base-2.7.18-150000.51.1.x86_64.rpm sets the /usr/bin/python link to python2.7, even though it typically points to python3.6, which makes python3 scripts fail.

Expected: the package shouldn't touch the symbolic link but leave it as is.
Comment 1 Dominique Leuenberger 2023-07-27 16:10:19 UTC
I don't think this is accurate:

/usr/bin/python has in no (open)SUSE distro been pointing to python 3.x but was always python 2.x

This on line with PEP 394
https://peps.python.org/pep-0394/#history-of-this-pep (granted, current version reads a bit different than the historic ones - but we never followed the new interpretation)
Comment 2 Steve Kowalik 2023-07-28 04:54:05 UTC
Indeed, python3 has never touched the /usr/bin/python symlink, and we have never moved in that direction -- a large number of build systems still in use assume /usr/bin/python is Python 2. If you've changed the symlink, then sure, you can do that, but the packaging system may decide you're wrong and move it back. :-)
Comment 3 Steve Kowalik 2023-07-28 04:57:06 UTC
Marking as invalid.
Comment 4 Robert Simai 2023-07-28 07:11:45 UTC
I see your reasons, even though I doubt this is still a good default and to check the link and leave it as is may be more appropriate nowadays. In any case and if no one else complains, many thanks for the swift response and clarification!