Skip to content

Commit

Permalink
Fix the Debian packaging script on systems with no codename
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
marmistrz authored and Michal Marek committed Jul 26, 2016
1 parent ca617dc commit 4c58606
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/package/builddeb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 4c58606

Please sign in to comment.