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

commit 59aedafd2e0802c110e04b1c897099e3def5f1c6
Author: Michel Hermier <[email protected]>
Date:   Mon May 12 08:44:51 2014 +0200

libpacman: Reorder conditionnal checks so that it should ease code 
vectorisation.

diff --git a/lib/libpacman/trans.cpp b/lib/libpacman/trans.cpp
index a13d0c9..da37be9 100644
--- a/lib/libpacman/trans.cpp
+++ b/lib/libpacman/trans.cpp
@@ -1271,11 +1271,10 @@ cleanup:
return ret;
}
} else {
-       if(type & PM_TRANS_TYPE_ADD) {
-
/* Check dependencies
*/
if(!(flags & PM_TRANS_FLAG_NODEPS)) {
+               if(type & PM_TRANS_TYPE_ADD) {
EVENT(this, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);

/* look for unsatisfied dependencies */
@@ -1310,10 +1309,12 @@ cleanup:
packages = lp;

EVENT(this, PM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL);
+               }
}

/* Cleaning up
*/
+       if(type & PM_TRANS_TYPE_ADD) {
EVENT(this, PM_TRANS_EVT_CLEANUP_START, NULL, NULL);
_pacman_log(PM_LOG_FLOW1, _("cleaning up"));
for (lp = packages; lp!=NULL; lp=lp->next) {
@@ -1361,8 +1362,8 @@ cleanup:
}
#endif
}
-       if(type == PM_TRANS_TYPE_REMOVE) {
-       if(!(flags & (PM_TRANS_FLAG_NODEPS)) && (type != 
PM_TRANS_TYPE_UPGRADE)) {
+       if(!(flags & (PM_TRANS_FLAG_NODEPS))) {
+               if(type == PM_TRANS_TYPE_REMOVE && type != 
PM_TRANS_TYPE_UPGRADE) {
EVENT(this, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);

_pacman_log(PM_LOG_FLOW1, _("looking for unsatisfied dependencies"));
@@ -1408,7 +1409,7 @@ cleanup:
packages = lp;

EVENT(this, PM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL);
-       }
+               }
}
}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to