[devscripts] 02/03: mk-build-deps: Read all output from “apt-cache showsrc”

James McCoy jamessan at debian.org
Mon Jul 7 03:35:46 UTC 2014


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

jamessan pushed a commit to branch master
in repository devscripts.

commit 03604e05f3e7cfdc1c174c4f3f50bb1504ed7761
Author: James McCoy <jamessan at debian.org>
Date:   Sun Jul 6 22:29:54 2014 -0400

    mk-build-deps: Read all output from “apt-cache showsrc”
    
    The call to wait_child() in the loop processing control stanzas could
    cause mk-build-deps to get stuck waiting on apt-cache's output due to
    apt-cache's stdout not being fully read.  Simply use the existing
    wait_child() outside of the parsing loop.
    
    Also, ensure we spell "nocheck" properly when calling wait_child().
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog         | 2 ++
 scripts/mk-build-deps.pl | 6 +-----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1b46bc5..6518d53 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ devscripts (2.14.6) UNRELEASED; urgency=medium
   * mk-build-deps:
     + Provide the package name, not file name, to “dpkg --remove” when package
       install fails.
+    + Read all of the output from “apt-cache showsrc” to ensure mk-build-deps
+      doesn't get stuck waiting for apt-cache to exit.
 
   [ Christoph Berg ]
   * Update all qa.debian.org URLs to https://.
diff --git a/scripts/mk-build-deps.pl b/scripts/mk-build-deps.pl
index b5a4cb3..c1be28f 100755
--- a/scripts/mk-build-deps.pl
+++ b/scripts/mk-build-deps.pl
@@ -243,10 +243,6 @@ while ($control = shift) {
 	    warn "$progname: Unable to find package name in $descr\n";
 	    next;
 	}
-	if (defined $pid) {
-	    wait_child($pid, no_check => 1);
-	    undef $pid;
-	}
 	unless (exists $ctrl->{$name}) {
 	    next;
 	}
@@ -323,7 +319,7 @@ while ($control = shift) {
 		   version => $ctrl->{Version} });
 	}
     }
-    wait_child($pid, no_check => 1) if defined $pid;
+    wait_child($pid, nocheck => 1) if defined $pid;
     # Only use the newest version.  We'll only have this if processing showsrc
     # output or a dsc file.
     if (@versions) {

-- 
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