[Bug 284054] ports-mgmt/pkg: Does not recognize .pkg as a valid suffix (triggered by portupgrade)

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 15 Jan 2025 08:47:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284054

--- Comment #13 from Terry Kennedy <terry-freebsd@glaver.org> ---
(In reply to Mark Millard from comment #12)
I'm confused. It seems you are saying that regardless of what compression
format is selected, pkg outputs files with a .pkg extension which provides no
clue which format is used. (And that this is confusing.)

I agree that it can be confusing, but presumably all of the pkg tools can
figure it out. For people wanting to know what compression format was used to
create a given .pkg file, "file <somename>.pkg" should report that info.

I don't see how that relates to silencing a warning for the specific case of
"-f pkg" in portupgrade, since portupgrade will be around for at least nearly 4
years (remaining life of 14) and perhaps longer if it goes through the normal
deprecation (15) and removal (16) cycle. Particularly since it will eliminate a
warning that is also confusing 8-}

You also raise a valid point that if "txz" is not the default format, then
assuming txz would not be be the best case and "tzst" should be assumed
instead. That just changes where the .pkg case could be added.

But I should point out (as you did in comment 12) that "man pkg-create" (pkg
pkg-1.21.3, the current version in the ports tree), under the description of
the -f option, says "If an invalid or no format is specified txz is assumed."
So we seem to also have a manpage-vs-reality discrepancy in pkg here.

Regarding your comment that it would not track tools that are not being
updated, I think the only thing that (incorrectly) uses "-f pkg" is
portupgrade, which is how we got here.

If there's no desire to change this on the pkg side, I could submit a patch for
portupgrade if somebody is willing to commit it.

-- 
You are receiving this mail because:
You are the assignee for the bug.