diff options
author | Daniel Nicoletti <dantti12@gmail.com> | 2012-04-19 21:09:13 -0300 |
---|---|---|
committer | Daniel Nicoletti <dantti12@gmail.com> | 2012-04-19 21:09:13 -0300 |
commit | e5c505f909ebabd0744bf82cd1cf637f5eb6510d (patch) | |
tree | 49309fd9c3170c6fe510853d487e49c88f82eace | |
parent | 7ad2637a0b617e2c0381524e0e1160cacac28bd3 (diff) |
aptcc: change the way we mark auto-installed packages
-rw-r--r-- | backends/aptcc/apt-intf.cpp | 14 | ||||
-rw-r--r-- | backends/aptcc/apt-intf.h | 2 |
2 files changed, 7 insertions, 9 deletions
diff --git a/backends/aptcc/apt-intf.cpp b/backends/aptcc/apt-intf.cpp index bd471de7..2ed68655 100644 --- a/backends/aptcc/apt-intf.cpp +++ b/backends/aptcc/apt-intf.cpp @@ -2067,19 +2067,16 @@ void AptIntf::refreshCache() ListUpdate(Stat, *m_cache.GetSourceList()); } -bool AptIntf::markAutoInstalled(AptCacheFile &cache, const PkgList &pkgs, bool flag) +void AptIntf::markAutoInstalled(AptCacheFile &cache, const PkgList &pkgs) { - bool ret; - for(PkgList::const_iterator it = pkgs.begin(); it != pkgs.end(); ++it) { + for (PkgList::const_iterator it = pkgs.begin(); it != pkgs.end(); ++it) { if (m_cancel) { break; } // Mark package as auto-installed - cache->MarkAuto(it->ParentPkg(), flag); + cache->MarkAuto(it->ParentPkg(), true); } - - return true; } bool AptIntf::markFileForInstall(const gchar *file, PkgList &install, PkgList &remove) @@ -2322,8 +2319,9 @@ bool AptIntf::runTransaction(const PkgList &install, const PkgList &remove, bool } } - if (!simulate) { - markAutoInstalled(cache, install, markAuto); + // Mark package dependencies of a local file as auto-installed + if (!simulate && markAuto) { + markAutoInstalled(cache, install); } for (PkgList::const_iterator it = remove.begin(); it != remove.end(); ++it) { diff --git a/backends/aptcc/apt-intf.h b/backends/aptcc/apt-intf.h index 0f906c04..8c648516 100644 --- a/backends/aptcc/apt-intf.h +++ b/backends/aptcc/apt-intf.h @@ -85,7 +85,7 @@ public: /** * Marks the given packages as auto installed */ - bool markAutoInstalled(AptCacheFile &cache, const PkgList &pkgs, bool flag); + void markAutoInstalled(AptCacheFile &cache, const PkgList &pkgs); /** * runs a transaction to install/remove/update packages |