[Piuparts-commits] [piuparts] 03/04: scripts: enable foreign architectures for cross-toolchains

Holger Levsen holger at moszumanska.debian.org
Sun Nov 16 11:59:18 UTC 2014


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 4cfae90268ea04653ce9ba044c4a8f3084131de4
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sat Nov 15 23:20:32 2014 +0100

    scripts: enable foreign architectures for cross-toolchains
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 .../scripts/pre_install_foreign_architecture       | 40 ++++++++++++++++++++++
 debian/changelog                                   |  2 ++
 2 files changed, 42 insertions(+)

diff --git a/custom-scripts/scripts/pre_install_foreign_architecture b/custom-scripts/scripts/pre_install_foreign_architecture
new file mode 100755
index 0000000..eb9d822
--- /dev/null
+++ b/custom-scripts/scripts/pre_install_foreign_architecture
@@ -0,0 +1,40 @@
+#!/bin/sh
+set -e
+
+test "$PIUPARTS_PHASE" = "install" || exit 0
+
+case "$PIUPARTS_DISTRIBUTION" in
+	lenny*|squeeze*|wheezy*) exit 0 ;;
+esac
+
+FOREIGN=
+
+case ${PIUPARTS_OBJECTS%%=*} in
+	*-aarch64-linux-gnu)
+		FOREIGN="arm64"
+		;;
+	*-arm-linux-gnueabi)
+		FOREIGN="armel"
+		;;
+	*-arm-linux-gnueabihf)
+		FOREIGN="armhf"
+		;;
+	*-mips-linux-gnu)
+		FOREIGN="mips"
+		;;
+	*-mipsel-linux-gnu)
+		FOREIGN="mipsel"
+		;;
+	*-powerpc-linux-gnu)
+		FOREIGN="ppc"
+		;;
+	*-powerpc64le-linux-gnu)
+		FOREIGN="ppc64el"
+		;;
+esac
+
+if [ -n "$FOREIGN" ] && [ "$FOREIGN" != "$(dpkg --print-architecture)" ]; then
+	echo "Enabling foreign architecture $FOREIGN for $PIUPARTS_OBJECTS"
+	dpkg --add-architecture $FOREIGN
+	apt-get update
+fi
diff --git a/debian/changelog b/debian/changelog
index ddde9ac..67ccaf5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,8 @@ piuparts (0.61) UNRELEASED; urgency=medium
   * piuparts.py:
     - Add to ignored_files:
       + /etc/modules-load.d/modules.conf  (dangling symlink to ../modules)
+  * pre_install_foreign_architecture: New script to enable foreign
+    architectures for testing cross toolchain packages.
 
  -- Holger Levsen <holger at debian.org>  Sun, 26 Oct 2014 20:19:35 +0100
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list