When sorting packages also look for virtual packages.

A new function xbps_find_virtual_pkg_in_dict() has been made public
to the API to make this find duplicate packages in the transaction
when updating packages.
This commit is contained in:
Juan RP
2011-01-28 20:56:28 +01:00
parent 76a641794b
commit 463d182c49
3 changed files with 33 additions and 8 deletions

View File

@ -53,7 +53,7 @@
* @def XBPS_RELVER
* Current library release date.
*/
#define XBPS_RELVER "20110127"
#define XBPS_RELVER "20110128"
/**
* @def XBPS_META_PATH
@ -460,6 +460,22 @@ prop_dictionary_t xbps_find_pkg_dict_from_plist_by_name(const char *plist,
prop_dictionary_t xbps_find_pkg_dict_installed(const char *str,
bool bypattern);
/**
* Finds a virtual package by looking at package's dictionary by
* using a package name or a package pattern.
*
* @param[in] pkgd Package dictionary.
* @param[in] str Virtual package name or package pattern.
* @param[in] bypattern If true, \a str should be a package name,
* otherwise it should be a package pattern.
*
* @return True if package dictionary matches the virtual package
* name or pattern, false otherwise.
*/
bool xbps_find_virtual_pkg_in_dict(prop_dictionary_t pkgd,
const char *str,
bool bypattern);
/**
* Finds a package name matching an string object in a proplib array.
*