Added xbps_match_pkgdep_in_array() to match a pkgdep against pkgpatterns.

This fixes xbps_match_pkgpattern_in_array() which had the args swapped
in xbps_pkgpattern_match() resulting in inverted results while resolving
virtual packages in a transaction.
This commit is contained in:
Juan RP
2012-01-16 15:50:06 +01:00
parent ffa48b2cf3
commit 4164573b35
3 changed files with 29 additions and 5 deletions

View File

@@ -56,7 +56,7 @@
*/
#define XBPS_PKGINDEX_VERSION "1.3"
#define XBPS_API_VERSION "20120116"
#define XBPS_API_VERSION "20120116-1"
#define XBPS_VERSION "0.12"
/**
@@ -1043,6 +1043,17 @@ bool xbps_match_pkgname_in_array(prop_array_t array, const char *pkgname);
*/
bool xbps_match_pkgpattern_in_array(prop_array_t array, const char *pattern);
/**
* Match a package dependency against any package pattern in the specified
* array of strings.
*
* @param[in] array The proplib array where to look for.
* @param[in] pkgver The package name-version tuple to match.
*
* @return true on success, false otherwise and errno is set appropiately.
*/
bool xbps_match_pkgdep_in_array(prop_array_t array, const char *pkgver);
/**
* Match a string (exact match) in the specified array of strings.
*