chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Increase sqlite_busy_timeout in debpolicy-dbretry
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index 7b447dedaf3db59f1778918c9f6204e81db5266e..de7ee0ccdf74c8df6604585401db673819103422 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-75,7
+75,7
@@
our (@curl) = qw(curl -f);
our (@dput) = qw(dput);
our (@debsign) = qw(debsign);
our (@gpg) = qw(gpg);
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);
our (@ssh) = 'ssh';
our (@dgit) = qw(dgit);
our (@dpkgbuildpackage) = qw(dpkg-buildpackage -i\.git/ -I.git);
@@
-155,7
+155,7
@@
END {
local ($?);
foreach my $f (@end) {
eval { $f->(); };
local ($?);
foreach my $f (@end) {
eval { $f->(); };
-
warn
"$us: cleanup: $@" if length $@;
+
print STDERR
"$us: cleanup: $@" if length $@;
}
};
}
};
@@
-1706,7
+1706,7
@@
sub clone ($) {
canonicalise_suite();
badusage "dry run makes no sense with clone" unless act_local();
my $hasgit = check_for_git();
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);
changedir $dstdir;
runcmd @git, qw(init -q);
my $giturl = access_giturl(1);
@@
-1751,7
+1751,14
@@
sub pull () {
}
sub check_not_dirty () {
}
sub check_not_dirty () {
+ foreach my $f (qw(local-options local-patch-header)) {
+ if (stat_exists "debian/source/$f") {
+ fail "git tree contains debian/source/$f";
+ }
+ }
+
return if $ignoredirty;
return if $ignoredirty;
+
my @cmd = (@git, qw(diff --quiet HEAD));
debugcmd "+",@cmd;
$!=0; $?=0; system @cmd;
my @cmd = (@git, qw(diff --quiet HEAD));
debugcmd "+",@cmd;
$!=0; $?=0; system @cmd;
@@
-1761,12
+1768,6
@@
sub check_not_dirty () {
} else {
failedcmd @cmd;
}
} else {
failedcmd @cmd;
}
-
- foreach my $f (qw(local-options local-patch-header)) {
- if (stat_exists "debian/source/$f") {
- fail "git tree contains debian/source/$f";
- }
- }
}
sub commit_admin ($) {
}
sub commit_admin ($) {
@@
-2082,7
+2083,7
@@
END
sign_changes $changesfile;
}
sign_changes $changesfile;
}
- supplementary_message(<<
'END'
);
+ supplementary_message(<<
END
);
Push failed, while uploading package(s) to the archive server.
You can retry the upload of exactly these same files with dput of:
$changesfile
Push failed, while uploading package(s) to the archive server.
You can retry the upload of exactly these same files with dput of:
$changesfile
@@
-2130,7
+2131,13
@@
sub cmd_clone {
return if $!==&ENOENT;
die "chdir $cwd_remove: $!";
}
return if $!==&ENOENT;
die "chdir $cwd_remove: $!";
}
- rmtree($dstdir) or die "remove $dstdir: $!\n";
+ if (stat $dstdir) {
+ rmtree($dstdir) or die "remove $dstdir: $!\n";
+ } elsif (!grep { $! == $_ }
+ (ENOENT, ENOTDIR, EACCES, EPERM, ELOOP)) {
+ } else {
+ print STDERR "check whether to remove $dstdir: $!\n";
+ }
};
}
};
}
@@
-3102,11
+3109,11
@@
sub build_source {
$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') {
- runcmd_ordryrun_local
(@dpkgbuildpackage, qw(-us -uc -S)
),
- changesopts();
+ runcmd_ordryrun_local
@dpkgbuildpackage, qw(-us -uc -S
),
+
changesopts();
} elsif ($cleanmode eq 'dpkg-source-d') {
} elsif ($cleanmode eq 'dpkg-source-d') {
- runcmd_ordryrun_local
(@dpkgbuildpackage, qw(-us -uc -S -d)
),
- changesopts();
+ runcmd_ordryrun_local
@dpkgbuildpackage, qw(-us -uc -S -d
),
+
changesopts();
} else {
my $pwd = must_getcwd();
my $leafdir = basename $pwd;
} else {
my $pwd = must_getcwd();
my $leafdir = basename $pwd;
@@
-3160,6
+3167,8
@@
sub cmd_quilt_fixup {
my $clogp = parsechangelog();
$version = getfield $clogp, 'Version';
$package = getfield $clogp, 'Source';
my $clogp = parsechangelog();
$version = getfield $clogp, 'Version';
$package = getfield $clogp, 'Source';
+ check_not_dirty();
+ clean_tree();
build_maybe_quilt_fixup();
}
build_maybe_quilt_fixup();
}