Bug 285914 - ports-mgmt/pkg_tree: Gets confused with pkg 2.1.0
Summary: ports-mgmt/pkg_tree: Gets confused with pkg 2.1.0
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-06 10:27 UTC by Christian Ullrich
Modified: 2025-06-10 18:12 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (tatsuki_makino)


Attachments
Patch (589 bytes, patch)
2025-04-06 10:27 UTC, Christian Ullrich
no flags Details | Diff
patch for ports-mgmt/pkg_tree (support for shlib dependencies) (4.09 KB, patch)
2025-04-08 10:31 UTC, Tatsuki Makino
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ullrich 2025-04-06 10:27:06 UTC
Created attachment 259355 [details]
Patch

The recent update of ports-mgmt/pkg to version 2.1.0 added additional output to pkg info -d/-r in the form of shared library dependencies.

pkg_tree reads this output and is not prepared for either the headings or the dependency lines with parenthesized library names in them, and gets quite confused.

The simplest fix is to skip all the shlib-related output; patch attached. It applies on top of the existing patch-pkg__tree that apparently replaces half the file.
Comment 1 Tatsuki Makino 2025-04-08 10:31:40 UTC
Created attachment 259391 [details]
patch for ports-mgmt/pkg_tree (support for shlib dependencies)

(In reply to Christian Ullrich from comment #0)

Thank you for the patch.

I was thinking about trying to make it possible to display the dependencies of shlib when pkg was still at version 1.x, but I gave up because it was difficult :)
pkg-2.1.0 handles all those difficult (troublesome :) ) parts internally, so I also created a patch that gathers all of them together for use.
Is there demand for that feature?
It can be switched by providing the -l argument.
If necessary, let's commit this patch; if not, let's commit attachment 259355 [details] :)
Comment 2 Christian Ullrich 2025-04-08 13:32:21 UTC
If I read the patch right, the -l option would switch pkg_tree from operating on package names to operating on shared library names, and in either mode it would just ignore the respective other information, correct? (As opposed to detecting package dependencies by libraries contained in them, I mean.)

I would be very interested in that feature, yes.