libxbps: make xbps_find_virtualpkg_* only look for virtual pkgs.
Before this commit they also looked for non virtual packages, which is not what it was meant when those functions were added.
This commit is contained in:
13
lib/util.c
13
lib/util.c
@ -68,11 +68,14 @@ xbps_check_is_installed_pkg_by_pattern(const char *pattern)
|
||||
|
||||
dict = xbps_find_virtualpkg_dict_installed(pattern, true);
|
||||
if (dict == NULL) {
|
||||
if (errno == ENOENT) {
|
||||
errno = 0;
|
||||
return 0; /* not installed */
|
||||
}
|
||||
return -1; /* error */
|
||||
dict = xbps_find_pkg_dict_installed(pattern, true);
|
||||
if (dict == NULL) {
|
||||
if (errno == ENOENT) {
|
||||
errno = 0;
|
||||
return 0; /* not installed */
|
||||
}
|
||||
return -1; /* error */
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Check that package state is fully installed, not
|
||||
|
Reference in New Issue
Block a user