From 3bdf7da5b40636376699aa8a976aae1b279ef356 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 16 Jan 2014 16:45:11 +0100 Subject: add --manual-installed commandline switch --- apt-private/private-cacheset.cc | 9 +++++++++ apt-private/private-cmndline.cc | 1 + 2 files changed, 10 insertions(+) (limited to 'apt-private') diff --git a/apt-private/private-cacheset.cc b/apt-private/private-cacheset.cc index 6fb224010..a7dc0e800 100644 --- a/apt-private/private-cacheset.cc +++ b/apt-private/private-cacheset.cc @@ -52,6 +52,15 @@ bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile, output_set.insert(policy->GetCandidateVer(P)); } } + else if (_config->FindB("APT::Cmd::Manual-Installed") == true) + { + if (P.CurrentVer() && + ((*DepCache)[P].Flags & pkgCache::Flag::Auto) == false) + { + pkgPolicy *policy = CacheFile.GetPolicy(); + output_set.insert(policy->GetCandidateVer(P)); + } + } else { pkgPolicy *policy = CacheFile.GetPolicy(); diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index 28309af07..d6d7bca64 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -226,6 +226,7 @@ bool addArgumentsAPT(std::vector &Args, char const * const Cm { addArg(0,"installed","APT::Cmd::Installed",0); addArg(0,"upgradable","APT::Cmd::Upgradable",0); + addArg(0,"manual-installed","APT::Cmd::Manual-Installed",0); addArg('v', "verbose", "APT::Cmd::List-Include-Summary", 0); addArg('a', "all-versions", "APT::Cmd::All-Versions", 0); } -- cgit v1.2.3