apk info --provides does not work
It seems like the apk info —provides option is totally ignored.
$ apk info --provides openrc
openrc-0.10.5-r0 description:
OpenRC manages the services, startup and shutdown of a host
openrc-0.10.5-r0 webpage:
http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git
openrc-0.10.5-r0 installed size:
712704
openrc-0.10.5-r0 description:
OpenRC manages the services, startup and shutdown of a host
openrc-0.10.5-r0 webpage:
http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git
openrc-0.10.5-r0 installed size:
712704
I think it has to do with the short -p option is gettin overridden by the global —root/-p option.
This seems to fix it. Not sure what to use for id.
--- a/src/info.c
+++ b/src/info.c
@@ -427,7 +427,7 @@ static int info_parse(void *ctx, struct apk_db_options *dbop
case 'R':
ictx->subaction_mask |= APK_INFO_DEPENDS;
break;
- case 'p':
+ case 0x10001:
ictx->subaction_mask |= APK_INFO_PROVIDES;
break;
case 'r':
@@ -489,7 +489,7 @@ static struct apk_option info_options[] = {
{ 'e', "installed", "Check if PACKAGE is installed" },
{ 'W', "who-owns", "Print the package owning the specified file" },
{ 'R', "depends", "List packages that the PACKAGE depends on" },
- { 'p', "provides", "List virtual packages provided by PACKAGE" },
+ { 0x10001, "provides", "List virtual packages provided by PACKAGE" },
{ 'r', "rdepends", "List all packages depending on PACKAGE" },
{ 0x10000, "replaces", "List packages whom files PACKAGE might replace"
{ 'i', "install-if", "List the PACKAGE's install-if rule" },
(from redmine: issue id 1396, created on 2012-09-19, closed on 2012-10-02)
- Changesets:
- Revision 4b7b5d46 by Natanael Copa on 2012-09-28T07:25:30Z:
info: --provides alias -p is reserved for --root, use -P
fixes #1396
- Revision 8d6945855c1fb5aa2871b33504c2a715c4d54e35 by Natanael Copa on 2012-10-01T19:06:31Z:
main/apk-tools: fix apk info --provides, add --progress-fd
ref #1396