]> git.saurik.com Git - apt.git/commitdiff
add --manual-installed commandline switch
authorMichael Vogt <mvo@debian.org>
Thu, 16 Jan 2014 15:45:11 +0000 (16:45 +0100)
committerMichael Vogt <mvo@debian.org>
Thu, 16 Jan 2014 15:45:11 +0000 (16:45 +0100)
apt-private/private-cacheset.cc
apt-private/private-cmndline.cc

index 6fb2240103c437f99f37ce91d900dd347c7a73b8..a7dc0e800154f6c14135ec2be283c36ed09d789a 100644 (file)
@@ -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();
index 28309af07304c515250d26ef32902023b5ab73f3..d6d7bca64be8ebedc56effc33e850d4e3ab0e46c 100644 (file)
@@ -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);
    }