Bug 2018615

Summary: %py3_check_import does nothing and succeeds when %py3_shebang_flags is %nil
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-rpm-macrosAssignee: Karolina Surma <ksurma>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, j, ksurma, m.cyprian, mhroncok, python-maint, python-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-rpm-macros-3.10-13.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-03 11:11:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Miro Hrončok 2021-10-29 23:22:36 UTC
Description of problem:
When %py3_shebang_flags is %nil, %py3_check_import evals to:

...
/usr/bin/python3 - /usr/lib/rpm/redhat/import_all_modules.py
...

And hence it executes no code.

When %py3_shebang_flags is undefined, %py3_check_import evals to:

...
/usr/bin/python3 -%{py3_shebang_flags} /usr/lib/rpm/redhat/import_all_modules.py
...

And hence fails.

The -%{py3_shebang_flags} flag should be conditionalized on %{?py3_shebang_flags} non-emptines. %py3_shebang_fix already does something like that.

Version-Release number of selected component (if applicable): 
python-rpm-macros-3.9-19.fc33
python-rpm-macros-3.9-40.fc34
python-rpm-macros-3.10-9.fc35
python-rpm-macros-3.10-12.fc36

Comment 2 Fedora Update System 2021-11-03 11:10:06 UTC
FEDORA-2021-70e7a5dae0 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2021-70e7a5dae0

Comment 3 Fedora Update System 2021-11-03 11:11:48 UTC
FEDORA-2021-70e7a5dae0 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.