X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=dgit;h=9803b13badd507a570d1d04ac77c045b57f6893e;hb=b85aa466413f10b9220edb20482a896d5be3d8c9;hp=dbb0a062e57bd206432dd05bf57b03e73c6c9709;hpb=d8d9cfc47004f047540c6d0059ddd7005b380a27;p=dgit.git diff --git a/dgit b/dgit index dbb0a062..9803b13b 100755 --- a/dgit +++ b/dgit @@ -59,6 +59,7 @@ our %previously; our $existing_package = 'dpkg'; our $cleanmode; our $changes_since_version; +our $rmchanges; our $quilt_mode; our $quilt_modes_re = 'linear|smash|auto|nofix|nocheck'; our $we_are_responder; @@ -75,7 +76,7 @@ our (@curl) = qw(curl -f); our (@dput) = qw(dput); our (@debsign) = qw(debsign); our (@gpg) = qw(gpg); -our (@sbuild) = qw(sbuild -A); +our (@sbuild) = qw(sbuild); our (@ssh) = 'ssh'; our (@dgit) = qw(dgit); our (@dpkgbuildpackage) = qw(dpkg-buildpackage -i\.git/ -I.git); @@ -147,6 +148,11 @@ sub dscfn ($) { return srcfn($vsn,".dsc"); } +sub changespat ($;$) { + my ($vsn, $arch) = @_; + return "${package}_".(stripepoch $vsn)."_".($arch//'*').".changes"; +} + our $us = 'dgit'; initdebug(''); @@ -155,7 +161,7 @@ END { local ($?); foreach my $f (@end) { eval { $f->(); }; - warn "$us: cleanup: $@" if length $@; + print STDERR "$us: cleanup: $@" if length $@; } }; @@ -1706,7 +1712,7 @@ sub clone ($) { canonicalise_suite(); badusage "dry run makes no sense with clone" unless act_local(); my $hasgit = check_for_git(); - mkdir $dstdir or die "$dstdir $!"; + mkdir $dstdir or fail "create \`$dstdir': $!"; changedir $dstdir; runcmd @git, qw(init -q); my $giturl = access_giturl(1); @@ -1997,12 +2003,11 @@ END } my $head = git_rev_parse('HEAD'); if (!$changesfile) { - my $multi = "$buildproductsdir/". - "${package}_".(stripepoch $cversion)."_multi.changes"; + my $multi = "$buildproductsdir/".changespat $cversion,'multi'; if (stat_exists "$multi") { $changesfile = $multi; } else { - my $pat = "${package}_".(stripepoch $cversion)."_*.changes"; + my $pat = changespat $cversion; my @cs = glob "$buildproductsdir/$pat"; fail "failed to find unique changes file". " (looked for $pat in $buildproductsdir, or $multi);". @@ -2083,7 +2088,7 @@ END sign_changes $changesfile; } - supplementary_message(<<'END'); + supplementary_message(<