[Starlingx-discuss] MultiOS: call of python via #!/usr/bin/env

Dominig ar Foll (Intel Open Source) dominig.arfoll at fridu.net
Wed Sep 11 09:06:52 UTC 2019


We have a error raised by the Open Build System from OpenSUSE (OBS) due
to the use of "#!/usr/bin/env" as interpreter.
This stops the OBS to correctly detect dependencies.
The use of /usr/bin/env is tricky as it creates an undefined  build/run
dependency on the target.

Could someone explains why such trick is used ?
I would need to get rid of it. Just want to find what will be required
to be changed.

If this is just to call python2 then #!/usr/bin/python2 would do.


Dominig ar Foll
Senior Software Architect
Intel Open Source Technology Centre

[   10s] worker-utils.noarch: E: env-script-interpreter (Badness: 9) /usr/bin/topology.py /usr/bin/env python
[   10s] This script uses 'env' as an interpreter. For the rpm runtime dependency
[   10s] detection to work, the shebang #!/usr/bin/env python  needs to be patched into
[   10s] #!/usr/bin/python  otherwise the package dependency generator merely adds a
[   10s] dependency on /usr/bin/env rather than the actual interpreter /usr/bin/python.
[   10s] Alternatively, if the file should not be executed, then ensure that it is not
[   10s] marked as executable or don't install it in a path that is reserved for
[   10s] executables.

More information about the Starlingx-discuss mailing list