diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-08 00:03:53 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-08 22:14:48 +0000 |
commit | 19c2d673555201bf2bf6891cdd69236b1e599fb0 (patch) | |
tree | 244539bb07916235f0db4b76d027207b0865b300 /dgit | |
parent | dda17d8a6fec27f631653cf8ac63ba6d96e642c3 (diff) |
dgit: dsc Dgit field handling: Parse additional data
So far we don't do much with it, so this akes no change except to
messages.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1683,6 +1683,7 @@ sub create_remote_git_repo () { } our ($dsc_hash,$lastpush_mergeinput); +our ($dsc_distro, $dsc_hint_tag, $dsc_hint_url); our $ud = '.git/dgit/unpack'; @@ -2712,8 +2713,15 @@ sub parse_dsc_field ($$) { } if (!defined $f) { progress "$what: NO git hash"; - } elsif ($f =~ m/^\w+/) { + } elsif (($dsc_hash, $dsc_distro, $dsc_hint_tag, $dsc_hint_url) + = $f =~ m/^(\w+) ($distro_re) ($versiontag_re) (\S+)(?:\s|$)/) { + progress "$what: specified git info ($dsc_distro)"; + $dsc_hint_tag = [ $dsc_hint_tag ]; + } elsif ($f =~ m/^\w+\s*$/) { $dsc_hash = $&; + $dsc_distro //= 'debian'; + $dsc_hint_tag = [ debiantags +(getfield $dsc, 'Version'), + $dsc_distro ]; progress "$what: specified git hash"; } else { fail "$what: invalid Dgit info"; |