our $remotename = 'dgit';
our @ourdscfield = qw(Dgit Vcs-Dgit-Master);
our $branchprefix = 'dgit';
our $remotename = 'dgit';
our @ourdscfield = qw(Dgit Vcs-Dgit-Master);
our $branchprefix = 'dgit';
sub responder_send_file ($$) {
my ($keyword, $ourfn) = @_;
return unless $we_are_responder;
sub responder_send_file ($$) {
my ($keyword, $ourfn) = @_;
return unless $we_are_responder;
responder_send_command "file $keyword";
protocol_send_file \*STDOUT, $ourfn;
}
responder_send_command "file $keyword";
protocol_send_file \*STDOUT, $ourfn;
}
sub responder_receive_files ($@) {
my ($keyword, @ourfns) = @_;
die unless $we_are_responder;
sub responder_receive_files ($@) {
my ($keyword, @ourfns) = @_;
die unless $we_are_responder;
responder_send_command "want $keyword";
foreach my $fn (@ourfns) {
protocol_receive_file \*STDIN, $fn;
responder_send_command "want $keyword";
foreach my $fn (@ourfns) {
protocol_receive_file \*STDIN, $fn;
important dgit options:
-k<keyid> sign tag and package with <keyid> instead of default
--dry-run -n do not change anything, but go through the motions
important dgit options:
-k<keyid> sign tag and package with <keyid> instead of default
--dry-run -n do not change anything, but go through the motions
--new -N allow introducing a new package
--debug -D increase debug level
-c<name>=<value> set git config option (used directly by dgit too)
--new -N allow introducing a new package
--debug -D increase debug level
-c<name>=<value> set git config option (used directly by dgit too)
- runcmd_ordryrun shell_cmd 'cd ..', @dget,'--',$origurl;
+ runcmd_ordryrun_local shell_cmd 'cd ..', @dget,'--',$origurl;
- runcmd_ordryrun @git, qw(fetch),access_giturl(),fetchspec();
+ runcmd_ordryrun_local @git, qw(fetch),access_giturl(),fetchspec();
}
if ($lastpush_hash ne $hash) {
my @upd_cmd = (@git, qw(update-ref -m), 'dgit fetch', lrref(), $hash);
}
if ($lastpush_hash ne $hash) {
my @upd_cmd = (@git, qw(update-ref -m), 'dgit fetch', lrref(), $hash);
mkdir $dstdir or die "$dstdir $!";
chdir "$dstdir" or die "$dstdir $!";
runcmd @git, qw(init -q);
mkdir $dstdir or die "$dstdir $!";
chdir "$dstdir" or die "$dstdir $!";
runcmd @git, qw(init -q);
- runcmd_ordryrun @git, qw(merge -m),"Merge from $csuite [dgit]",
+ runcmd_ordryrun_local @git, qw(merge -m),"Merge from $csuite [dgit]",
sub commit_quilty_patch () {
my $output = cmdoutput @git, qw(status --porcelain);
my %adds;
sub commit_quilty_patch () {
my $output = cmdoutput @git, qw(status --porcelain);
my %adds;
foreach my $l (split /\n/, $output) {
next unless $l =~ m/\S/;
if ($l =~ m{^(?:\?\?| M) (.pc|debian/patches)}) {
$adds{$1}++;
foreach my $l (split /\n/, $output) {
next unless $l =~ m/\S/;
if ($l =~ m{^(?:\?\?| M) (.pc|debian/patches)}) {
$adds{$1}++;
push @sign_cmd, qw(-u),$keyid if defined $keyid;
push @sign_cmd, $tfn->('.tmp');
runcmd_ordryrun @sign_cmd;
push @sign_cmd, qw(-u),$keyid if defined $keyid;
push @sign_cmd, $tfn->('.tmp');
runcmd_ordryrun @sign_cmd;
$tagobjfn = $tfn->('.signed.tmp');
runcmd shell_cmd "exec >$tagobjfn", qw(cat --),
$tfn->('.tmp'), $tfn->('.tmp.asc');
$tagobjfn = $tfn->('.signed.tmp');
runcmd shell_cmd "exec >$tagobjfn", qw(cat --),
$tfn->('.tmp'), $tfn->('.tmp.asc');
my $tag_obj_hash = cmdoutput @git, qw(hash-object -w -t tag), $tagobjfn;
runcmd_ordryrun @git, qw(verify-tag), $tag_obj_hash;
my $tag_obj_hash = cmdoutput @git, qw(hash-object -w -t tag), $tagobjfn;
runcmd_ordryrun @git, qw(verify-tag), $tag_obj_hash;
- runcmd_ordryrun @git, qw(update-ref), "refs/tags/$tag", $tag_obj_hash;
+ runcmd_ordryrun_local @git, qw(update-ref), "refs/tags/$tag", $tag_obj_hash;
runcmd_ordryrun @git, qw(update-ref -m), 'dgit push', lrref(), 'HEAD';
if (!$we_are_responder) {
runcmd_ordryrun @git, qw(update-ref -m), 'dgit push', lrref(), 'HEAD';
if (!$we_are_responder) {
rename "../$dscfn.tmp","../$dscfn" or die "$dscfn $!";
} else {
progress "[new .dsc left in $dscfn.tmp]";
rename "../$dscfn.tmp","../$dscfn" or die "$dscfn $!";
} else {
progress "[new .dsc left in $dscfn.tmp]";
responder_receive_files('signed-dsc-changes',
"../$dscfn$dryrunsuffix",
"$changesfile$dryrunsuffix");
responder_receive_files('signed-dsc-changes',
"../$dscfn$dryrunsuffix",
"$changesfile$dryrunsuffix");
my ($keyword) = @_;
die "$keyword ?" if $i_wanted{$keyword}++;
my @localpaths = i_method "i_want", $keyword;
my ($keyword) = @_;
die "$keyword ?" if $i_wanted{$keyword}++;
my @localpaths = i_method "i_want", $keyword;
foreach my $localpath (@localpaths) {
protocol_send_file \*RI, $localpath;
}
foreach my $localpath (@localpaths) {
protocol_send_file \*RI, $localpath;
}
local $ENV{'EDITOR'} = cmdoutput qw(realpath --), $0;
local $ENV{'VISUAL'} = $ENV{'EDITOR'};
local $ENV{$fakeeditorenv} = cmdoutput qw(realpath --), $descfn;
local $ENV{'EDITOR'} = cmdoutput qw(realpath --), $0;
local $ENV{'VISUAL'} = $ENV{'EDITOR'};
local $ENV{$fakeeditorenv} = cmdoutput qw(realpath --), $descfn;
- runcmd_ordryrun @dpkgbuildpackage, qw(-us -uc), changesopts(), @ARGV;
+ runcmd_ordryrun_local @dpkgbuildpackage, qw(-us -uc), changesopts(), @ARGV;
push @cmd, "--git-debian-branch=".lbranch();
}
push @cmd, changesopts();
push @cmd, "--git-debian-branch=".lbranch();
}
push @cmd, changesopts();
$sourcechanges = "${package}_".(stripepoch $version)."_source.changes";
$dscfn = dscfn($version);
if ($cleanmode eq 'dpkg-source') {
$sourcechanges = "${package}_".(stripepoch $version)."_source.changes";
$dscfn = dscfn($version);
if ($cleanmode eq 'dpkg-source') {
'exec >$1; shift; exec "$@"','x',
"../$sourcechanges",
@dpkggenchanges, qw(-S), changesopts();
'exec >$1; shift; exec "$@"','x',
"../$sourcechanges",
@dpkggenchanges, qw(-S), changesopts();
stat $dscfn or fail "$dscfn (in parent directory): $!";
stat $sourcechanges or fail "$sourcechanges (in parent directory): $!";
foreach my $cf (glob $pat) {
stat $dscfn or fail "$dscfn (in parent directory): $!";
stat $sourcechanges or fail "$sourcechanges (in parent directory): $!";
foreach my $cf (glob $pat) {
- runcmd_ordryrun @sbuild, @ARGV, qw(-d), $isuite, $dscfn;
- runcmd_ordryrun @mergechanges, glob $pat;
+ runcmd_ordryrun_local @sbuild, @ARGV, qw(-d), $isuite, $dscfn;
+ runcmd_ordryrun_local @mergechanges, glob $pat;
stat $multichanges or fail "$multichanges: $!";
}
printdone "build successful, results in $multichanges\n" or die $!;
stat $multichanges or fail "$multichanges: $!";
}
printdone "build successful, results in $multichanges\n" or die $!;