Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=1efad0fc9b60860b43f1a14aa3a1df0169f803a6
commit 1efad0fc9b60860b43f1a14aa3a1df0169f803a6 Author: Michel Hermier <[email protected]> Date: Mon Sep 22 16:29:44 2014 +0200 libpacman: Remove now unecessary parameter in pmtrans_t::removedeps. diff --git a/lib/libpacman/deps.cpp b/lib/libpacman/deps.cpp index 58cfc52..8657856 100644 --- a/lib/libpacman/deps.cpp +++ b/lib/libpacman/deps.cpp @@ -395,17 +395,15 @@ out: * I mean dependencies that are *only* required for packages in the target * list, so they can be safely removed. */ -void pmtrans_t::removedeps(Database *db) +void pmtrans_t::removedeps() { - if(db == NULL) { - return; - } FList<Package *> &targs = m_packages; + Database *db = m_handle->db_local; bool again = false; for(auto i = targs.begin(), end = targs.end(); i != end; i = again ? targs.begin() : i.next()) { again = false; - auto &depends = ((Package *)*i)->depends(); + auto &depends = (*i)->depends(); for(auto j = depends.begin(), j_end = depends.end(); j != j_end; ++j) { pmdepend_t depend; Package *dep; diff --git a/lib/libpacman/trans.cpp b/lib/libpacman/trans.cpp index cbb37fc..3544231 100644 --- a/lib/libpacman/trans.cpp +++ b/lib/libpacman/trans.cpp @@ -879,7 +879,7 @@ cleanup: if(m_type == PM_TRANS_TYPE_REMOVE && m_type != PM_TRANS_TYPE_UPGRADE) { if(flags & PM_TRANS_FLAG_RECURSE) { _pacman_log(PM_LOG_FLOW1, _("finding removable dependencies")); - removedeps(db_local); + removedeps(); } } /* re-order w.r.t. dependencies */ diff --git a/lib/libpacman/trans.h b/lib/libpacman/trans.h index 519695c..5f0aeef 100644 --- a/lib/libpacman/trans.h +++ b/lib/libpacman/trans.h @@ -73,7 +73,7 @@ struct __pmtrans_t FPtrList checkdeps(unsigned char op); FPtrList checkdeps(unsigned char op, const FList<libpacman::Package *> &packages); FPtrList find_conflicts(); - void removedeps(libpacman::Database *db); + void removedeps(); int resolvedeps(libpacman::Package *syncpkg, FList<libpacman::Package *> &list, FList<libpacman::Package *> &trail, FPtrList **data); /* Compatibility */ _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
