Opened 4 years ago
Last modified 4 years ago
#16655 new enhancement
[pkgman] show package a file belongs to
Reported by: | diver | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Applications/Command Line Tools | Version: | R1/beta2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
At first I though pkgman belongs
could be good choice but then I though why pkgman can't be smart enough and show package name if it was invoked with a file path, e.g.:
pkgman /system/Tracker /system/Tracker belongs to /system/packages/haiku-r1~beta2_hrev54767-1-x86_64.hpkg
Change History (6)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
that would conflict a bit if any file conflicts with a pkgman command, like a repository could have a file named "install" that could end up in a package
comment:3 by , 4 years ago
The advantage of using a command word for this feature is improved discoverability. You wouldn't really know that pkgman could show the package some file belongs to. If, OTOH, you have a command option like "origin" that is described in pkgman --help
, you can learn about it.
follow-up: 6 comment:4 by , 4 years ago
You don't need to use pkgman for this, you can just use attributes: catattr SYS:PACKAGE <file>
will do the trick.
comment:5 by , 4 years ago
I made Tracker add-on that show package file for selected file in package. I can upload it on HaikuUtils.
comment:6 by , 4 years ago
Replying to waddlesplash:
You don't need to use pkgman for this, you can just use attributes:
catattr SYS:PACKAGE <file>
will do the trick.
Yes, I know that, but having it inside a single pkgman is easier for the user. This is also implemented in other package managers: dpkg -S /bin/sh
and rpm -qf /bin/sh
. So it seems logical to have it in pkgman but with easier syntax.
I guess for easier scripting
/system/Tracker belongs to
could be omitted.