chiark / gitweb /
Import: orig files: cope with signatures
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Oct 2016 16:47:33 +0000 (17:47 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Oct 2016 18:26:31 +0000 (19:26 +0100)
Fix up .orig detection to handle .asc's (and other signatures) of
.orig components the same way as their tarballs.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit

index a55ee20d547ad4d7ff05e00a13175af35a97ad31..3cd6e8e6cc5965fdd42c25cd773fcd84e2348ee1 100644 (file)
@@ -58,6 +58,8 @@ dgit (1.5~~) unstable; urgency=medium
   * Fix up .orig detection to be less trustful of (ambiguous) filenames.
   * Fix up .orig detection to correctly allow exactly the right
     .orig-comp components accorging to dpkg-source(1).
+  * Fix up .orig detection to handle .asc's (and other signatures)
+    of .orig components the same way as their tarballs.
 
   Test suite:
   * When sbuild fails, do not crash due to sed not finding the log
diff --git a/dgit b/dgit
index e11d2fb5b8014c885474e5badb18d8a857cfb593..e05c57436d7f06d9c6f298d5039436e4d1544601 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -78,7 +78,8 @@ our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)");
 our $suite_re = '[-+.0-9a-z]+';
 our $cleanmode_re = 'dpkg-source(?:-d)?|git|git-ff|check|none';
 our $orig_f_comp_re = 'orig(?:-[-0-9a-z]+)?';
-our $orig_f_tail_re = "$orig_f_comp_re\\.tar(?:\\.\\w+)?";
+our $orig_f_sig_re = '\\.(?:asc|gpg|pgp)';
+our $orig_f_tail_re = "$orig_f_comp_re\\.tar(?:\\.\\w+)?(?:$orig_f_sig_re)?";
 
 our $git_authline_re = '^([^<>]+) \<(\S+)\> (\d+ [-+]\d+)$';
 our $splitbraincache = 'dgit-intern/quilt-cache';
@@ -1593,6 +1594,7 @@ sub generate_commits_from_dsc () {
        printdebug "import considering $f ";
        (printdebug "only one dfi\n"), next if @dfi == 1;
        (printdebug "not tar\n"), next unless $f =~ m/\.tar(\.\w+)?$/;
+       (printdebug "signature\n"), next if $f =~ m/$orig_f_sig_re$/o;
        my $compr_ext = $1;
 
        my ($orig_f_part) =