Fix the Debian packaging script on systems with no codename
PATCH 1/1 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.
---
scripts/package/builddeb +2 -1
@@ -238,7 +238,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"
Michal Marek
AppliedDne 12.7.2016 v 21:42 Marcin Mielniczuk napsal(a):
Quoted 19 lines
When calling
make deb-pkgon a system with no codename (for example Arch Linux),lsb_releasesometimes outputsn/aas the codename.This breaks dpkg-parsechangelog, which can't process the changelog correctly.
Signed-off-by Marcin Mielniczuk <[email protected]>---
scripts/package/builddeb +0
-1@@ -238,7 +238,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
Quoted 8 lines
"$distribution" ]; then
+# In some caseslsb_releasereturns 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"
Applied, but please fix your mailer to send properly formatted patches. The easiest test is to send a patch to yourself, save it and try to apply it with 'git am'.
Michal