diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:56:35 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:56:35 +0000 |
commit | 0f2fa32291a66b7a154b5926a6dc8f38476bdd94 (patch) | |
tree | bd96d464306fc28064ec83b36de9b912f2285914 | |
parent | 997255f04c2c9bbbd3291b210255d1b9212915ae (diff) | |
download | apt-0f2fa32291a66b7a154b5926a6dc8f38476bdd94.tar.gz |
Two small bug fixes
Author: jgg
Date: 2001-02-22 06:26:27 GMT
Two small bug fixes
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 4 | ||||
-rw-r--r-- | cmdline/apt-cache.cc | 30 | ||||
-rw-r--r-- | debian/changelog | 9 | ||||
-rw-r--r-- | doc/apt-cache.8.sgml | 2 |
4 files changed, 29 insertions, 16 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 34c19ef4..ae761ec4 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -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); diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index e7b8637b..a0239d87 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -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) { diff --git a/debian/changelog b/debian/changelog index 5cd0dbfd..df46e3d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/doc/apt-cache.8.sgml b/doc/apt-cache.8.sgml index 79bfa962..4490aea2 100644 --- a/doc/apt-cache.8.sgml +++ b/doc/apt-cache.8.sgml @@ -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> |