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

commit 13fb50900d9bb2b909924000b16e60cdfded8d24
Author: Michel Hermier <[email protected]>
Date:   Fri Oct 17 08:57:48 2014 +0200

libpacman: Move events firing for dependency resolution to trans_t::resolvedeps 
method.

diff --git a/lib/libpacman/deps.cpp b/lib/libpacman/deps.cpp
index d19ea11..d86d3f1 100644
--- a/lib/libpacman/deps.cpp
+++ b/lib/libpacman/deps.cpp
@@ -436,6 +436,13 @@ int pmtrans_t::resolvedeps(FPtrList **data)
return(-1);
}

+       if(flags & PM_TRANS_FLAG_NODEPS) {
+               return 0;
+       }
+
+       EVENT(this, PM_TRANS_EVT_RESOLVEDEPS_START, NULL, NULL);
+       _pacman_log(PM_LOG_FLOW1, _("resolving targets dependencies"));
+
bool again;
do {
again = false;
@@ -528,6 +535,8 @@ int pmtrans_t::resolvedeps(FPtrList **data)
}
}
} while (again);
+
+       EVENT(this, PM_TRANS_EVT_RESOLVEDEPS_DONE, NULL, NULL);
return 0;

error:
diff --git a/lib/libpacman/trans.cpp b/lib/libpacman/trans.cpp
index 9e3dae1..a3fab40 100644
--- a/lib/libpacman/trans.cpp
+++ b/lib/libpacman/trans.cpp
@@ -479,8 +479,6 @@ int __pmtrans_t::prepare(FPtrList **data)

if(!(flags & PM_TRANS_FLAG_NODEPS)) {
/* Resolve targets dependencies */
-               EVENT(this, PM_TRANS_EVT_RESOLVEDEPS_START, NULL, NULL);
-               _pacman_log(PM_LOG_FLOW1, _("resolving targets dependencies"));
if(resolvedeps(data) == -1) {
/* pm_errno is set by resolvedeps */
ret = -1;
@@ -502,8 +500,6 @@ int __pmtrans_t::prepare(FPtrList **data)
/* re-order w.r.t. dependencies */
sortbydeps();

-               EVENT(this, PM_TRANS_EVT_RESOLVEDEPS_DONE, NULL, NULL);
-
_pacman_log(PM_LOG_FLOW1, _("looking for unresolvable dependencies"));
deps = checkdeps(PM_TRANS_TYPE_UPGRADE);
if(!deps.empty()) {
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to