From fcb6d19080cb6139fd7dbe481bc56c634a496bc5 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 23 Oct 2016 19:14:04 +0100 Subject: [PATCH] dgit: Break out parse_dscdata. No functional change. Signed-off-by: Ian Jackson --- dgit | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dgit b/dgit index 5be5c75b..426aef2e 100755 --- a/dgit +++ b/dgit @@ -960,6 +960,13 @@ sub must_getcwd () { return $d; } +sub parse_dscdata () { + my $dscfh = new IO::File \$dscdata, '<' or die $!; + printdebug Dumper($dscdata) if $debuglevel>1; + $dsc = parsecontrolfh($dscfh,$dscurl,1); + printdebug Dumper($dsc) if $debuglevel>1; +} + our %rmad; sub archive_query ($;@) { @@ -1358,10 +1365,7 @@ sub get_archive_dsc () { fail "$dscurl has hash $got but". " archive told us to expect $digest"; } - my $dscfh = new IO::File \$dscdata, '<' or die $!; - printdebug Dumper($dscdata) if $debuglevel>1; - $dsc = parsecontrolfh($dscfh,$dscurl,1); - printdebug Dumper($dsc) if $debuglevel>1; + parse_dscdata(); my $fmt = getfield $dsc, 'Format'; $format_ok{$fmt} or forceable_fail [qw(unsupported-source-format)], "unsupported source format $fmt, sorry"; -- 2.30.2