]> git.saurik.com Git - apt.git/commitdiff
Two small bug fixes
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:56:35 +0000 (16:56 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:56:35 +0000 (16:56 +0000)
Author: jgg
Date: 2001-02-22 06:26:27 GMT
Two small bug fixes

apt-pkg/deb/dpkgpm.cc
cmdline/apt-cache.cc
debian/changelog
doc/apt-cache.8.sgml

index 34c19ef4b2ab984c9ec4b0e0a83162e89f68175a..ae761ec4d62154a5f71b0c90fd8b4234f971cb90 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: dpkgpm.cc,v 1.18 2001/02/20 07:03:17 jgg Exp $
+// $Id: dpkgpm.cc,v 1.19 2001/02/22 06:26:27 jgg Exp $
 /* ######################################################################
 
    DPKG Package Manager - Provide an interface to dpkg
@@ -250,8 +250,6 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf)
       string::size_type Pos;
       if ((Pos = OptSec.find(' ')) == string::npos || Pos == 0)
         Pos = OptSec.length();
-      else
-        Pos--;
       OptSec = "DPkg::Tools::Options::" + string(Opts->Value.c_str(),Pos);
       
       unsigned int Version = _config->FindI(OptSec+"::Version",1);
index e7b8637bedfcabc40ab7080435749052f1ea2814..a0239d87fe45c53116e10333ed9575ef5a5b55fe 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-cache.cc,v 1.44 2001/02/20 07:03:17 jgg Exp $
+// $Id: apt-cache.cc,v 1.45 2001/02/22 06:26:27 jgg Exp $
 /* ######################################################################
    
    apt-cache - Manages the cache files
@@ -935,13 +935,13 @@ bool Search(CommandLine &CmdL)
    // Map versions that we want to write out onto the VerList array.
    for (pkgCache::PkgIterator P = Cache.PkgBegin(); P.end() == false; P++)
    {
+      VFList[P->ID].NameMatch = NumPatterns != 0;
       for (unsigned I = 0; I != NumPatterns; I++)
       {
         if (regexec(&Patterns[I],P.Name(),0,0,0) == 0)
-        {
-           VFList[P->ID].NameMatch = true;
-           break;
-        }
+           VFList[P->ID].NameMatch &= true;
+        else
+           VFList[P->ID].NameMatch = false;
       }
       
       // Doing names only, drop any that dont match..
@@ -961,12 +961,20 @@ bool Search(CommandLine &CmdL)
    for (ExVerFile *J = VFList; J->Vf != 0; J++)
    {
       pkgRecords::Parser &P = Recs.Lookup(pkgCache::VerFileIterator(Cache,J->Vf));
-      
-      bool Match = J->NameMatch;
-      string LongDesc = P.LongDesc();
-      for (unsigned I = 0; I != NumPatterns && Match == false; I++)
-        if (regexec(&Patterns[I],LongDesc.c_str(),0,0,0) == 0)
-           Match = true;
+
+      bool Match = true;
+      if (J->NameMatch == false)
+      {
+        string LongDesc = P.LongDesc();
+        Match = NumPatterns != 0;
+        for (unsigned I = 0; I != NumPatterns; I++)
+        {
+           if (regexec(&Patterns[I],LongDesc.c_str(),0,0,0) == 0)
+              Match &= true;
+           else
+              Match = false;
+        }
+      }
       
       if (Match == true)
       {
index 5cd0dbfd3fa126a3a1e633326bb30f61c7a6393e..df46e3d9eef02bbe350461b8120b8dd80d0a62ff 100644 (file)
@@ -1,3 +1,10 @@
+apt (0.5.1) unstable; urgency=low
+
+  * Fixed #82894 again, or should be and.
+  * Process the option string right. Closes: #86921
+  
+ -- Jason Gunthorpe <jgg@debian.org>  Thu, 22 Feb 2001 00:39:15 -0500
+
 apt (0.5.0) unstable; urgency=low
 
   * Fixed an obscure bug with missing final double new lines in 
@@ -98,7 +105,7 @@ apt (0.5.0) unstable; urgency=low
   * Using potato debhelper. Closes: #57977
   * I cannot self-terminate. Closes: #74928
   
- -- Jason Gunthorpe <jgg@debian.org>  Wed, 25 Oct 2000 00:11:06 -0600
+ -- Jason Gunthorpe <jgg@debian.org>  Wed, 21 Feb 2001 00:39:15 -0500
  
 apt (0.3.19) frozen unstable; urgency=low
   
index 79bfa962f0ec966abcf249c0db57d1376c293f1b..4490aea2a5eb542b8ea2501c857a5b6c99c0eb4d 100644 (file)
@@ -205,7 +205,7 @@ Reverse Provides:
      searched, only the package name is.
      <para>
      Seperate arguments can be used to specified multiple search patterns that 
-     are or'd together.
+     are and'd together.
      </VarListEntry>
 
      <VarListEntry><Term>depends</Term>