[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#484485: apt-cache: search the Homepage field, too



Package: apt
Version: 0.7.14
Severity: normal
Tags: patch

Now that the Homepage field was broken out of the Description, IMHO
the apt-cache utility should include it in the searches.  If it does
not (as is the situation now), users who have been able to find
packages based on homepage URL's before are unable to do that now :)

The included patch - patch-apt-01-homepage-001.patch (see below) -
is actually against the apt-0.7.14 version from sid, although I'm
sending this report from a lenny system.

-- Package-specific info:

-- apt-config dump --

APT "";
APT::Architecture "i386";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Install-Recommends "false";
APT::Install-Suggests "0";
APT::Acquire "";
APT::Acquire::Translation "environment";
APT::NeverAutoRemove "";
APT::NeverAutoRemove:: "^linux-image.*";
APT::NeverAutoRemove:: "^linux-restricted-modules.*";
Dir "/";
Dir::State "var/lib/apt/";
Dir::State::lists "lists/";
Dir::State::cdroms "cdroms.list";
Dir::State::userstatus "status.user";
Dir::State::status "/var/lib/dpkg/status";
Dir::Cache "var/cache/apt/";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Dir::Etc "etc/apt/";
Dir::Etc::sourcelist "sources.list";
Dir::Etc::sourceparts "sources.list.d";
Dir::Etc::vendorlist "vendors.list";
Dir::Etc::vendorparts "vendors.list.d";
Dir::Etc::main "apt.conf";
Dir::Etc::parts "apt.conf.d";
Dir::Etc::preferences "preferences";
Dir::Bin "";
Dir::Bin::methods "/usr/lib/apt/methods";
Dir::Bin::dpkg "/usr/bin/dpkg";
Dir::Log "var/log/apt";
Dir::Log::Terminal "term.log";
DPkg "";
DPkg::Pre-Install-Pkgs "";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt || true";
DPkg::Post-Invoke "";
DPkg::Post-Invoke:: "if [ -x /usr/bin/debsums ]; then /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives; fi";

-- (no /etc/apt/preferences present) --


-- (/etc/apt/sources.list present, but not submitted) --



*** deb/bugs/patch-apt-01-homepage-001.patch
diff -urN -x .svn ../../branches/vendor/apt/cmdline/apt-cache.cc ./cmdline/apt-cache.cc
--- ../../branches/vendor/apt/cmdline/apt-cache.cc	2008-06-04 13:05:22.000000000 +0300
+++ ./cmdline/apt-cache.cc	2008-06-04 13:09:01.000000000 +0300
@@ -1367,11 +1367,12 @@
       bool Match = true;
       if (J->NameMatch == false)
       {
-	 string LongDesc = P.LongDesc();
+	 string LongDesc = P.LongDesc(), Homepage = P.Homepage();
 	 Match = NumPatterns != 0;
 	 for (unsigned I = 0; I != NumPatterns; I++)
 	 {
-	    if (regexec(&Patterns[I],LongDesc.c_str(),0,0,0) == 0)
+	    if (regexec(&Patterns[I],LongDesc.c_str(),0,0,0) == 0 ||
+		regexec(&Patterns[I],Homepage.c_str(),0,0,0) == 0)
 	       Match &= true;
 	    else
 	       Match = false;


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-4-686 (SMP w/1 CPU core)
Locale: LANG=bg_BG, LC_CTYPE=bg_BG (charmap=CP1251)
Shell: /bin/sh linked to /bin/bash

Versions of packages apt depends on:
ii  debian-archive-keyring   2008.04.16+nmu1 GnuPG archive keys of the Debian a
ii  libc6                    2.7-10          GNU C Library: Shared libraries
ii  libgcc1                  1:4.3.0-5       GCC support library
ii  libstdc++6               4.3.0-5         The GNU Standard C++ Library v3

apt recommends no packages.

-- no debconf information

Attachment: pgpyO4bJU6xeS.pgp
Description: PGP signature


Reply to: