diff options
author | Marcin Mielniczuk <marmistrz.dev@gmail.com> | 2016-07-12 15:42:35 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.com> | 2016-07-26 17:12:08 -0400 |
commit | 4c586062b275dcddc18f521ac092cf0f600a36de (patch) | |
tree | 4c3ea0fe09a2622ead4911a934d99abbbe314705 /scripts/package/builddeb | |
parent | ca617dc68b23407c4b7427d4f2fd71e0ba7ba81d (diff) |
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>
Diffstat (limited to 'scripts/package/builddeb')
-rwxr-xr-x | scripts/package/builddeb | 3 |
1 files changed, 2 insertions, 1 deletions
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>" | |||
240 | # Try to determine distribution | 240 | # Try to determine distribution |
241 | if [ -n "$KDEB_CHANGELOG_DIST" ]; then | 241 | if [ -n "$KDEB_CHANGELOG_DIST" ]; then |
242 | distribution=$KDEB_CHANGELOG_DIST | 242 | 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 | ||
244 | : # nothing to do in this case | 245 | : # nothing to do in this case |
245 | else | 246 | else |
246 | distribution="unstable" | 247 | distribution="unstable" |