chiark / gitweb /
dgit: update-vcs-git: Honour --package properly.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 Jul 2018 11:20:50 +0000 (12:20 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 Jul 2018 11:22:42 +0000 (12:22 +0100)
Specifically, use package_from_d_control rather than open-coding
a substandard implementation.

The consequent abolition of $sourcep does mean that if the user
specifies the suite `.', and does not specify -p, we needlessly parse
debian/control twice.  This doesn't really matter.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit

index 51748225018ee1a489e42c32a66020728899ac35..a45d6337af75101586cb7b2bd0016751fa99565d 100644 (file)
@@ -1,6 +1,7 @@
 dgit (5.7~) unstable; urgency=medium
 
-  * 
+  Bugfixes:
+  * dgit update-vcs-git: Honour --package properly.
 
  --
 
diff --git a/dgit b/dgit
index db12d229e2faecffc675658398f366cc02ae9018..404eab9620edd61190668285164899d0010ad960 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -4658,11 +4658,10 @@ sub cmd_update_vcs_git () {
        }
     }
 
-    my $sourcep = parsecontrol 'debian/control', 'debian/control';
-    $package = getfield $sourcep, 'Source';
+    package_from_d_control();
     my $ctrl;
     if ($specsuite eq '.') {
-       $ctrl = $sourcep;
+       $ctrl = parsecontrol 'debian/control', 'debian/control';
     } else {
        $isuite = $specsuite;
        get_archive_dsc();