aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/scripts/buildpackage.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-02-14 07:58:12 +0100
committerGuido Günther <agx@sigxcpu.org>2017-02-14 07:58:12 +0100
commit0e6e23e78a32ee614a5412ebdbe3d05a30c49c97 (patch)
treeffe116ad6cdeea181732673133f6fd42f300e566 /gbp/scripts/buildpackage.py
parent0146f4b452c535e4f81a4ba7e9b90a33c6d6d0b1 (diff)
Improve error message for non-native packages with broken version numbers
Closes: #824634
Diffstat (limited to 'gbp/scripts/buildpackage.py')
-rwxr-xr-xgbp/scripts/buildpackage.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py
index 3cb49f01..e14122a5 100755
--- a/gbp/scripts/buildpackage.py
+++ b/gbp/scripts/buildpackage.py
@@ -86,6 +86,10 @@ def prepare_upstream_tarball(repo, source, options, tarball_dir, output_dir):
Make sure we have an upstream tarball. This involves loooking in
tarball_dir, symlinking or building it.
"""
+ if not source.is_native() and not source.upstream_version:
+ raise GbpError("Non-native package '%s' "
+ "has invalid version '%s'" % (source.name, source.version))
+
options.comp_type = guess_comp_type(repo,
options.comp_type,
source,