Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@petra.hos.u-szeged.hu>2007-06-10 01:32:29 +0200
committerDan McGee <dan@archlinux.org>2007-06-10 17:31:18 -0400
commit043660122488e93d6346893db06cfa030aaa6f67 (patch)
treef5f3d3031a8b43c9c51ad7cf353acadaed0a009e
parent97ba9c92275bfc81cc5b33c90e1ea696a52d837d (diff)
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>
-rw-r--r--lib/libalpm/deps.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index bd73d60b..bcb7ef53 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -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((p = _alpm_db_get_pkgfromcache(db, j->data)) == NULL) {
- /* hmmm... package isn't installed.. */
+
+ if(_alpm_pkg_find(j->data, packages)) {
+ /* this package also in the upgrade list, so don't worry about it */
continue;
}
- if(_alpm_pkg_find(alpm_pkg_get_name(p), packages)) {
- /* this package also in the upgrade list, so don't worry about it */
+ if((p = _alpm_db_get_pkgfromcache(db, j->data)) == NULL) {
+ /* hmmm... package isn't installed.. */
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);