Просмотр исходного кода

On install for Ubuntu adjust the i386 GNU cpu name in cputable

Ubuntu builds their i386 architecture for i686 instead of i486 like
Debian does. This change helps them use an unmodified upstream source.

This should be considered a temporary measure until a better, more
generic implementation comes up, or is required for other derivatives,
but for now this will do.

Closes: #611741

Signed-off-by: Guillem Jover <guillem@debian.org>
Colin Watson лет назад: 15
Родитель
Сommit
aacb1f1ec9
2 измененных файлов с 9 добавлено и 0 удалено
  1. 2 0
      debian/changelog
  2. 7 0
      debian/rules

+ 2 - 0
debian/changelog

@@ -34,6 +34,8 @@ dpkg (1.16.0) UNRELEASED; urgency=low
   * Do not segfault on “dpkg -i --no-act”.
   * Add missing semicolon to the vsnprintf() compat declaration.
     Thanks to Robert Millan. Closes: #612203
+  * On install for Ubuntu adjust the i386 GNU cpu name in cputable.
+    Thanks to Colin Watson <cjwatson@ubuntu.com>. Closes: #611741
 
   [ Raphaël Hertzog ]
   * Fail properly when debian/source/format is empty. Closes: #600854

+ 7 - 0
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