Bug#775894: libqt4-ruby1.8: leaves diversion after upgrade from from lenny - squeeze - wheezy - jessie

2015-01-25 Thread Andreas Beckmann
Followup-For: Bug #775894

On 2015-01-25 05:12, Scott Kitterman wrote:
 I would suggest you go ahead an NMU (no delay).  I'm travelling for work, so 
 unlikely to be able to at this for at least a week.

Uploaded.
I needed another small patch to allow arch-indep-only builds (to do a
source + all only upload), two git commits for my NMU are attached.


Andreas
From 547434f00a23b36f655b91635ed4c94a5dd10b28 Mon Sep 17 00:00:00 2001
From: Andreas Beckmann a...@debian.org
Date: Sun, 25 Jan 2015 15:57:20 +0100
Subject: [PATCH 1/2] clean up obsolete diversions of rbqtapi dating back to
 libqt4-ruby1.8/lenny

this caused having no /usr/bin/rbqtapi binary after upgrading to wheezy
(and jessie):

lrwxrwxrwx 1 root root7 May 18  2014 /usr/bin/rbqt4api - rbqtapi
-rwxr-xr-x 1 root root 4570 Jun 28  2013 /usr/bin/rbqtapi.qt3

Closes: #775894
---
 debian/changelog |  8 
 debian/ruby-qt4.postinst | 19 +++
 2 files changed, 27 insertions(+)
 create mode 100644 debian/ruby-qt4.postinst

diff --git a/debian/changelog b/debian/changelog
index 2b0cfb8..e89f099 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+qtruby (4:4.11.3-4.1) unstable; urgency=medium
+
+  * Non-maintainer upload with maintainer approval.
+  * ruby-qt4.postinst: Clean up obsolete diversions of rbqtapi dating back to
+libqt4-ruby1.8/lenny.  (Closes: #775894)
+
+ -- Andreas Beckmann a...@debian.org  Sun, 25 Jan 2015 12:43:54 +0100
+
 qtruby (4:4.11.3-4) unstable; urgency=medium
 
   * Build against Ruby 2.1.
diff --git a/debian/ruby-qt4.postinst b/debian/ruby-qt4.postinst
new file mode 100644
index 000..0616091
--- /dev/null
+++ b/debian/ruby-qt4.postinst
@@ -0,0 +1,19 @@
+#!/bin/sh
+set -e
+
+# clean up obsolete diversions dating back to libqt4-ruby1.8/lenny
+# perform the cleanup here in the successor ruby-qt4 since the
+# transitional package libqt4-ruby1.8 may already have been removed
+if [ $1 = configure ]; then
+	if [ -n $(dpkg-divert --listpackage /usr/bin/rbqtapi) ]; then
+		dpkg-divert --remove --rename --package libqt4-ruby1.8 \
+			--divert /usr/bin/rbqtapi.qt3 /usr/bin/rbqtapi
+	fi
+	if [ -n $(dpkg-divert --listpackage /usr/share/man/man1/rbqtapi.1.gz) ]; then
+		dpkg-divert --remove --rename --package libqt4-ruby1.8 \
+			--divert /usr/share/man/man1/rbqtapi.qt3.1.gz \
+			/usr/share/man/man1/rbqtapi.1.gz
+	fi
+fi
+
+#DEBHELPER#
-- 
2.1.4

From 8c1a3a918c6a0d4f8ce2f98c279253c6c9a29c8c Mon Sep 17 00:00:00 2001
From: Andreas Beckmann a...@debian.org
Date: Sun, 25 Jan 2015 16:01:49 +0100
Subject: [PATCH 2/2] allow arch-indep-only builds

turn override_dh_installexamples into override_dh_installexamples-arch
since it manipulates /usr/share/doc/ruby-qt4/ and ruby-qt4 is arch:any
---
 debian/changelog | 2 ++
 debian/rules | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e89f099..2ea3ff5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ qtruby (4:4.11.3-4.1) unstable; urgency=medium
   * Non-maintainer upload with maintainer approval.
   * ruby-qt4.postinst: Clean up obsolete diversions of rbqtapi dating back to
 libqt4-ruby1.8/lenny.  (Closes: #775894)
+  * Allow arch-indep-only builds by restricting the dh_installexamples
+override to arch-specific builds.
 
  -- Andreas Beckmann a...@debian.org  Sun, 25 Jan 2015 12:43:54 +0100
 
diff --git a/debian/rules b/debian/rules
index 82d7721..2e222a0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -25,8 +25,8 @@ override_dh_auto_configure:
 override_dh_compress:
 	dh_compress -X.rb -X.ui -X.mng -X.xbel
 
-override_dh_installexamples:
-	dh_installexamples
+override_dh_installexamples-arch:
+	dh_installexamples -a
 	tar cvzf $(CURDIR)/debian/ruby-qt4/usr/share/doc/ruby-qt4/examples.tar.gz examples
 
 override_dh_makeshlibs:
-- 
2.1.4



Bug#775894: libqt4-ruby1.8: leaves diversion after upgrade from from lenny - squeeze - wheezy - jessie

2015-01-24 Thread Scott Kitterman
On Sunday, January 25, 2015 01:20:01 Andreas Beckmann wrote:
 Followup-For: Bug #775894
 Control: severity -1 serious
 
 Hi,
 
 after the upgrade sequence lenny - squeeze - wheezy - jessie the
 situation of rbqtapi is as follows:
 
 # l /usr/bin/rbqt*
 lrwxrwxrwx 1 root root7 May 18  2014 /usr/bin/rbqt4api - rbqtapi
 -rwxr-xr-x 1 root root 4570 Jun 28  2013 /usr/bin/rbqtapi.qt3
 
 # dpkg -S /usr/bin/rbqt*
 ruby-qt4: /usr/bin/rbqt4api
 diversion by libqt4-ruby1.8 from: /usr/bin/rbqtapi
 diversion by libqt4-ruby1.8 to: /usr/bin/rbqtapi.qt3
 
 Since there is no /usr/bin/rbqtapi, I'm raising the severity to serious.
 
 The attached patch fixes the situation by cleaning up the obsolete
 diversion in ruby-qt4.postinst. I'm doing this in ruby-qt4 instead of
 the transitional libqt4-ruby1.8 package since the transitional one may
 alredy have been removed.
 I verified in piuparts and manually that this patch actually cleans up
 the situation.

I would suggest you go ahead an NMU (no delay).  I'm travelling for work, so 
unlikely to be able to at this for at least a week.

Scott K

signature.asc
Description: This is a digitally signed message part.