xbps-query: added support to query virtual packages in repository mode.
This commit is contained in:
parent
7e171b67cf
commit
c50cbf03c7
7
NEWS
7
NEWS
@ -1,5 +1,12 @@
|
||||
xbps-0.21 (???):
|
||||
|
||||
* xbps-query(8): packages can be matched by using virtual package
|
||||
names in repository mode, i.e:
|
||||
|
||||
$ xbps-query -Rp pkgver ntp-daemon
|
||||
ntp-4.2.6p5_7
|
||||
$
|
||||
|
||||
* xbps-pkgdb(8): new option -m --mode to change package installation
|
||||
mode to auto (might be detected as orphan) or manual
|
||||
(explicitly installed).
|
||||
|
@ -73,8 +73,8 @@ repo_show_pkg_deps(struct xbps_handle *xhp, const char *pattern)
|
||||
{
|
||||
prop_dictionary_t pkgd;
|
||||
|
||||
pkgd = xbps_rpool_get_pkg(xhp, pattern);
|
||||
if (pkgd == NULL)
|
||||
if (((pkgd = xbps_rpool_get_pkg(xhp, pattern)) == NULL) &&
|
||||
((pkgd = xbps_rpool_get_virtualpkg(xhp, pattern)) == NULL))
|
||||
return errno;
|
||||
|
||||
(void)xbps_callback_array_iter_in_dict(xhp, pkgd,
|
||||
@ -126,9 +126,10 @@ repo_show_pkg_revdeps(struct xbps_handle *xhp, const char *pkg)
|
||||
if (xbps_pkg_version(pkg))
|
||||
pkgver = pkg;
|
||||
else {
|
||||
pkgd = xbps_rpool_get_pkg(xhp, pkg);
|
||||
if (pkgd == NULL)
|
||||
if (((pkgd = xbps_rpool_get_pkg(xhp, pkg)) == NULL) &&
|
||||
((pkgd = xbps_rpool_get_virtualpkg(xhp, pkg)) == NULL))
|
||||
return ENOENT;
|
||||
|
||||
prop_dictionary_get_cstring_nocopy(pkgd, "pkgver", &pkgver);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2008-2012 Juan Romero Pardines.
|
||||
* Copyright (c) 2008-2013 Juan Romero Pardines.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -295,8 +295,8 @@ repo_show_pkg_info(struct xbps_handle *xhp,
|
||||
{
|
||||
prop_dictionary_t pkgd;
|
||||
|
||||
pkgd = xbps_rpool_get_pkg(xhp, pattern);
|
||||
if (pkgd == NULL)
|
||||
if (((pkgd = xbps_rpool_get_pkg(xhp, pattern)) == NULL) &&
|
||||
((pkgd = xbps_rpool_get_virtualpkg(xhp, pattern)) == NULL))
|
||||
return errno;
|
||||
|
||||
if (option)
|
||||
|
Loading…
Reference in New Issue
Block a user