pkg_dependence_satisfied: remove unused function
authorAlejandro del Castillo <alejandro.delcastillo@ni.com>
Mon, 23 Nov 2015 19:48:42 +0000 (13:48 -0600)
committerJo-Philipp Wich <jo@mein.io>
Wed, 15 Mar 2017 01:35:56 +0000 (02:35 +0100)
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
libopkg/pkg_depends.c
libopkg/pkg_depends.h

index aa349873e35c310b961a2599e10782e170de7fc1..6979f14b5af9d2adb1ce05e48acb090505a55ec5 100644 (file)
@@ -422,34 +422,6 @@ int pkg_dependence_satisfiable(depend_t * depend)
        return 0;
 }
 
-int pkg_dependence_satisfied(depend_t * depend)
-{
-       abstract_pkg_t *apkg = depend->pkg;
-       abstract_pkg_vec_t *provider_apkgs = apkg->provided_by;
-       int n_providers = provider_apkgs->len;
-       abstract_pkg_t **apkgs = provider_apkgs->pkgs;
-       int i;
-       int n_pkgs;
-       int j;
-
-       for (i = 0; i < n_providers; i++) {
-               abstract_pkg_t *papkg = apkgs[i];
-               pkg_vec_t *pkg_vec = papkg->pkgs;
-               if (pkg_vec) {
-                       n_pkgs = pkg_vec->len;
-                       for (j = 0; j < n_pkgs; j++) {
-                               pkg_t *pkg = pkg_vec->pkgs[j];
-                               if (version_constraints_satisfied(depend, pkg)) {
-                                       if (pkg->state_status == SS_INSTALLED
-                                           || pkg->state_status == SS_UNPACKED)
-                                               return 1;
-                               }
-                       }
-               }
-       }
-       return 0;
-}
-
 static int is_pkg_in_pkg_vec(pkg_vec_t * vec, pkg_t * pkg)
 {
        int i;
index c051e51037ed44533b6566013ee6434fb5953354..af897b239d037cc608b96484731b5e4c55e16792 100644 (file)
@@ -92,7 +92,6 @@ int pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t * depends,
                                            char ***unresolved);
 pkg_vec_t *pkg_hash_fetch_conflicts(pkg_t * pkg);
 int pkg_dependence_satisfiable(depend_t * depend);
-int pkg_dependence_satisfied(depend_t * depend);
 const char *constraint_to_str(enum version_constraint c);
 
 compound_depend_t *pkg_get_depends(pkg_t *pkg, enum depend_type type);