deb-pkg: Fix building for MIPS big-endian or ARM OABI
authorBen Hutchings <ben@decadent.org.uk>
Thu, 5 Dec 2013 14:39:11 +0000 (14:39 +0000)
committerMichal Marek <mmarek@suse.cz>
Fri, 3 Jan 2014 16:28:23 +0000 (17:28 +0100)
These commands will mysteriously fail:

$ make ARCH=arm versatile_defconfig
[...]
$ make ARCH=arm deb-pkg
[...]
make[1]: *** [deb-pkg] Error 1
make: *** [deb-pkg] Error 2

The Debian architecture selection for these kernel architectures does
'grep FOO=y $KCONFIG_CONFIG && echo bar', and after 'set -e' this
aborts the script if grep does not find the given config symbol.

Fixes: 10f26fa64200 ('build, deb-pkg: select userland architecture based on UTS_MACHINE')
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/package/builddeb

index 5fcfc33dd5baafd2d902b505edc7ab42b7a2e357..f46e4dd0558da4582b38c75d4342456cceefd920 100644 (file)
@@ -41,9 +41,9 @@ create_package() {
        parisc*)
                debarch=hppa ;;
        mips*)
-               debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el) ;;
+               debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;;
        arm*)
-               debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el) ;;
+               debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;;
        *)
                echo "" >&2
                echo "** ** **  WARNING  ** ** **" >&2