regex for package names executed on Grp- not PkgIterator
authorDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 13 Apr 2010 07:28:57 +0000 (09:28 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 13 Apr 2010 07:28:57 +0000 (09:28 +0200)
apt-pkg/depcache.h
cmdline/apt-get.cc
debian/changelog

index 6765d3e..72b9b5d 100644 (file)
@@ -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);};
index 7c42e67..52cbce9 100644 (file)
@@ -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);
            
index 4cdbd4d..6cf0679 100644 (file)
@@ -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