diff options
| author | Ben Hutchings <ben@decadent.org.uk> | 2018-07-26 06:20:28 -0400 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-07-27 21:53:44 -0400 |
| commit | f2abcc13e4a1b3139f1e3a0ca71bf4db8b7dfe72 (patch) | |
| tree | 147a50822895445cd456416ab6d91f5dca1c4103 /scripts/package | |
| parent | 43fee2b238959a7b46e2e8c0cd3305c7c044ded8 (diff) | |
builddeb: Skip architecture detection when KBUILD_DEBARCH is set
If KBUILD_DEBARCH is set then we will not use the result of
architecture detection, and we may also warn unnecessarily.
Move the check for KBUILD_DEBARCH further up to avoid this.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/package')
| -rwxr-xr-x | scripts/package/mkdebian | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index 985d72d1ab34..434f0b4d5231 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian | |||
| @@ -7,6 +7,11 @@ | |||
| 7 | set -e | 7 | set -e |
| 8 | 8 | ||
| 9 | set_debarch() { | 9 | set_debarch() { |
| 10 | if [ -n "$KBUILD_DEBARCH" ] ; then | ||
| 11 | debarch="$KBUILD_DEBARCH" | ||
| 12 | return | ||
| 13 | fi | ||
| 14 | |||
| 10 | # Attempt to find the correct Debian architecture | 15 | # Attempt to find the correct Debian architecture |
| 11 | case "$UTS_MACHINE" in | 16 | case "$UTS_MACHINE" in |
| 12 | i386|ia64|alpha) | 17 | i386|ia64|alpha) |
| @@ -46,10 +51,8 @@ set_debarch() { | |||
| 46 | echo "Falling back to using your current userspace instead!" >&2 | 51 | echo "Falling back to using your current userspace instead!" >&2 |
| 47 | echo "Please add support for $UTS_MACHINE to ${0} ..." >&2 | 52 | echo "Please add support for $UTS_MACHINE to ${0} ..." >&2 |
| 48 | echo "" >&2 | 53 | echo "" >&2 |
| 54 | ;; | ||
| 49 | esac | 55 | esac |
| 50 | if [ -n "$KBUILD_DEBARCH" ] ; then | ||
| 51 | debarch="$KBUILD_DEBARCH" | ||
| 52 | fi | ||
| 53 | } | 56 | } |
| 54 | 57 | ||
| 55 | # Some variables and settings used throughout the script | 58 | # Some variables and settings used throughout the script |
