rpool: improve the order while resolving dependencies.

See the NEWS file for more information. After that change you don't have
to set a virtual pkg in conf file, if required virtual pkg is in rpool.
This commit is contained in:
Juan RP
2012-05-30 10:22:53 +02:00
parent fa7bee1164
commit da4b8b7427
5 changed files with 152 additions and 91 deletions

View File

@ -84,16 +84,13 @@ transaction_find_pkg(const char *pkg, bool bypattern, bool bestpkg, int action)
/*
* Find out if the pkg has been found in repository pool.
*/
pkg_repod = xbps_repository_pool_find_pkg(pkg, bypattern, bestpkg);
if (pkg_repod == NULL) {
pkg_repod =
xbps_repository_pool_find_virtualpkg(pkg, bypattern);
if (pkg_repod == NULL) {
/* not found */
rv = errno;
errno = 0;
goto out;
}
if (((pkg_repod = xbps_repository_pool_find_virtualpkg_conf(pkg, bypattern)) == NULL) &&
((pkg_repod = xbps_repository_pool_find_pkg(pkg, bypattern, bestpkg)) == NULL) &&
((pkg_repod = xbps_repository_pool_find_virtualpkg(pkg, bypattern)) == NULL)) {
/* not found */
rv = errno;
errno = 0;
goto out;
}
prop_dictionary_get_cstring_nocopy(pkg_repod, "pkgver", &pkgver);
prop_dictionary_get_cstring_nocopy(pkg_repod, "repository", &repoloc);