Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=f1094f6f3b53db3cf013aa5d17a0ccbed1a9c11e

commit f1094f6f3b53db3cf013aa5d17a0ccbed1a9c11e
Author: Michel Hermier <[email protected]>
Date:   Tue Sep 23 15:34:51 2014 +0200

libpacman: Simplify a little pmtrans_t::resolvedeps since now all the packages 
for the transaction are in pmtrans_t::syncpkgs.

diff --git a/lib/libpacman/deps.cpp b/lib/libpacman/deps.cpp
index 0fe4118..04905c2 100644
--- a/lib/libpacman/deps.cpp
+++ b/lib/libpacman/deps.cpp
@@ -502,15 +502,12 @@ int pmtrans_t::resolvedeps(FList<Package *> &list,
pm_errno = PM_ERR_UNSATISFIED_DEPS;
goto error;
}
-               if(_pacman_pkg_isin(ps->name(), list)) {
+               if(find(ps->name())) {
/* this dep is already in the target list */
+                       /* FIXME: PM_TRANS_FLAG_DEPENDSONLY are ignored and 
should require a flag flipping */
_pacman_log(PM_LOG_DEBUG, _("dependency %s is already in the target list -- 
skipping"),
ps->name());
-                       continue;
-               }
-
-               /* FIXME: PM_TRANS_FLAG_DEPENDSONLY are ignored and should 
require a flag flipping */
-               if(!_pacman_pkg_isin(ps->name(), trail)) {
+               } else {
/* check pmo_ignorepkg and pmo_s_ignore to make sure we haven't pulled in
* something we're not supposed to.
*/
@@ -547,9 +544,6 @@ int pmtrans_t::resolvedeps(FList<Package *> &list,
pm_errno = PM_ERR_UNSATISFIED_DEPS;
goto error;
}
-               } else {
-                       /* cycle detected -- skip it */
-                       _pacman_log(PM_LOG_DEBUG, _("dependency cycle detected: 
%s"), ps->name());
}
}
} while (again);
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to