diff options
author | Mathieu Parent <math.parent@gmail.com> | 2018-07-15 09:55:56 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2018-08-24 08:32:39 +0200 |
commit | 03accd298de99757077bf72f8d6f3b76a6b3f6a7 (patch) | |
tree | 953e3106bbbc8c961cec0e34eeab09e1978d4f2b /gbp/scripts/import_orig.py | |
parent | 7ce98d64b3e505c09ad785a561f59815ca26d20d (diff) |
import-orig: Allow to import the requested version with --uscan
Closes: #741148
Diffstat (limited to 'gbp/scripts/import_orig.py')
-rw-r--r-- | gbp/scripts/import_orig.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py index 298e7e7b..3d974e93 100644 --- a/gbp/scripts/import_orig.py +++ b/gbp/scripts/import_orig.py @@ -133,7 +133,7 @@ def detect_name_and_version(repo, source, options): return (sourcepackage, version) -def find_upstream(use_uscan, args): +def find_upstream(use_uscan, args, version=None): """Find the main tarball to import - either via uscan or via command line argument @return: upstream source filename or None if nothing to import @rtype: string @@ -161,7 +161,7 @@ def find_upstream(use_uscan, args): uscan = Uscan() gbp.log.info("Launching uscan...") try: - if not uscan.scan(): + if not uscan.scan(download_version=version): gbp.log.info("package is up to date, nothing to do.") return None except UscanError as e: @@ -422,7 +422,7 @@ def main(argv): if options.download: upstream = download_orig(args[0]) else: - upstream = find_upstream(options.uscan, args) + upstream = find_upstream(options.uscan, args, options.version) if not upstream: return ExitCodes.uscan_up_to_date |