my $i_arch_v = pseudomerge_version_check($clogp, $archive_hash);
if (!defined $overwrite_version) {
my $i_arch_v = pseudomerge_version_check($clogp, $archive_hash);
if (!defined $overwrite_version) {
if (defined $overwrite_version) {
} elsif (!eval {
my $t_dep14 = debiantag_maintview $i_arch_v->[0], access_nomdistro;
if (defined $overwrite_version) {
} elsif (!eval {
my $t_dep14 = debiantag_maintview $i_arch_v->[0], access_nomdistro;
- my $i_dgit = infopair_lrf_tag_lookup($t_dgit, "dgit view tag");
- my $i_archive = [ $archive_hash, "current archive contents" ];
+ my $i_dgit = infopair_lrf_tag_lookup($t_dgit, __ "dgit view tag");
+ my $i_archive = [ $archive_hash, __ "current archive contents" ];
my $r = pseudomerge_make_commit
$clogp, $dgitview, $archive_hash, $i_arch_v,
"dgit --quilt=$quilt_mode",
my $r = pseudomerge_make_commit
$clogp, $dgitview, $archive_hash, $i_arch_v,
"dgit --quilt=$quilt_mode",
- (defined $overwrite_version ? <<END_OVERWR : <<END_MAKEFF);
-Declare fast forward from $i_arch_v->[0]
-END_OVERWR
-Make fast forward from $i_arch_v->[0]
-END_MAKEFF
+ (defined $overwrite_version
+ ? f_ "Declare fast forward from %s\n", $arch_v
+ : f_ "Make fast forward from %s\n", $arch_v);
my $r = pseudomerge_make_commit
$clogp, $head, $archive_hash, $i_arch_v,
my $r = pseudomerge_make_commit
$clogp, $head, $archive_hash, $i_arch_v,
runcmd git_update_ref_cmd $m, 'HEAD', $r, $head;
runcmd git_update_ref_cmd $m, 'HEAD', $r, $head;
my $clogpackage = getfield $clogp, 'Source';
$package //= $clogpackage;
my $clogpackage = getfield $clogp, 'Source';
$package //= $clogpackage;
unless $package eq $clogpackage;
my $cversion = getfield $clogp, 'Version';
unless $package eq $clogpackage;
my $cversion = getfield $clogp, 'Version';
my $dversion = getfield $dsc, 'Version';
my $dscpackage = getfield $dsc, 'Source';
($dscpackage eq $package && $dversion eq $cversion) or
my $dversion = getfield $dsc, 'Version';
my $dscpackage = getfield $dsc, 'Source';
($dscpackage eq $package && $dversion eq $cversion) or
- fail "$dscfn is for $dscpackage $dversion".
- " but debian/changelog is for $package $cversion";
+ fail f_ "%s is for %s %s but debian/changelog is for %s %s",
+ $dscfn, $dscpackage, $dversion,
+ $package, $cversion;
my $changes = parsecontrol($changesfile,$changesfilewhat);
foreach my $field (qw(Source Distribution Version)) {
$changes->{$field} eq $clogp->{$field} or
my $changes = parsecontrol($changesfile,$changesfilewhat);
foreach my $field (qw(Source Distribution Version)) {
$changes->{$field} eq $clogp->{$field} or
- fail "changes field $field \`$changes->{$field}'".
- " does not match changelog \`$clogp->{$field}'";
+ fail f_ "changes field %s \`%s' does not match changelog \`%s'",
+ $field, $changes->{$field}, $clogp->{$field};
- print TO <<END or die $!;
-$package release $cversion for $clogsuite ($csuite)
-(maintainer view tag generated by dgit --quilt=$quilt_mode)
+ print TO f_ <<END, $package, $cversion, $clogsuite, $csuite,
+%s release %s for %s (%s)
+(maintainer view tag generated by dgit --quilt=%s)
Push failed, while checking state of the archive.
You can retry the push, after fixing the problem, if you like.
END
Push failed, while checking state of the archive.
You can retry the push, after fixing the problem, if you like.
END
- fail "package appears to be new in this suite;".
- " if this is intentional, use --new";
+ fail __ "package appears to be new in this suite;".
+ " if this is intentional, use --new";
Push failed, while preparing your push.
You can retry the push, after fixing the problem, if you like.
END
Push failed, while preparing your push.
You can retry the push, after fixing the problem, if you like.
END
- fail "looked for .dsc $dscpath, but $!;".
- " maybe you forgot to build";
+ fail f_ "looked for .dsc %s, but %s; maybe you forgot to build",
+ $dscpath, $!;
if (branch_is_gdr_unstitched_ff($symref, $actualhead, $archive_hash)) {
if (quiltmode_splitbrain()) {
my ($ffq_prev, $gdrlast) = branch_gdr_info($symref, $actualhead);
if (branch_is_gdr_unstitched_ff($symref, $actualhead, $archive_hash)) {
if (quiltmode_splitbrain()) {
my ($ffq_prev, $gdrlast) = branch_gdr_info($symref, $actualhead);
- fail <<END;
-Branch is managed by git-debrebase ($ffq_prev
-exists), but quilt mode ($quilt_mode) implies a split view.
+ fail f_ <<END, $ffq_prev, $quilt_mode;
+Branch is managed by git-debrebase (%s
+exists), but quilt mode (%s) implies a split view.
Pass the right --quilt option or adjust your git config.
Or, maybe, run git-debrebase forget-was-ever-debrebase.
END
Pass the right --quilt option or adjust your git config.
Or, maybe, run git-debrebase forget-was-ever-debrebase.
END
- $dgithead or fail
- "--quilt=$quilt_mode but no cached dgit view:
- perhaps HEAD changed since dgit build[-source] ?";
+ $dgithead or fail f_
+ "--quilt=%s but no cached dgit view:
+ perhaps HEAD changed since dgit build[-source] ?",
+ $quilt_mode;
" of the archive's version.\n".
"To overwrite the archive's contents,".
" pass --overwrite[=VERSION].\n".
" of the archive's version.\n".
"To overwrite the archive's contents,".
" pass --overwrite[=VERSION].\n".
runcmd qw(dpkg-source -x --),
$dscpath =~ m#^/# ? $dscpath : "$maindir/$dscpath";
my ($tree,$dir) = mktree_in_ud_from_only_subdir("source package");
runcmd qw(dpkg-source -x --),
$dscpath =~ m#^/# ? $dscpath : "$maindir/$dscpath";
my ($tree,$dir) = mktree_in_ud_from_only_subdir("source package");
- fail <<END.(join '', @mode_changes).<<END;
-HEAD specifies a different tree to $dscfn:
+ fail +(f_ <<ENDT, $dscfn).<<END
+HEAD specifies a different tree to %s:
+ENDT
- fail <<END;
-HEAD specifies a different tree to $dscfn:
+ fail +(f_ <<ENDT, $dscfn).<<END.(f_ <<ENDT, $tree, $referent);
+HEAD specifies a different tree to %s:
+ENDT
Perhaps you forgot to build. Or perhaps there is a problem with your
source tree (see dgit(7) for some hints). To see a full diff, run
Perhaps you forgot to build. Or perhaps there is a problem with your
source tree (see dgit(7) for some hints). To see a full diff, run
- fail "failed to find unique changes file".
- " (looked for $pat in $buildproductsdir);".
- " perhaps you need to use dgit -C"
+ fail f_ "failed to find unique changes file".
+ " (looked for %s in %s);".
+ " perhaps you need to use dgit -C",
+ $pat, $buildproductsdir
if ($sourceonlypolicy eq 'ok') {
} elsif ($sourceonlypolicy eq 'always') {
forceable_fail [qw(uploading-binaries)],
if ($sourceonlypolicy eq 'ok') {
} elsif ($sourceonlypolicy eq 'always') {
forceable_fail [qw(uploading-binaries)],
if $hasdebs;
} elsif ($sourceonlypolicy eq 'never') {
forceable_fail [qw(uploading-source-only)],
if $hasdebs;
} elsif ($sourceonlypolicy eq 'never') {
forceable_fail [qw(uploading-source-only)],
if !$hasdebs;
} elsif ($sourceonlypolicy eq 'not-wholly-new') {
forceable_fail [qw(uploading-source-only)],
if !$hasdebs;
} elsif ($sourceonlypolicy eq 'not-wholly-new') {
forceable_fail [qw(uploading-source-only)],
- "source-only upload, even though package is entirely NEW\n".
- "(this is contrary to policy in ".(access_nomdistro()).")"
+ f_ "source-only upload, even though package is entirely NEW\n".
+ "(this is contrary to policy in %s)",
+ access_nomdistro()
Push failed, while signing the tag.
You can retry the push, after fixing the problem, if you like.
END
Push failed, while signing the tag.
You can retry the push, after fixing the problem, if you like.
END
Push failed, *after* signing the tag.
If you want to try again, you should use a new version number.
END
Push failed, *after* signing the tag.
If you want to try again, you should use a new version number.
END
@git, qw(update-ref), "refs/tags/$tag", $tag_obj_hash;
}
@git, qw(update-ref), "refs/tags/$tag", $tag_obj_hash;
}
Push failed, while updating the remote git repository - see messages above.
If you want to try again, you should use a new version number.
END
Push failed, while updating the remote git repository - see messages above.
If you want to try again, you should use a new version number.
END
qw(-c push.followTags=false push), access_giturl(), @pushrefs;
runcmd_ordryrun git_update_ref_cmd 'dgit push', lrref(), $dgithead;
qw(-c push.followTags=false push), access_giturl(), @pushrefs;
runcmd_ordryrun git_update_ref_cmd 'dgit push', lrref(), $dgithead;
Push failed, while obtaining signatures on the .changes and .dsc.
If it was just that the signature failed, you may try again by using
debsign by hand to sign the changes file (see the command dgit tried,
Push failed, while obtaining signatures on the .changes and .dsc.
If it was just that the signature failed, you may try again by using
debsign by hand to sign the changes file (see the command dgit tried,
Push failed, while uploading package(s) to the archive server.
You can retry the upload of exactly these same files with dput of:
Push failed, while uploading package(s) to the archive server.
You can retry the upload of exactly these same files with dput of:
If that .changes file is broken, you will need to use a new version
number for your next attempt at the upload.
END
my $host = access_cfg('upload-host','RETURN-UNDEF');
my @hostarg = defined($host) ? ($host,) : ();
runcmd_ordryrun @dput, @hostarg, $changesfile;
If that .changes file is broken, you will need to use a new version
number for your next attempt at the upload.
END
my $host = access_cfg('upload-host','RETURN-UNDEF');
my @hostarg = defined($host) ? ($host,) : ();
runcmd_ordryrun @dput, @hostarg, $changesfile;
} elsif (grep { $! == $_ }
(ENOENT, ENOTDIR, EACCES, EPERM, ELOOP)) {
} else {
} elsif (grep { $! == $_ }
(ENOENT, ENOTDIR, EACCES, EPERM, ELOOP)) {
} else {
fetchpullargs();
if (quiltmode_splitbrain()) {
my ($format, $fopts) = get_source_format();
fetchpullargs();
if (quiltmode_splitbrain()) {
my ($format, $fopts) = get_source_format();
- madformat($format) and fail <<END
-dgit pull not yet supported in split view mode (--quilt=$quilt_mode)
+ madformat($format) and fail f_ <<END, $quilt_mode
+dgit pull not yet supported in split view mode (--quilt=%s)
@cmd = (@git, qw(remote add vcs-git), $url);
} elsif ($orgurl eq $url) {
@cmd = (@git, qw(remote add vcs-git), $url);
} elsif ($orgurl eq $url) {
@cmd = (@git, qw(remote set-url vcs-git), $url);
}
runcmd_ordryrun_local @cmd;
if ($dofetch) {
@cmd = (@git, qw(remote set-url vcs-git), $url);
}
runcmd_ordryrun_local @cmd;
if ($dofetch) {
- fail "dgit $subcommand: changelog specifies $isuite ($csuite)".
- " but command line specifies $specsuite";
+ fail f_ "dgit %s: changelog specifies %s (%s)".
+ " but command line specifies %s",
+ $subcommand, $isuite, $csuite, $specsuite;
$vsnwant =~ m{^(?:.*,)?$_(?:,.*)?$}
} @rpushprotovsn_support;
$vsnwant =~ m{^(?:.*,)?$_(?:,.*)?$}
} @rpushprotovsn_support;
- fail "build host has dgit rpush protocol versions ".
- (join ",", @rpushprotovsn_support).
- " but invocation host has $vsnwant"
+ fail f_ "build host has dgit rpush protocol versions %s".
+ " but invocation host has %s",
+ (join ",", @rpushprotovsn_support), $vsnwant
- mkdir $initiator_tempdir, 0700 or die "$initiator_tempdir: $!";
+ mkdir $initiator_tempdir, 0700
+ or fail f_ "create %s: %s", $initiator_tempdir, $!;
printdebug "waiting for build host child $pid...\n";
my $got = waitpid $pid, 0;
die $! unless $got == $pid;
printdebug "waiting for build host child $pid...\n";
my $got = waitpid $pid, 0;
die $! unless $got == $pid;
my $localname = i_method "i_localname", $keyword;
my $localpath = "$i_tmp/$localname";
stat_exists $localpath and
my $localname = i_method "i_localname", $keyword;
my $localpath = "$i_tmp/$localname";
stat_exists $localpath and
protocol_receive_file \*RO, $localpath;
i_method "i_file", $keyword;
}
protocol_receive_file \*RO, $localpath;
i_method "i_file", $keyword;
}
- fail "rpush negotiated protocol version $protovsn".
- " which does not support quilt mode $quilt_mode"
+ fail f_ "rpush negotiated protocol version %s".
+ " which does not support quilt mode %s",
+ $protovsn, $quilt_mode
if (!forceing [qw(buildinfo-changes-mismatch)]) {
files_compare_inputs($bd, $ch);
(getfield $bd, $_) eq (getfield $ch, $_) or
if (!forceing [qw(buildinfo-changes-mismatch)]) {
files_compare_inputs($bd, $ch);
(getfield $bd, $_) eq (getfield $ch, $_) or
unless $newmode =~ m/^(?:10|12)\d{4}$/ ||
$oldmode =~ m/^(?:10|12)\d{4}$/;
if ($oldmode =~ m/[^0]/ &&
$newmode =~ m/[^0]/) {
# both old and new files exist
unless $newmode =~ m/^(?:10|12)\d{4}$/ ||
$oldmode =~ m/^(?:10|12)\d{4}$/;
if ($oldmode =~ m/[^0]/ &&
$newmode =~ m/[^0]/) {
# both old and new files exist
- die "mode or type changed\n" if $oldmode ne $newmode;
- die "modified symlink\n" unless $newmode =~ m/^10/;
+ die __ "mode or type changed\n" if $oldmode ne $newmode;
+ die __ "modified symlink\n" unless $newmode =~ m/^10/;
my ($x,$y) = @_;
my $cmd = "git diff $x $y -- :/ ':!debian'";
$cmd .= " ':!/.gitignore' ':!*/.gitignore'" if $gitignore_special;
my ($x,$y) = @_;
my $cmd = "git diff $x $y -- :/ ':!debian'";
$cmd .= " ':!/.gitignore' ':!*/.gitignore'" if $gitignore_special;
- my $msg =
- "--quilt=$quilt_mode specified, implying patches-unapplied git tree\n".
- " but git tree differs from orig in upstream files.";
+ my $msg = f_
+ "--quilt=%s specified, implying patches-unapplied git tree\n".
+ " but git tree differs from orig in upstream files.",
+ $quilt_mode;
$msg .= $fulldiffhint->($unapplied, 'HEAD');
if (!stat_exists "debian/patches") {
$msg .= $fulldiffhint->($unapplied, 'HEAD');
if (!stat_exists "debian/patches") {
"\n ... debian/patches is missing; perhaps this is a patch queue branch?";
}
fail $msg;
}
if ($quilt_mode =~ m/dpm/ &&
($diffbits->{H2A} & 01)) {
"\n ... debian/patches is missing; perhaps this is a patch queue branch?";
}
fail $msg;
}
if ($quilt_mode =~ m/dpm/ &&
($diffbits->{H2A} & 01)) {
- fail <<END. $fulldiffhint->($oldtiptree,'HEAD');
---quilt=$quilt_mode specified, implying patches-applied git tree
+ fail +(f_ <<END, $quilt_mode). $fulldiffhint->($oldtiptree,'HEAD');
+--quilt=%s specified, implying patches-applied git tree
but git tree differs from result of applying debian/patches to upstream
END
}
if ($quilt_mode =~ m/gbp|unapplied/ &&
($diffbits->{O2A} & 01)) { # some patches
quiltify_splitbrain_needed();
but git tree differs from result of applying debian/patches to upstream
END
}
if ($quilt_mode =~ m/gbp|unapplied/ &&
($diffbits->{O2A} & 01)) { # some patches
quiltify_splitbrain_needed();
runcmd shell_cmd 'exec >/dev/null', gbp_pq, qw(import);
# gbp pq import creates a fresh branch; push back to dgit-view
runcmd @git, qw(update-ref refs/heads/dgit-view HEAD);
runcmd shell_cmd 'exec >/dev/null', gbp_pq, qw(import);
# gbp pq import creates a fresh branch; push back to dgit-view
runcmd @git, qw(update-ref refs/heads/dgit-view HEAD);
- fail <<END;
---quilt=$quilt_mode specified, implying that HEAD is for use with a
+ fail f_ <<END, $quilt_mode;
+--quilt=%s specified, implying that HEAD is for use with a
tool which does not create patches for changes to upstream
.gitignores: but, such patches exist in debian/patches.
END
tool which does not create patches for changes to upstream
.gitignores: but, such patches exist in debian/patches.
END
if (($diffbits->{O2H} & 02) && # user has modified .gitignore
!($diffbits->{O2A} & 02)) { # patches do not change .gitignore
quiltify_splitbrain_needed();
if (($diffbits->{O2H} & 02) && # user has modified .gitignore
!($diffbits->{O2A} & 02)) { # patches do not change .gitignore
quiltify_splitbrain_needed();
- open GIPATCH, ">>", "$gipatch" or die "$gipatch: $!";
- stat GIPATCH or die "$gipatch: $!";
- fail "$gipatch already exists; but want to create it".
- " to record .gitignore changes" if (stat _)[7];
- print GIPATCH <<END or die "$gipatch: $!";
+ open GIPATCH, ">>", "$gipatch" or confess "$gipatch: $!";
+ stat GIPATCH or confess "$gipatch: $!";
+ fail f_ "%s already exists; but want to create it".
+ " to record .gitignore changes",
+ $gipatch
+ if (stat _)[7];
+ print GIPATCH <<END.<<ENDU or die "$gipatch: $!";
Subject: Update .gitignore from Debian packaging branch
The Debian packaging git branch contains these updates to the upstream
.gitignore file(s). This patch is autogenerated, to provide these
updates to users of the official Debian archive view of the package.
Subject: Update .gitignore from Debian packaging branch
The Debian packaging git branch contains these updates to the upstream
.gitignore file(s). This patch is autogenerated, to provide these
updates to users of the official Debian archive view of the package.
close GIPATCH or die "$gipatch: $!";
runcmd shell_cmd "exec >>$gipatch", @git, qw(diff),
$unapplied, $headref, "--", sort keys %$editedignores;
close GIPATCH or die "$gipatch: $!";
runcmd shell_cmd "exec >>$gipatch", @git, qw(diff),
$unapplied, $headref, "--", sort keys %$editedignores;
print SERIES "auto-gitignore\n" or die $!;
close SERIES or die $!;
runcmd @git, qw(add -f -- debian/patches/series), $gipatch;
print SERIES "auto-gitignore\n" or die $!;
close SERIES or die $!;
runcmd @git, qw(add -f -- debian/patches/series), $gipatch;
if ($quilt_mode eq 'linear') {
print STDERR "\n$us: error: quilt fixup cannot be linear. Stopped at:\n";
my $all_gdr = !!@nots;
foreach my $notp (@nots) {
if ($quilt_mode eq 'linear') {
print STDERR "\n$us: error: quilt fixup cannot be linear. Stopped at:\n";
my $all_gdr = !!@nots;
foreach my $notp (@nots) {
- print STDERR "$us: ", $reportnot->($notp), "\n";
+ my $c = $notp->{Child};
+ my $cprange = $abbrev->($notp);
+ $cprange .= "..".$abbrev->($c) if $c;
+ print STDERR "$us: $cprange: $notp->{Whynot}\n";
$all_gdr &&= $notp->{Child} &&
(git_cat_file $notp->{Child}{Commit}, 'commit')
=~ m{^\[git-debrebase(?! split[: ]).*\]$}m;
$all_gdr &&= $notp->{Child} &&
(git_cat_file $notp->{Child}{Commit}, 'commit')
=~ m{^\[git-debrebase(?! split[: ]).*\]$}m;
die "contains leading punctuation\n" if m{^\W} || m{/\W};
die "contains bad character(s)\n" if m{[^-a-z0-9_.+=~/]}i;
die "is series file\n" if m{$series_filename_re}o;
die "contains leading punctuation\n" if m{^\W} || m{/\W};
die "contains bad character(s)\n" if m{[^-a-z0-9_.+=~/]}i;
die "is series file\n" if m{$series_filename_re}o;
sub quilt_fixup_delete_pc () {
runcmd @git, qw(rm -rqf .pc);
sub quilt_fixup_delete_pc () {
runcmd @git, qw(rm -rqf .pc);