libxbps: separate virtualpkg conf stuff from repository_pool_find_pkg.
Now to find a virtualpkg set by the user in conf file, there is a new function: xbps_repository_pool_find_virtualpkg(). Use it in some places to make jpeg -> libjpeg-turbo (and other pkgs that can be replaced with other virtual pkgs) work correctly even if installed multiple times.
This commit is contained in:
@@ -87,10 +87,14 @@ repository_find_pkg(const char *pattern, const char *reason)
|
||||
pkg_repod = xbps_repository_pool_find_pkg(pattern,
|
||||
bypattern, bestpkg);
|
||||
if (pkg_repod == NULL) {
|
||||
/* not found */
|
||||
rv = errno;
|
||||
errno = 0;
|
||||
goto out;
|
||||
pkg_repod = xbps_repository_pool_find_virtualpkg(pattern,
|
||||
bypattern, bestpkg);
|
||||
if (pkg_repod == NULL) {
|
||||
/* not found */
|
||||
rv = errno;
|
||||
errno = 0;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Prepare transaction dictionary and missing deps array.
|
||||
|
Reference in New Issue
Block a user