[pacman-dev] [patch] I. speed improved version

Nagy Gabor ngaba at petra.hos.u-szeged.hu
Sat Apr 21 14:08:54 EDT 2007


Oh, this is much more plausible ;-):
--------
diff -Naur pacman-lib/lib/libalpm/deps.c pacman-lib.new/lib/libalpm/deps.c
--- pacman-lib/lib/libalpm/deps.c	2007-03-19 05:23:45.000000000 +0100
+++ pacman-lib.new/lib/libalpm/deps.c	2007-04-21 20:02:07.000000000 +0200
@@ -271,12 +271,8 @@
 							for(l = _alpm_db_get_pkgcache(db); l; l = l->next) {
 								pmpkg_t *pkg = l->data;
 
-								if(strcmp(alpm_pkg_get_name(pkg), alpm_pkg_get_name(oldpkg)) == 0) {
-									/* well, we know this one succeeds, but we're removing it... skip it */
-									continue;
-								}
-
-								if(alpm_depcmp(pkg, depend)) {
+								if(alpm_depcmp(pkg, depend) && !_alpm_pkg_find(alpm_pkg_get_name(pkg), packages)) {
+								/* we ignore packages that will be updated because we know that updated ones don't satisfy depend.*/
 									_alpm_log(PM_LOG_DEBUG, _("checkdeps: dependency '%s' satisfied by installed package '%s'"),
 														depend->name, alpm_pkg_get_name(pkg));
 									satisfied = 1;
---------------------
Enjoy, ngaba




More information about the pacman-dev mailing list