libxbps: remove xbps_find_pkg_dict_from_plist_by_xxx (unused).
This commit is contained in:
parent
e9945dc345
commit
fa73de309f
@ -56,7 +56,7 @@
|
||||
*/
|
||||
#define XBPS_PKGINDEX_VERSION "1.5"
|
||||
|
||||
#define XBPS_API_VERSION "20120603"
|
||||
#define XBPS_API_VERSION "20120604"
|
||||
#define XBPS_VERSION "0.16"
|
||||
|
||||
/**
|
||||
@ -952,39 +952,6 @@ prop_dictionary_t xbps_find_virtualpkg_in_dict_by_name(prop_dictionary_t d,
|
||||
prop_dictionary_t xbps_find_virtualpkg_in_dict_by_pattern(prop_dictionary_t d,
|
||||
const char *key,
|
||||
const char *pattern);
|
||||
/**
|
||||
* Finds the package's proplib dictionary in a plist file by specifying
|
||||
* a package name.
|
||||
*
|
||||
* @param[in] plist Path to a plist file.
|
||||
* @param[in] key Proplib array's key name.
|
||||
* @param[in] pkgname Package name to match in array.
|
||||
*
|
||||
* @return The package's proplib dictionary on success, NULL otherwise and
|
||||
* errno is set appropiately.
|
||||
* @note When returned dictionary is no longer needed, it must be released
|
||||
* with prop_object_release(3).
|
||||
*/
|
||||
prop_dictionary_t xbps_find_pkg_dict_from_plist_by_name(const char *plist,
|
||||
const char *key,
|
||||
const char *pkgname);
|
||||
|
||||
/**
|
||||
* Finds the package's proplib dictionary in a plist file by specifying
|
||||
* a package pattern.
|
||||
*
|
||||
* @param[in] plist Path to a plist file.
|
||||
* @param[in] key Proplib array's key name.
|
||||
* @param[in] pattern Package pattern to match in array.
|
||||
*
|
||||
* @return The package's proplib dictionary on success, NULL otherwise and
|
||||
* errno is set appropiately.
|
||||
* @note When returned dictionary is no longer needed, it must be released
|
||||
* with prop_object_release(3).
|
||||
*/
|
||||
prop_dictionary_t xbps_find_pkg_dict_from_plist_by_pattern(const char *plist,
|
||||
const char *key,
|
||||
const char *pattern);
|
||||
|
||||
/**
|
||||
* Finds a package's dictionary searching in the registered packages
|
||||
|
@ -344,53 +344,6 @@ xbps_find_virtualpkg_conf_in_dict_by_pattern(prop_dictionary_t d,
|
||||
return find_virtualpkg_user_in_dict(d, key, pattern, true);
|
||||
}
|
||||
|
||||
static prop_dictionary_t
|
||||
find_pkg_dict_from_plist(const char *plist,
|
||||
const char *key,
|
||||
const char *str,
|
||||
bool bypattern)
|
||||
{
|
||||
prop_dictionary_t dict, obj, res;
|
||||
|
||||
assert(plist != NULL);
|
||||
assert(str != NULL);
|
||||
|
||||
dict = prop_dictionary_internalize_from_zfile(plist);
|
||||
if (dict == NULL) {
|
||||
xbps_dbg_printf("cannot internalize %s for pkg %s: %s",
|
||||
plist, str, strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
obj = find_virtualpkg_user_in_dict(dict, key, str, bypattern);
|
||||
if (obj == NULL) {
|
||||
obj = find_pkg_in_dict(dict, key, str, bypattern, true);
|
||||
if (obj == NULL) {
|
||||
prop_object_release(dict);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
res = prop_dictionary_copy(obj);
|
||||
prop_object_release(dict);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
prop_dictionary_t
|
||||
xbps_find_pkg_dict_from_plist_by_name(const char *plist,
|
||||
const char *key,
|
||||
const char *pkgname)
|
||||
{
|
||||
return find_pkg_dict_from_plist(plist, key, pkgname, false);
|
||||
}
|
||||
|
||||
prop_dictionary_t
|
||||
xbps_find_pkg_dict_from_plist_by_pattern(const char *plist,
|
||||
const char *key,
|
||||
const char *pattern)
|
||||
{
|
||||
return find_pkg_dict_from_plist(plist, key, pattern, true);
|
||||
}
|
||||
|
||||
static prop_dictionary_t
|
||||
find_pkgd_installed(const char *str, bool bypattern, bool virtual)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user