diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-07-06 12:14:18 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-07-06 15:57:24 +0100 |
commit | 4fa125c3dc9f093864d5e327eb339c431a93a5f2 (patch) | |
tree | 6a35ed7d980430ba8826d7cde6e282291cce2c78 /dgit | |
parent | 08b7893fc9ce813587108a7172f9143e87c07c9a (diff) |
dgit: Allow -p with various push modes
This checks the supplied package name against the changelog.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -6575,12 +6575,15 @@ sub WANTSRC_BUILDER () { 02; } # caller should run dpkg-buildpackage sub build_or_push_prep_early () { our $build_or_push_prep_early_done //= 0; return if $build_or_push_prep_early_done++; - badusage f_ "-p is not allowed with dgit %s", $subcommand - if defined $package; my $clogp = parsechangelog(); $isuite = getfield $clogp, 'Distribution'; - $package = getfield $clogp, 'Source'; + my $gotpackage = getfield $clogp, 'Source'; $version = getfield $clogp, 'Version'; + $package //= $gotpackage; + if ($package ne $gotpackage) { + fail f_ "-p specified package %s, but changelog says %s", + $package, $gotpackage; + } $dscfn = dscfn($version); } |