Small speed-tuning to upgrade-checkdep

Posted on the ML here:
http://archlinux.org/pipermail/pacman-dev/2007-April/008131.html

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Nagy Gabor 2007-06-10 01:32:29 +02:00 committed by Dan McGee
parent 97ba9c9227
commit 0436601224
1 changed files with 6 additions and 4 deletions

View File

@ -233,14 +233,16 @@ alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op,
for(j = alpm_pkg_get_requiredby(oldpkg); j; j = j->next) {
pmpkg_t *p;
found = 0;
if(_alpm_pkg_find(j->data, packages)) {
/* this package also in the upgrade list, so don't worry about it */
continue;
}
if((p = _alpm_db_get_pkgfromcache(db, j->data)) == NULL) {
/* hmmm... package isn't installed.. */
continue;
}
if(_alpm_pkg_find(alpm_pkg_get_name(p), packages)) {
/* this package also in the upgrade list, so don't worry about it */
continue;
}
for(k = alpm_pkg_get_depends(p); k; k = k->next) {
/* don't break any existing dependencies (possible provides) */
pmdepend_t *depend = alpm_splitdep(k->data);