index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Nagy Gabor <ngaba@bibl.u-szeged.hu> | 2008-07-01 22:53:13 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-07-07 21:04:16 -0500 |
commit | f7199f36ba5a2b42da51cd227855caaa43c51d58 (patch) | |
tree | e2b6a461fdde5e0bb480c9650cbf93361def7ec0 /lib/libalpm/package.c | |
parent | 2122eb1428ac754e9f5d675b4c4fa62b0286d3b6 (diff) |
-rw-r--r-- | lib/libalpm/package.c | 16 |
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 79cc64e5..124d89a0 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -540,7 +540,7 @@ unsigned short SYMEXPORT alpm_pkg_has_scriptlet(pmpkg_t *pkg) */ alpm_list_t SYMEXPORT *alpm_pkg_compute_requiredby(pmpkg_t *pkg) { - const alpm_list_t *i, *j; + const alpm_list_t *i; alpm_list_t *reqs = NULL; pmdb_t *localdb = alpm_option_get_localdb(); @@ -549,17 +549,9 @@ alpm_list_t SYMEXPORT *alpm_pkg_compute_requiredby(pmpkg_t *pkg) continue; } pmpkg_t *cachepkg = i->data; - const char *cachepkgname = alpm_pkg_get_name(cachepkg); - - for(j = alpm_pkg_get_depends(cachepkg); j; j = j->next) { - pmdepend_t *dep = j->data; - - if(alpm_depcmp(pkg, dep)) { - _alpm_log(PM_LOG_DEBUG, "adding '%s' in requiredby field for '%s'\n", - cachepkgname, pkg->name); - reqs = alpm_list_add(reqs, strdup(cachepkgname)); - break; - } + if(_alpm_dep_edge(cachepkg, pkg)) { + const char *cachepkgname = alpm_pkg_get_name(cachepkg); + reqs = alpm_list_add(reqs, strdup(cachepkgname)); } } return(reqs); |