[pbuilder] 01/01: satisfydepends-funcs: don't ignore the last line of a .dsc while parsing it

Mattia Rizzolo mattia at debian.org
Sat Jul 23 16:42:02 UTC 2016


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

mattia pushed a commit to branch master
in repository pbuilder.

commit d26259a06a0b8b513aa9fdaacb07375e2216ca70
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Sat Jul 23 14:11:04 2016 +0000

    satisfydepends-funcs: don't ignore the last line of a .dsc while parsing it
    
    Thanks: HW42 for providing the needed sed magic
    Closes: #635696
---
 pbuilder-satisfydepends-funcs        |  2 ++
 t/test_pbuilder-satisfydepends-funcs | 21 +++++++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/pbuilder-satisfydepends-funcs b/pbuilder-satisfydepends-funcs
index 6e81cf4..60f8eca 100755
--- a/pbuilder-satisfydepends-funcs
+++ b/pbuilder-satisfydepends-funcs
@@ -79,9 +79,11 @@ d
 : store
 H
 : loop
+$ b skip
 n
 /^#/ b loop
 /^[ \t]/ b store
+: skip
 x
 # output on single line
 s/\n//g
diff --git a/t/test_pbuilder-satisfydepends-funcs b/t/test_pbuilder-satisfydepends-funcs
index 12cf8d7..142bcf9 100755
--- a/t/test_pbuilder-satisfydepends-funcs
+++ b/t/test_pbuilder-satisfydepends-funcs
@@ -44,6 +44,25 @@ Build-Depends: wrong build depends, line
 Description: test
  other things
  wow
+# EOL comment
+EOF
+    get_build_deps
+}
+
+test_get_build_deps_source_para_only() {
+    local BINARY_ARCH="$1"
+    cat <<EOF >"$DEBIAN_CONTROL"
+Source: foo
+Build-Depends: bar
+EOF
+    get_build_deps
+}
+
+test_get_build_deps_one_line_trailing_comment() {
+    local BINARY_ARCH="all"
+    cat << EOF >"$DEBIAN_CONTROL"
+Build-Depends: blabla
+# EOL comment
 EOF
     get_build_deps
 }
@@ -104,6 +123,8 @@ expect_output "autotools-dev (>= 1.2), debhelper, quilt (<< 12:0), libwxgtk2.8-d
     test_get_build_deps "binary"
 expect_output "autotools-dev (>= 1.2), debhelper, quilt (<< 12:0), libwxgtk2.8-dev, test [amd64 i386], test1, test2 [!i386 !amd64], test3 | test4, test5" \
     test_get_build_deps "all"
+expect_output "bar" test_get_build_deps_source_para_only "any"
+expect_output "blabla" test_get_build_deps_one_line_trailing_comment
 
 
 expect_fail checkbuilddep_archdeps "foo [amd64]" "amd64"

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



More information about the Pbuilder-maint mailing list