tags 581725 + patch
thanks

On Sat, 2010-05-15 at 12:54 +0200, Cyril Brulebois wrote:
> your package no longer builds on kfreebsd-*:
> | cd debian; if [ -f util-linux/sbin/fdisk ]; then \
> |         ln util-linux/sbin/*fdisk fdisk-udeb/usr/sbin/; \
> |         S=fdisk-udeb/usr/sbin/cfdisk; if [ -f $S ]; then mv $S 
> cfdisk-udeb/usr/sbin/; fi; \
> |     fi
> | ln: target `fdisk-udeb/usr/sbin/' is not a directory: No such file or 
> directory
> | cd debian/util-linux-locales && find usr/share/locale -type f | while read 
> x; do ln $x ../cfdisk-udeb/$x; done
> | ln: creating hard link 
> `../cfdisk-udeb/usr/share/locale/ca/LC_MESSAGES/util-linux-ng.mo' => 
> `usr/share/locale/ca/LC_MESSAGES/util-linux-ng.mo': No such file or directory

The sparc build fails with the same issue; the common feature appears to
be that these are the architectures on which cfdisk-udeb is not built.

A change made in debhelper 7.4.16 means that commands which don't use -a
or -i only act on packages being built for the target architecture.
That in turn means that the cfdisk-udeb hierarchy is only created on
those architectures on which cfdisk-udeb is actually built, hence the
failure to link files in to it on other architectures.

The attached trivial patch guards the call linking in the locales files
with a check that debian/cfdisk-udeb actually exists, which will be the
case on architectures where the package is built.

Regards,

Adam
diff -u util-linux-2.17.2/debian/rules util-linux-2.17.2/debian/rules
--- util-linux-2.17.2/debian/rules
+++ util-linux-2.17.2/debian/rules
@@ -137,7 +137,9 @@
 	    ln util-linux/sbin/*fdisk fdisk-udeb/usr/sbin/; \
 	    S=fdisk-udeb/usr/sbin/cfdisk; if [ -f $$S ]; then mv $$S cfdisk-udeb/usr/sbin/; fi; \
 	fi
-	cd debian/util-linux-locales && find usr/share/locale -type f | while read x; do ln $$x ../cfdisk-udeb/$$x; done
+	if [ -d debian/cfdisk-udeb ]; then \
+		cd debian/util-linux-locales && find usr/share/locale -type f | while read x; do ln $$x ../cfdisk-udeb/$$x; done \
+	fi
 ifeq ($(DEB_HOST_ARCH_OS),linux)
 	install -m 644 debian/mount.fstab debian/mount/usr/share/doc/mount/examples/fstab
 ifeq ($(arch),$(findstring $(arch),powerpc ppc64))
diff -u util-linux-2.17.2/debian/changelog util-linux-2.17.2/debian/changelog
--- util-linux-2.17.2/debian/changelog
+++ util-linux-2.17.2/debian/changelog
@@ -1,3 +1,11 @@
+util-linux (2.17.2-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Only attempt to link locale-specific files in to the cfdisk-udeb heirarchy
+    if cfdisk-udeb is actually being built (Closes: #581725)
+
+ -- Adam D. Barratt <a...@adam-barratt.org.uk>  Sat, 05 Jun 2010 13:09:44 +0100
+
 util-linux (2.17.2-2) unstable; urgency=low
 
   * should build Depend: dpkg or install-info.  Closes: #581579

Reply via email to