chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce build_prep subroutine and use it where appropriate
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index 77a9bb6025306fda3d3661a82460c73542669d89..1db2cdb0893108093911b78dcb460087ce89ee01 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-415,6
+415,8
@@
sub canonicalise_suite_madison ($$) {
}
sub canonicalise_suite () {
}
sub canonicalise_suite () {
+ return if defined $csuite;
+ fail "cannot operate on $isuite suite" if $isuite eq 'UNRELEASED';
$csuite = archive_query('canonicalise_suite');
if ($isuite ne $csuite) {
# madison canonicalises for us
$csuite = archive_query('canonicalise_suite');
if ($isuite ne $csuite) {
# madison canonicalises for us
@@
-951,7
+953,7
@@
sub cmd_pull {
sub cmd_push {
parseopts();
badusage "-p is not allowed with dgit push" if defined $package;
sub cmd_push {
parseopts();
badusage "-p is not allowed with dgit push" if defined $package;
-
runcmd @git, qw(diff --quiet HEAD
);
+
check_not_dirty(
);
my $clogp = parsechangelog();
$package = getfield $clogp, 'Source';
if (@ARGV==0) {
my $clogp = parsechangelog();
$package = getfield $clogp, 'Source';
if (@ARGV==0) {
@@
-1050,15
+1052,19
@@
sub quilt_fixup_editor () {
exit 0;
}
exit 0;
}
-sub cmd_build {
- # we pass further options and args to git-buildpackage
- badusage "-p is not allowed with dgit build" if defined $package;
- badusage "dgit build implies --clean=dpkg-source" if defined $package;
+sub build_prep () {
+ badusage "-p is not allowed when building" if defined $package;
+ check_not_dirty();
my $clogp = parsechangelog();
$isuite = getfield $clogp, 'Distribution';
$package = getfield $clogp, 'Source';
$version = getfield $clogp, 'Version';
build_maybe_quilt_fixup();
my $clogp = parsechangelog();
$isuite = getfield $clogp, 'Distribution';
$package = getfield $clogp, 'Source';
$version = getfield $clogp, 'Version';
build_maybe_quilt_fixup();
+}
+
+sub cmd_build {
+ badusage "dgit build implies --clean=dpkg-source" if defined $package;
+ build_prep();
my @cmd =
(qw(git-buildpackage -us -uc --git-no-sign-tags),
"--git-builder=@dpkgbuildpackage");
my @cmd =
(qw(git-buildpackage -us -uc --git-no-sign-tags),
"--git-builder=@dpkgbuildpackage");
@@
-1072,15
+1078,9
@@
sub cmd_build {
}
sub build_source {
}
sub build_source {
- badusage "-p is not allowed with this action" if defined $package;
- check_not_dirty();
- my $clogp = parsechangelog();
- $package = getfield $clogp, 'Source';
- $isuite = getfield $clogp, 'Distribution';
- $version = getfield $clogp, 'Version';
+ build_prep();
$sourcechanges = "${package}_${version}_source.changes";
$dscfn = dscfn($version);
$sourcechanges = "${package}_${version}_source.changes";
$dscfn = dscfn($version);
- build_maybe_quilt_fixup();
if ($cleanmode eq 'dpkg-source') {
runcmd_ordryrun (@dpkgbuildpackage, qw(-us -uc -S)), changesopts();
} else {
if ($cleanmode eq 'dpkg-source') {
runcmd_ordryrun (@dpkgbuildpackage, qw(-us -uc -S)), changesopts();
} else {