[Apt-listbugs-commits] [SCM] apt-listbugs development tree branch, master, updated. debian/0.1.1-10-g6760c01

Ryan Niebur ryanryan52 at gmail.com
Sun Nov 1 11:28:47 UTC 2009


The following commit has been merged in the master branch:
commit da6864ae240d2ea2458b1c53aca2675ed1985f04
Author: Ryan Niebur <ryanryan52 at gmail.com>
Date:   Sun Nov 1 03:12:51 2009 -0800

    improve speed by using Debian::Dpkg instead of dpkg -I, now that Debian::Dpkg works again (libdpkg-ruby1.8 0.3.3)

diff --git a/debian/TODO b/debian/TODO
index 5615085..9f193c7 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -6,8 +6,6 @@ Release goals for version 0.1.2
 * close #257873 - handle source versions
 * close #552125 - fails on large upgrades [libdpkg-ruby1.8]
 * close #553346 - Please support filter mechanisms
-* close #390262 - then fix "TODO: This is slow" in
-   lib/apt-listbugs/logic.rb [libdpkg-ruby1.8]
 
 Release goals for version 0.1.3
 -------------------------------
diff --git a/debian/changelog b/debian/changelog
index dac7ac6..5816676 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,12 +3,14 @@ apt-listbugs (0.1.2) UNRELEASED; urgency=low
   [ Ryan Niebur ]
   * allow setting AptListbugs::IgnoreRegexp in apt.conf to ignore bugs
     with titles matching a regexp when in apt mode (Closes: #553346)
+  * improve speed by using Debian::Dpkg instead of dpkg -I, now that
+    Debian::Dpkg works again (libdpkg-ruby1.8 0.3.3)
 
   [ Francesco Poli (t1000) ]
   * added robustness checks to aptcleanup to cope with obsolete packages
   * dropped obsolete example update-index.db
 
- -- Francesco Poli (t1000) <frx at firenze.linux.it>  Sun, 01 Nov 2009 02:54:55 -0800
+ -- Ryan Niebur <ryan at debian.org>  Sun, 01 Nov 2009 03:12:43 -0800
 
 apt-listbugs (0.1.1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index 0399ffa..f9f8618 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Vcs-Browser: http://git.debian.org/?p=apt-listbugs/apt-listbugs.git
 
 Package: apt-listbugs
 Architecture: all
-Depends: ${misc:Depends}, ruby (>= 1.8), libruby1.8 (>= 1.8.5), libdpkg-ruby1.8 (>= 0.3.2), apt, libzlib-ruby1.8, libgettext-ruby1.8, libxml-parser-ruby1.8, libhttp-access2-ruby1.8 (>= 2.0.6)
+Depends: ${misc:Depends}, ruby (>= 1.8), libruby1.8 (>= 1.8.5), libdpkg-ruby1.8 (>= 0.3.3), apt, libzlib-ruby1.8, libgettext-ruby1.8, libxml-parser-ruby1.8, libhttp-access2-ruby1.8 (>= 2.0.6)
 Suggests: reportbug, debianutils (>= 2.0) | www-browser | w3m
 Description: tool which lists critical bugs before each apt installation
  apt-listbugs is a tool which retrieves bug reports from the Debian Bug 
diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index fa7f0dc..6868af9 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -733,20 +733,7 @@ module Factory
       include Factory
       DPKG = "/usr/bin/dpkg"
       def field(pkgpath)
-        # TODO: This is slow
-	# field = Debian::Dpkg.field(pkg)
-        #  ^- this does not work due to bug in Debian::Dpkg Bug#390262
-	field = {}
-	f =  `#{DPKG} -I #{pkgpath}`
-	f.each { |line|
-	  case line
-	  when /^ Package: (.*)/
-	    field["package"] = $1
-	  when /^ Version: (.*)/
-	    field["version"] = $1
-	  end
-	}
-	field
+        return Debian::Dpkg.field(pkgpath)
       end
       module_function :field
     end

-- 
apt-listbugs development tree



More information about the Apt-listbugs-commits mailing list