diff options
author | Michael Vogt <mvo@debian.org> | 2014-01-16 16:45:11 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-01-16 16:45:11 +0100 |
commit | 3bdf7da5b40636376699aa8a976aae1b279ef356 (patch) | |
tree | 8b8e1594305c6118f00f40959366d40bac3a85ec /apt-private | |
parent | c189f87d57844a13619ec387916f49aba171c1b3 (diff) |
add --manual-installed commandline switch
Diffstat (limited to 'apt-private')
-rw-r--r-- | apt-private/private-cacheset.cc | 9 | ||||
-rw-r--r-- | apt-private/private-cmndline.cc | 1 |
2 files changed, 10 insertions, 0 deletions
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<CommandLine::Args> &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); } |