Skip to content

Commit 4c58606

Browse files
marmistrzMichal Marek
authored andcommitted
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 <marmistrz.dev@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.com>
1 parent ca617dc commit 4c58606

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/package/builddeb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ maintainer="$name <$email>"
240240
# Try to determine distribution
241241
if [ -n "$KDEB_CHANGELOG_DIST" ]; then
242242
distribution=$KDEB_CHANGELOG_DIST
243-
elif distribution=$(lsb_release -cs 2>/dev/null) && [ -n "$distribution" ]; then
243+
# In some cases lsb_release returns the codename as n/a, which breaks dpkg-parsechangelog
244+
elif distribution=$(lsb_release -cs 2>/dev/null) && [ -n "$distribution" ] && [ "$distribution" != "n/a" ]; then
244245
: # nothing to do in this case
245246
else
246247
distribution="unstable"

0 commit comments

Comments
 (0)