From 9a84f6ca501492441948a5c22ce73416f5a817f3 Mon Sep 17 00:00:00 2001 From: Nagy Gabor <ngaba@bibl.u-szeged.hu> Date: Sat, 5 Jul 2008 13:06:02 +0200 Subject: [PATCH] Remove alpm_find_pkg_satisfiers and _alpm_find_dep_satisfiers After sync_addtarget reworks, these functions weren't used. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> --- lib/libalpm/alpm.h | 1 - lib/libalpm/deps.c | 26 -------------------------- lib/libalpm/deps.h | 1 - 3 files changed, 0 insertions(+), 28 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 9ed2c67..fbef057 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -433,7 +433,6 @@ int alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep); alpm_list_t *alpm_checkdeps(pmdb_t *db, int reversedeps, alpm_list_t *remove, alpm_list_t *upgrade); alpm_list_t *alpm_deptest(pmdb_t *db, alpm_list_t *targets); -alpm_list_t *alpm_find_pkg_satisfiers(alpm_list_t *pkgs, const char *pkgname); const char *alpm_miss_get_target(const pmdepmissing_t *miss); pmdepend_t *alpm_miss_get_dep(pmdepmissing_t *miss); diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index e042166..b58deea 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -202,32 +202,6 @@ pmpkg_t *_alpm_find_dep_satisfier(alpm_list_t *pkgs, pmdepend_t *dep) return(NULL); } -alpm_list_t *_alpm_find_dep_satisfiers(alpm_list_t *pkgs, pmdepend_t *dep) -{ - alpm_list_t *i, *ret = NULL; - - for(i = pkgs; i; i = alpm_list_next(i)) { - pmpkg_t *pkg = i->data; - if(alpm_depcmp(pkg, dep)) { - ret = alpm_list_add(ret, pkg); - } - } - return(ret); -} - -/** Find packages in a list that provide a given package. - * @param pkgs an alpm_list_t* of package to search - * @param pkgname the name of the package - * @return an alpm_list_t* of packages that provide pkgname - */ -alpm_list_t SYMEXPORT *alpm_find_pkg_satisfiers(alpm_list_t *pkgs, const char *pkgname) -{ - pmdepend_t *dep = _alpm_splitdep(pkgname); - alpm_list_t *res = _alpm_find_dep_satisfiers(pkgs, dep); - _alpm_dep_free(dep); - return(res); -} - /** Checks dependencies and returns missing ones in a list. * Dependencies can include versions with depmod operators. * @param db pointer to the local package database diff --git a/lib/libalpm/deps.h b/lib/libalpm/deps.h index 0b93951..6cd4c63 100644 --- a/lib/libalpm/deps.h +++ b/lib/libalpm/deps.h @@ -53,7 +53,6 @@ int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, alpm_list_t *list, int _alpm_dep_edge(pmpkg_t *pkg1, pmpkg_t *pkg2); pmdepend_t *_alpm_splitdep(const char *depstring); pmpkg_t *_alpm_find_dep_satisfier(alpm_list_t *pkgs, pmdepend_t *dep); -alpm_list_t *_alpm_find_dep_satisfiers(alpm_list_t *pkgs, pmdepend_t *dep); #endif /* _ALPM_DEPS_H */ -- 1.5.6.1