On Fri, Dec 16, 2022 at 12:45 PM Johannes Kastl <kastl@b1-systems.de> wrote:
Hi all,
TL;DR: Ist it possible to disable the automatic detection of RPM dependencies from shebangs? Maybe only for some files?
Ansible is now including lots of collections, most of them are using a "#!/usr/bin/python" or "#!/usr/bin/python3" shebang.
I modified the shebang for all of them to not have python2 as a dependency for the ansible package.
Turns out, some of those python files in the collections need to have a python shebang (not python3), e.g. the zypper module. If I change that to python3, it does not work when managing SLES12 targets (as the python3 is too old on SLES12). But python2 is working for SLES12 targets. If I do not modify the shebang, the ansible package wants to install python2 as a dependency due to the automatic detection
Can I override this? Can I somehow only ignore the dependency for python2 aka python? And leave all other dependency detections in place? Or maybe just ignore some files during dependency detection?
There's an RPM feature to filter out dependency generation in certain file/folder locations: https://docs.fedoraproject.org/en-US/packaging-guidelines/AutoProvidesAndReq... -- 真実はいつも一つ!/ Always, there's only one truth!