summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2013-08-25 16:21:54 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2013-08-25 16:21:54 +0100
commit69c5b89e545bb8276b1bb20f399b8df75607d868 (patch)
treedd906089caa17d6ba29b835a4e635e6d35e28697
parent137c52ea5d2df0b07c30420697297032842407f4 (diff)
Introduce build_prep subroutine and use it where appropriate
-rw-r--r--debian/changelog2
-rwxr-xr-xdgit20
2 files changed, 11 insertions, 11 deletions
diff --git a/debian/changelog b/debian/changelog
index cdcf9ec..5d32b0c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,8 @@ dgit (0.11) unstable; urgency=low
* Better error message for use of UNRELEASED suite. Closes: #720523.
* Do not canonicalise suite more than once. Related to: #720526.
* Fix a badly open-coded copy of check_not_dirty. Closes: #720524.
+ * Fix some bugs in building (eg build-source would fail to do the quilt
+ fixup).
--
diff --git a/dgit b/dgit
index 693aa18..1db2cdb 100755
--- a/dgit
+++ b/dgit
@@ -1052,15 +1052,19 @@ sub quilt_fixup_editor () {
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();
+}
+
+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");
@@ -1074,15 +1078,9 @@ sub cmd_build {
}
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);
- build_maybe_quilt_fixup();
if ($cleanmode eq 'dpkg-source') {
runcmd_ordryrun (@dpkgbuildpackage, qw(-us -uc -S)), changesopts();
} else {