From 3d5a34b22a83eb4bf9b1407e13240b8e2a333d5f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 13 Apr 2010 09:28:57 +0200 Subject: regex for package names executed on Grp- not PkgIterator --- cmdline/apt-get.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cmdline') 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); -- cgit v1.2.3