libxbps: match required pkgdep by virtual pkg in a transaction.

This commit is contained in:
Juan RP 2012-02-28 20:39:10 +01:00
parent 8c6b335ca8
commit dc61fbed0e
2 changed files with 16 additions and 8 deletions

View File

@ -56,8 +56,8 @@
*/
#define XBPS_PKGINDEX_VERSION "1.4"
#define XBPS_API_VERSION "20120220"
#define XBPS_VERSION "0.13"
#define XBPS_API_VERSION "20120228"
#define XBPS_VERSION "0.14"
/**
* @def XBPS_RELVER

View File

@ -326,20 +326,28 @@ find_repo_deps(prop_dictionary_t transd, /* transaction dictionary */
}
}
/*
* Pass 2: check if required dependency was already added in
* the array of unsorted dependencies, and check if the pattern
* was matched.
* Pass 2:
* check if required dependency was already added
* in the transaction.
*
* 1/3: match any virtual pkg in configuration file.
*/
curpkgd = xbps_find_virtualpkg_conf_in_dict_by_pattern(
transd, "unsorted_deps", reqpkg);
if (curpkgd == NULL) {
/*
* Look for a real package matching pattern
* if no match.
* 2/3: match any virtual pkg in transaction.
*/
curpkgd = xbps_find_virtualpkg_in_dict_by_pattern(
transd, "unsorted_deps", reqpkg);
if (curpkgd == NULL) {
/*
* 3/3: match a real pkg in transaction.
*/
curpkgd = xbps_find_pkg_in_dict_by_pattern(
transd, "unsorted_deps", reqpkg);
}
}
if (curpkgd != NULL) {
prop_dictionary_get_cstring_nocopy(curpkgd,
"pkgver", &pkgver_q);