summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-04-13 09:28:57 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-04-13 09:28:57 +0200
commit3d5a34b22a83eb4bf9b1407e13240b8e2a333d5f (patch)
tree522091e2062d5b70b3d25c6efea8ecc4cbac0113 /cmdline/apt-get.cc
parenta722b2c5c935768efbdd5b23eed7ce32ccd60908 (diff)
regex for package names executed on Grp- not PkgIterator
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 7c42e672d..52cbce945 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1772,11 +1772,14 @@ bool DoInstall(CommandLine &CmdL)
// Run over the matches
bool Hit = false;
- for (Pkg = Cache->PkgBegin(); Pkg.end() == false; Pkg++)
+ for (pkgCache::GrpIterator Grp = Cache->GrpBegin(); Grp.end() == false; ++Grp)
{
- if (regexec(&Pattern,Pkg.Name(),0,0,0) != 0)
+ if (regexec(&Pattern,Grp.Name(),0,0,0) != 0)
continue;
-
+ Pkg = Grp.FindPkg("native");
+ if (unlikely(Pkg.end() == true))
+ continue;
+
ioprintf(c1out,_("Note, selecting %s for regex '%s'\n"),
Pkg.Name(),S);