Bug 278787 - Mk/Uses/zip.mk: Add switch for (bsd)tar
Summary: Mk/Uses/zip.mk: Add switch for (bsd)tar
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-05 14:42 UTC by Daniel Engberg
Modified: 2024-05-05 15:13 UTC (History)
3 users (show)

See Also:


Attachments
Patch for Mk/Uses/zip.mk (904 bytes, patch)
2024-05-05 14:42 UTC, Daniel Engberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2024-05-05 14:42:31 UTC
Created attachment 250461 [details]
Patch for Mk/Uses/zip.mk

Teach zip helper about (bsd)tar for consistency and remove the need to define EXTRACT_SUFX
Comment 1 Gleb Popov freebsd_committer freebsd_triage 2024-05-05 14:45:20 UTC
What are use cases for this?
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2024-05-05 14:52:00 UTC
It would be nice for  consistency in cases like these: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278745

I've actually submitted a bunch of patches recently to reduce I/O for a bunch of ports, a rough estimate would be around 2-3Gbyte or so in total if applied.
Comment 3 Gleb Popov freebsd_committer freebsd_triage 2024-05-05 14:54:19 UTC
I mean, the port shouldn't really care if we're using bsdtar or not? Why have a special USES argument for this?
Comment 4 Daniel Engberg freebsd_committer freebsd_triage 2024-05-05 14:56:43 UTC
It doesn't but its nice for consistency to be able to use the same syntax such as in EXTRACT_AFTER_ARGS irregardless of typo of archive whenever possible (I'm aware the some archives needs unzip/infozip).

Another use-case, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278779
Comment 5 Gleb Popov freebsd_committer freebsd_triage 2024-05-05 15:01:01 UTC
Can't we just automatically switch to bsdtar whenever possible inside zip.mk, without requiring a port to specify :bsdtar argument? If I understand it correctly, it is just a matter of testing OSVERSION or even .if exists() ?
Comment 6 Daniel Engberg freebsd_committer freebsd_triage 2024-05-05 15:13:46 UTC
From what I recall it's a POLA issue as bsdtar doesn't share the same syntax as unzip and/or infozip?