Bug 1547503 - copr-frontend: copr-frontend requires both Python 2 and Python 3
Summary: copr-frontend: copr-frontend requires both Python 2 and Python 3
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: copr-frontend
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: clime
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3 PYTHON3-PYTHON2
TreeView+ depends on / blocked
 
Reported: 2018-02-21 13:00 UTC by Iryna Shcherbina
Modified: 2018-03-02 05:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-02 05:48:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Iryna Shcherbina 2018-02-21 13:00:15 UTC
The copr-frontend (1.127-1.fc28) RPM requires both Python 2 and Python 3:

$ dnf --disablerepo=* --enablerepo=rawhide repoquery --requires copr-frontend | grep python
/usr/bin/python2
/usr/bin/python3
...

This happened due to recently introduced shebangs mangling [0], and you might see the warnings in the build log:

> *** WARNING: mangling shebang in /usr/share/copr/coprs_frontend/run/generate_repo_packages.py from #!/usr/bin/python to #!/usr/bin/python2. This will become an ERROR, fix it manually!

The executable contains `#!/usr/bin/env python` shebang, which is forbidden by the guidelines and is automatically mangled to `#!/usr/bin/python2` during build. Please fix the shebang to be `#!/usr/bin/python3` explicitly [1] or remove the executable bit from the file if not needed.


If anything is unclear, or if you need any kind of assistance, you can
ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy
to help investigating or fixing this issue!

[0] https://pagure.io/packaging-committee/issue/738#comment-490366
[1] http://python-rpm-porting.readthedocs.io/en/latest/application-modules.html#fixing-shebangs

Comment 1 clime 2018-03-02 05:48:27 UTC
Hello, new COPR version has been released. This should be now fixed.


Note You need to log in before you can comment on or make changes to this bug.