Bug 262358 - Uses/shebangfix.mk runs before distribution patching (PATCH_SITES)
Summary: Uses/shebangfix.mk runs before distribution patching (PATCH_SITES)
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-05 14:21 UTC by Charlie Li
Modified: 2022-03-05 19:37 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Li freebsd_committer freebsd_triage 2022-03-05 14:21:45 UTC
In my original patch for bug 258112, a file gets processed with USES=shebangfix properly, but the same file also has a PATCH_SITES/PATCHFILES that obliterates the shebangfix (changes the shebang from python to python3). The .orig shows the shebangfix applied. This probably needs to run during post-patch or similar.
Comment 1 Antoine Brodin freebsd_committer freebsd_triage 2022-03-05 19:12:57 UTC
You can use TARGET_ORDER_OVERRIDE for this.
Comment 2 Charlie Li freebsd_committer freebsd_triage 2022-03-05 19:25:39 UTC
Sure, if I understand the default target order with 210:fix-shebang, which is before even 300:pre-patch. Is there any particular reason to have fix-shebang in this order by default? Upstream commits/patches that we need to pull in lieu of new releases can and will change shebangs (ie to signify only one version family of an interpreter) and they should be accounted for after do-patch.
Comment 3 Charlie Li freebsd_committer freebsd_triage 2022-03-05 19:37:25 UTC
A quick search of TARGET_ORDER_OVERRIDE reveals nine uses, three of which concern fix-shebang. All fix-shebang cases override the default order to run after do-patch.