Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=386b529fa8cb7574e0ffb9808fca5ae76ebf11ca
commit 386b529fa8cb7574e0ffb9808fca5ae76ebf11ca Author: Michel Hermier <[email protected]> Date: Tue Sep 23 18:25:48 2014 +0200 libpacman: Remove 2 usage of pmtrans_t::m_packages. diff --git a/lib/libpacman/conflict.cpp b/lib/libpacman/conflict.cpp index bdeeb3b..7f1f3a6 100644 --- a/lib/libpacman/conflict.cpp +++ b/lib/libpacman/conflict.cpp @@ -303,8 +303,8 @@ FPtrList pmtrans_t::find_conflicts() /* Check if the conflicting file has been moved to another package/target */ if(!ok) { /* Look at all the targets */ - for(auto k = m_packages.begin(), k_end = m_packages.end(); k != k_end && !ok; ++k) { - Package *p2 = *k; + for(auto k = syncpkgs.begin(), k_end = syncpkgs.end(); k != k_end && !ok; ++k) { + Package *p2 = (*k)->pkg_new; /* As long as they're not the current package */ if(strcmp(p2->name(), p->name())) { Package *dbpkg2 = NULL; diff --git a/lib/libpacman/trans.cpp b/lib/libpacman/trans.cpp index d1e780c..ea029f3 100644 --- a/lib/libpacman/trans.cpp +++ b/lib/libpacman/trans.cpp @@ -874,9 +874,8 @@ cleanup: if(m_type & PM_TRANS_TYPE_ADD) { EVENT(this, PM_TRANS_EVT_CLEANUP_START, NULL, NULL); _pacman_log(PM_LOG_FLOW1, _("cleaning up")); - for (auto lp = m_packages.begin(), lp_end = m_packages.end(); lp != lp_end; ++lp) { - Package *pkg_new = *lp; - auto &removes = pkg_new->removes(); + for (auto lp = syncpkgs.begin(), lp_end = syncpkgs.end(); lp != lp_end; ++lp) { + auto &removes = (*lp)->pkg_new->removes(); for (auto rmlist = removes.begin(), rmlist_end = removes.end(); rmlist != rmlist_end; ++rmlist) { char rm_fname[PATH_MAX]; _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
