Package: dpkg
Version: 1.15.8.10
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch natty
Thanks to lots of hard work in the past, Ubuntu is tantalisingly close
to just being able to use Debian's dpkg source package without
modifications. The last substantive piece is that we build our i386
architecture for i686 rather than for i486, and thus require a different
cputable entry so that DEB_BUILD_GNU_CPU is set properly when building
packages. This patch uses dpkg-vendor to adjust cputable appropriately
if and only if dpkg is being built on an Ubuntu-derived system.
Doing this in debian/rules is of course slightly hacky, but I didn't
think it was worth attempting to design a more complex system for a
single use case. We can revisit this if and when other uses come along.
(Note also that dpkg uses the output of dpkg-architecture at configure
time - m4/dpkg-arch.m4 - but it only uses the Debian names, not the GNU
names, so it doesn't matter that we only do this substitution later.)
diff --git a/debian/rules b/debian/rules
index b4b70b8..64fdcf2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -80,6 +80,13 @@ install: check
cd build-tree && $(MAKE) DESTDIR="$(CURDIR)/debian/tmp" install
+ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
+ # Ubuntu's "i386" architecture is built for i686 (the Debian default
+ # is i486).
+ sed -ri 's/^(i386[[:space:]]+)[^[:space:]]+/\1i686/' \
+ $(CURDIR)/debian/tmp/usr/share/dpkg/cputable
+endif
+
# Put together the dpkg and dselect packages
binary-arch: install
dh_testdir -a
Thanks,
--
Colin Watson [[email protected]]
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]