From: Marcin Mielniczuk Date: Tue, 12 Jul 2016 19:42:35 +0000 (+0200) Subject: Fix the Debian packaging script on systems with no codename X-Git-Tag: v4.8-rc1~58^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4c586062b275dcddc18f521ac092cf0f600a36de;p=karo-tx-linux.git Fix the Debian packaging script on systems with no codename When calling `make deb-pkg` on a system with no codename (for example Arch Linux), lsb_release sometimes outputs `n/a` as the codename. This breaks dpkg-parsechangelog, which can't process the changelog correctly. Signed-off-by: Marcin Mielniczuk Signed-off-by: Michal Marek --- diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 116ef00c0b82..510add6d050c 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -240,7 +240,8 @@ maintainer="$name <$email>" # Try to determine distribution if [ -n "$KDEB_CHANGELOG_DIST" ]; then distribution=$KDEB_CHANGELOG_DIST -elif distribution=$(lsb_release -cs 2>/dev/null) && [ -n "$distribution" ]; then +# In some cases lsb_release returns the codename as n/a, which breaks dpkg-parsechangelog +elif distribution=$(lsb_release -cs 2>/dev/null) && [ -n "$distribution" ] && [ "$distribution" != "n/a" ]; then : # nothing to do in this case else distribution="unstable"