Package: apt-listbugs
Version: 0.0.48
Followup-For: Bug #289361
I provided a patch for this problem a LONG time ago, yet something else
was applied. I think someone put in buf != "" which is complete nonsense.
To fix the problem, change,
if buf != ""
buf = buf.delete!(' ').gsub!(/\([^\)]+\)/,'').chomp!
bugpkgs = buf.split(',')
end
to read,
buf = buf.delete(' ').gsub(/\([^\)]+\)/,'').chomp
bugpkg = bug.split(',')
I've attached a patch that does this change. Please apply.
- Adam
PS. There is a difference between chomp! and chomp as well as other
functions like this. The ones with ! will convert "" to nil. Also,
string = string.chomp!
is equal to,
string.chomp!
hence in original code there is no need to assign modified buffer to
itlsef. Hope this explanation explains the patch :)
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11-1-k7
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Versions of packages apt-listbugs depends on:
ii apt 0.5.28.6 Advanced front-end for dpkg
ii libdpkg-ruby1.8 0.3.1 modules/classes for dpkg on ruby 1
ii libintl-gettext-ruby1.8 0.11-5 Gettext wrapper for Ruby 1.8
ii libruby1.8 [libzlib-ruby1.8] 1.8.2-7 Libraries necessary to run Ruby 1.
ii libxml-parser-ruby1.8 0.6.8-1 Interface of expat for the scripti
ii ruby 1.8.2-1 An interpreter of object-oriented
-- no debconf information
--- aptcleanup 2005-05-25 15:22:58.000000000 -0500
+++ /usr/share/apt-listbugs/aptcleanup 2005-05-25 15:25:41.000000000 -0500
@@ -11,11 +11,8 @@
$stderr.puts "Pinned: #{pinnedpkgs.sort.join(' ')}" if $DEBUG
bugpkgs = []
open("|/usr/sbin/apt-listbugs -q list #{buf} | tail -1 ") { |io|
- buf = io.read
- if buf != ""
- buf = buf.delete!(' ').gsub!(/\([^\)]+\)/,'').chomp!
- bugpkgs = buf.split(',')
- end
+ buf = io.read.delete(' ').gsub(/\([^\)]+\)/,'').chomp
+ bugpkgs = buf.split(',')
}
$stderr.puts "Bogs: #{bugpkgs.sort.join(' ')}" if $DEBUG
if (pinnedpkgs - bugpkgs).size > 0