Bug#908651: src:gnome-breakout: FTBFS when built twice in a row: /bin/sh: 0: Can't open ../mkinstalldirs

Yavor Doganov yavor at gnu.org
Wed Sep 12 09:34:28 BST 2018


Source: gnome-breakout
Version: 0.5.3-5
Severity: minor
Tags: patch

On Tue, 11 Sep 2018 16:26:54 +0300,
Markus Koschany wrote:
> The only thing I noticed is, gnome-breakout can't be built twice in
> a row. ;)

> /bin/sh: 0: Can't open ../mkinstalldirs

Right, I should have fixed that too.  This is a general problem with
all packages that use AM_GLIB_GNU_GETTEXT and were bootstrapped with a
fairly old /usr/share/glib-2.0/gettext/po/Makefile.in.in.

Automake stopped installing mkinstalldirs by default 15 years ago
(November 2003, to be precise) so it is not installed when
dh_autoreconf is run for the second time, because dh_autoreconf_clean
rightfully deletes it before that.  But po/Makefile requires
mkinstalldirs and there's no way to override that -- you can't define
MKINSTALLDIRS in debian/rules because all of this happens at
autoreconf time, and you can't pass it as argument to dh_auto_install
because po/Makefile's rules use "test -r" and resort to mkinstalldirs
if that fails.  And test -r "mkdir -p" will fail.

Attached is a patch that fixes this.  The long-term solution is to
switch to gettext as all of the active GNOME/GTK+ projects have done.
-------------- next part --------------
>From a11d4453bb7268488db7c8200214bb5062dbb89a Mon Sep 17 00:00:00 2001
From: Yavor Doganov <yavor at gnu.org>
Date: Wed, 12 Sep 2018 11:05:08 +0300
Subject: [PATCH] Fix FTBFS when building twice in a row

---
 debian/autogen.sh | 3 +++
 debian/rules      | 7 +++++++
 2 files changed, 10 insertions(+)
 create mode 100755 debian/autogen.sh

diff --git a/debian/autogen.sh b/debian/autogen.sh
new file mode 100755
index 0000000..38accbf
--- /dev/null
+++ b/debian/autogen.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+glib-gettextize --force --copy
+autoreconf --force --install
diff --git a/debian/rules b/debian/rules
index f665a5d..b34dff4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,12 +6,19 @@ export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
 %:
 	dh $@
 
+override_dh_autoreconf:
+	dh_autoreconf debian/autogen.sh
+
 override_dh_auto_configure:
 	dh_auto_configure -- \
 	--prefix=/usr \
 	--bindir=\$${prefix}/games \
 	--datadir=\$${prefix}/share/games
 
+override_dh_auto_clean:
+	rm -f po/*.gmo
+	dh_auto_clean
+
 override_dh_auto_install:
 	dh_auto_install
 
-- 
2.19.0



More information about the Pkg-games-devel mailing list