[Apt-listbugs-commits] [apt-listbugs] 01/01: catch ruby-debian LoadError (Closes: #747487)

Francesco Poli frx-guest at moszumanska.debian.org
Wed May 14 22:04:42 UTC 2014


This is an automated email from the git hooks/post-receive script.

frx-guest pushed a commit to branch master
in repository apt-listbugs.

commit 8ccc0373a0a5c8c0455498520da711478f203ee2
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date:   Thu May 15 00:02:13 2014 +0200

    catch ruby-debian LoadError (Closes: #747487)
---
 apt-listbugs     | 21 ++++++++++++++++-----
 debian/changelog |  8 ++++++++
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/apt-listbugs b/apt-listbugs
index 60513f8..635b15c 100755
--- a/apt-listbugs
+++ b/apt-listbugs
@@ -311,17 +311,28 @@ else
 end
 
 require 'getoptlong'
-require 'debian'
+require 'gettext'
+include GetText
+
+GetText::bindtextdomain("apt-listbugs")
+
+begin
+  require 'debian'
+rescue LoadError
+  $stderr.puts "E: #{$!}"
+  $stderr.puts _("This may be caused by a ruby-debian package lacking support for the ruby interpreter in use. Try to fix the situation with the following commands:")
+  $stderr.puts "  # mv /etc/apt/apt.conf.d/10apt-listbugs /root/"
+  $stderr.puts "  # aptitude update"
+  $stderr.puts "  # aptitude install ruby-debian ruby"
+  $stderr.puts "  # mv /root/10apt-listbugs /etc/apt/apt.conf.d/"
+  exit 1
+end
 require 'debian/bug'
 require 'debian/bts'
 require 'thread'
 require 'tempfile'
-require 'gettext'
 require 'rss/maker'
 require 'apt-listbugs/logic'
-include GetText
-
-GetText::bindtextdomain("apt-listbugs")
 
 ## main from here
 
diff --git a/debian/changelog b/debian/changelog
index 97acebe..2f543a4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+apt-listbugs (0.1.14) UNRELEASED; urgency=medium
+
+  * fixed "please don't break apt on failures": when ruby-debian binary
+    library fails to load, suggest a possible way to fix things up
+    and then exit with error (Closes: #747487)
+
+ -- Francesco Poli (wintermute) <invernomuto at paranoici.org>  Sun, 11 May 2014 16:45:18 +0200
+
 apt-listbugs (0.1.13) unstable; urgency=medium
 
   * improved README.Debian formatting

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/apt-listbugs/apt-listbugs.git



More information about the Apt-listbugs-commits mailing list