summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/depcache.h1
-rw-r--r--cmdline/apt-get.cc9
-rw-r--r--debian/changelog1
3 files changed, 8 insertions, 3 deletions
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h
index 6765d3e7c..72b9b5d4d 100644
--- a/apt-pkg/depcache.h
+++ b/apt-pkg/depcache.h
@@ -331,6 +331,7 @@ class pkgDepCache : protected pkgCache::Namespace
// Legacy.. We look like a pkgCache
inline operator pkgCache &() {return *Cache;};
inline Header &Head() {return *Cache->HeaderP;};
+ inline GrpIterator GrpBegin() {return Cache->GrpBegin();};
inline PkgIterator PkgBegin() {return Cache->PkgBegin();};
inline GrpIterator FindGrp(string const &Name) {return Cache->FindGrp(Name);};
inline PkgIterator FindPkg(string const &Name) {return Cache->FindPkg(Name);};
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);
diff --git a/debian/changelog b/debian/changelog
index 4cdbd4d93..6cf067952 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,7 @@ apt (0.7.26~exp4) experimental; urgency=low
- remove the lock file handling and let Acquire take care of it instead
- display MD5Sum in --print-uris if not forced to use another method
instead of displaying the strongest available (Closes: #576420)
+ - regex for package names executed on Grp- not PkgIterator
-- David Kalnischkies <kalnischkies@gmail.com> Sat, 03 Apr 2010 14:58:39 +0200