Page MenuHomeDevCentral

Provide Python 3 interpreter as python3 executable
ClosedPublic

Authored by dereckson on Jan 15 2024, 19:55.
Tags
None
Referenced Files
F3767351: D3288.diff
Fri, Nov 22, 23:43
F3765986: D3288.id8467.diff
Fri, Nov 22, 15:47
Unknown Object (File)
Tue, Nov 19, 17:30
Unknown Object (File)
Tue, Nov 19, 09:31
Unknown Object (File)
Tue, Nov 19, 01:36
Unknown Object (File)
Mon, Nov 18, 17:34
Unknown Object (File)
Sat, Nov 16, 02:20
Unknown Object (File)
Wed, Nov 13, 10:55
Subscribers
None

Details

Summary

On FreeBSD, in scenarri where the metaport python3 is missing,
and only python3xx packages are installed, the python3 symlink can be absent.

As our scripts generally use #!/usr/bin/env python3 and not a precise shebang
targetting a specific version of Python 3, python3 should exist and be linked
to the version used by system dependencies.

This fix picks the lower version, as packages tend to be shown in that order.

Test Plan

salt -G 'os:freebsd' state.apply hotfixes/python3

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
SeverityLocationCodeMessage
Advicehotfixes/files/alias-python3-interpreter.sh:14SC2086SHELLCHECK
Advicehotfixes/files/alias-python3-interpreter.sh:19SC2086SHELLCHECK
Unit
No Test Coverage
Branch
fix-python3
Build Status
Buildable 5205
Build 5486: arc lint + arc unit