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

@@ -1,5 +1,5 @@
/*-
* Copyright (c) 2011 Juan Romero Pardines.
* Copyright (c) 2011-2012 Juan Romero Pardines.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -87,7 +87,7 @@ check_pkg_requiredby(const char *pkgname, void *arg)
/*
* Check for pkgpattern match with real packages...
*/
if (!xbps_match_pkgpattern_in_array(curpkg_rdeps, pkgver)) {
if (!xbps_match_pkgdep_in_array(curpkg_rdeps, pkgver)) {
/*
* ... otherwise check if package provides any virtual
* package and is matched against any object in