diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-01-31 08:03:42 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-01-31 08:03:42 +0100 |
commit | 81039036831fb4cd597c385c41e25ae6cdc03652 (patch) | |
tree | 4a34482b13b352fad980ec58ee3ec7354c4216ca /gbp | |
parent | a7e7bc6d89421f919f43ead780ff548225c3fe24 (diff) |
import_dsc: use three slashes by default for apt URLs
We don't have a host part so leave that empty. Since there very likely
won't be any ever accept only two slashes as well.
Diffstat (limited to 'gbp')
-rw-r--r-- | gbp/scripts/import_dsc.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gbp/scripts/import_dsc.py b/gbp/scripts/import_dsc.py index 280be433..8ee59d52 100644 --- a/gbp/scripts/import_dsc.py +++ b/gbp/scripts/import_dsc.py @@ -306,6 +306,8 @@ def is_download(pkg): """ >>> is_download("http://foo.example.com/apackage.dsc") (True, 'http://foo.example.com/apackage.dsc') + >>> is_download("apt:///apackage/sid") + (True, 'apackage/sid') >>> is_download("apt://apackage/sid") (True, 'apackage/sid') >>> is_download("apt_1.0_amd64.dsc") @@ -316,7 +318,7 @@ def is_download(pkg): if pkg.startswith('file://'): return (False, pkg[len('file://'):]) elif pkg.startswith('apt://'): - return (True, pkg[len('apt://'):]) + return (True, pkg[len('apt://'):].lstrip('/')) elif re.match("[a-z]{1,5}://", pkg): return (True, pkg) return (False, pkg) |