summaryrefslogtreecommitdiff
path: root/cmdline/apt-mark.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-11-11 16:03:40 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-11-11 16:03:40 +0100
commitc4cca79156ef5651e90772bae5f4aa11f669907d (patch)
tree3462abb5b0841a4adabcf1024b5e6bd9067d6ecd /cmdline/apt-mark.cc
parent15fc8636b3e48eab5f3bc6f2e8c61c0409246909 (diff)
- provide a {Package,Version}List similar to {Package,Version}Set
* cmdline/apt-{get,cache,mark}.cc: - use Lists instead of Sets if input order should be preserved for commands accepting lists of packages, e.g. policy (Closes: #625960)
Diffstat (limited to 'cmdline/apt-mark.cc')
-rw-r--r--cmdline/apt-mark.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc
index 339cbdf44..dbbef5013 100644
--- a/cmdline/apt-mark.cc
+++ b/cmdline/apt-mark.cc
@@ -34,14 +34,14 @@ bool DoAuto(CommandLine &CmdL)
if (unlikely(Cache == NULL || DepCache == NULL))
return false;
- APT::PackageSet pkgset = APT::PackageSet::FromCommandLine(CacheFile, CmdL.FileList + 1);
+ APT::PackageList pkgset = APT::PackageList::FromCommandLine(CacheFile, CmdL.FileList + 1);
if (pkgset.empty() == true)
return _error->Error(_("No packages found"));
bool MarkAuto = strcasecmp(CmdL.FileList[0],"auto") == 0;
int AutoMarkChanged = 0;
- for (APT::PackageSet::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
+ for (APT::PackageList::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
{
if (Pkg->CurrentVer == 0)
{
@@ -81,7 +81,7 @@ bool DoMarkAuto(CommandLine &CmdL)
if (unlikely(Cache == NULL || DepCache == NULL))
return false;
- APT::PackageSet pkgset = APT::PackageSet::FromCommandLine(CacheFile, CmdL.FileList + 1);
+ APT::PackageList pkgset = APT::PackageList::FromCommandLine(CacheFile, CmdL.FileList + 1);
if (pkgset.empty() == true)
return _error->Error(_("No packages found"));
@@ -89,7 +89,7 @@ bool DoMarkAuto(CommandLine &CmdL)
bool const Verbose = _config->FindB("APT::MarkAuto::Verbose", false);
int AutoMarkChanged = 0;
- for (APT::PackageSet::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
+ for (APT::PackageList::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
{
if (Pkg->CurrentVer == 0 ||
(((*DepCache)[Pkg].Flags & pkgCache::Flag::Auto) == pkgCache::Flag::Auto) == MarkAuto)
@@ -157,13 +157,13 @@ bool DoHold(CommandLine &CmdL)
if (unlikely(Cache == NULL))
return false;
- APT::PackageSet pkgset = APT::PackageSet::FromCommandLine(CacheFile, CmdL.FileList + 1);
+ APT::PackageList pkgset = APT::PackageList::FromCommandLine(CacheFile, CmdL.FileList + 1);
if (pkgset.empty() == true)
return _error->Error(_("No packages found"));
bool const MarkHold = strcasecmp(CmdL.FileList[0],"hold") == 0;
- for (APT::PackageSet::iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
+ for (APT::PackageList::iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
{
if ((Pkg->SelectedState == pkgCache::State::Hold) == MarkHold)
{
@@ -181,7 +181,7 @@ bool DoHold(CommandLine &CmdL)
if (_config->FindB("APT::Mark::Simulate", false) == true)
{
- for (APT::PackageSet::iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
+ for (APT::PackageList::iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
{
if (MarkHold == false)
ioprintf(c1out,_("%s set on hold.\n"), Pkg.FullName(true).c_str());
@@ -201,7 +201,7 @@ bool DoHold(CommandLine &CmdL)
if (dpkg == NULL)
return _error->Errno("DoHold", "fdopen on dpkg stdin failed");
- for (APT::PackageSet::iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
+ for (APT::PackageList::iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
{
if (MarkHold == true)
{