From d5f576c34dd53ad6147e19a1975fbb63e7d74c2f Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Sat, 14 Apr 2012 14:44:06 +0200 Subject: trivial: Correct mistakes from previous commit --- backends/aptcc/apt-intf.cpp | 8 ++++---- backends/aptcc/apt-intf.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backends/aptcc/apt-intf.cpp b/backends/aptcc/apt-intf.cpp index 636e7f49..a5ef7dfd 100644 --- a/backends/aptcc/apt-intf.cpp +++ b/backends/aptcc/apt-intf.cpp @@ -1117,7 +1117,7 @@ void AptIntf::emitFiles(PkBackend *backend, const gchar *pi) } } -bool AptIntf::checkTrusted(pkgAcquire &fetcher) +bool AptIntf::checkTrusted(pkgAcquire &fetcher, bool simulating) { string UntrustedList; PkgList untrusted; @@ -1134,7 +1134,7 @@ bool AptIntf::checkTrusted(pkgAcquire &fetcher) if (untrusted.empty()) { return true; - } else { + } else if (simulating) { emit_packages(untrusted, PK_FILTER_ENUM_NONE, PK_INFO_ENUM_UNTRUSTED); } @@ -1653,7 +1653,7 @@ void AptIntf::updateInterface(int fd, int writeFd) * DoAutomaticRemove - Remove all automatic unused packages * * Remove unused automatic packages -*/ + */ bool AptIntf::DoAutomaticRemove(pkgCacheFile &Cache) { bool doAutoRemove; @@ -2228,7 +2228,7 @@ bool AptIntf::installPackages(pkgCacheFile &Cache, bool simulating) } } - if ((simulating) && (!checkTrusted(fetcher))) { + if ((!checkTrusted(fetcher, simulating)) && (!simulating)) { return false; } diff --git a/backends/aptcc/apt-intf.h b/backends/aptcc/apt-intf.h index f23fec13..e8c85b01 100644 --- a/backends/aptcc/apt-intf.h +++ b/backends/aptcc/apt-intf.h @@ -163,7 +163,7 @@ private: PkBackend *m_backend; bool &_cancel; - bool checkTrusted(pkgAcquire &fetcher); + bool checkTrusted(pkgAcquire &fetcher, bool simulating); bool TryToInstall(const pkgCache::PkgIterator &constPkg, pkgDepCache &Cache, pkgProblemResolver &Fix, -- cgit v1.2.3