[devscripts] 01/01: mk-build-deps: Define the deb's version when parsing a debian/control file.

James McCoy jamessan at debian.org
Fri Sep 6 00:54:01 UTC 2013


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch master
in repository devscripts.

commit 7de237926798eb4eb6485c4c3537c8988c11c794
Author: James McCoy <jamessan at debian.org>
Date:   Thu Sep 5 20:53:31 2013 -0400

    mk-build-deps: Define the deb's version when parsing a debian/control file.
    
    Closes: #721939
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog         |    2 ++
 scripts/mk-build-deps.pl |   11 +++++++++++
 2 files changed, 13 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 85fdcd5..0b4d94d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ devscripts (2.13.4) UNRELEASED; urgency=low
 
   * Document which scripts use libdistro-info-perl.  (Closes: #708311)
   * Make curl return a proper exit code for HTTP errors.  (Closes: #720508)
+  * mk-build-deps: Define the deb's version when parsing a debian/control
+    file.  (Closes: #721939)
 
  -- James McCoy <jamessan at debian.org>  Sun, 18 Aug 2013 07:17:51 -0400
 
diff --git a/scripts/mk-build-deps.pl b/scripts/mk-build-deps.pl
index 11304e1..8879783 100755
--- a/scripts/mk-build-deps.pl
+++ b/scripts/mk-build-deps.pl
@@ -283,6 +283,17 @@ while ($control = shift) {
 	if (exists $ctrl->{Version}) {
 	    push(@versions, $ctrl->{Version});
 	}
+	elsif ($name eq 'Source') {
+	    (my $changelog = $control) =~ s at control$@changelog@;
+	    if (-f $changelog) {
+		require Dpkg::Changelog::Parse;
+		my $log = Dpkg::Changelog::Parse::changelog_parse(file => $changelog);
+		if ($ctrl->{$name} eq $log->{$name}) {
+		    $ctrl->{Version} = $log->{Version};
+		    push(@versions, $log->{Version});
+		}
+	    }
+	}
 
 	# Only build a package with both B-D and B-D-I in Depends if the
 	# B-D/B-D-I specific packages weren't requested

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list