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

Mattia Rizzolo mattia at debian.org
Sat Jul 23 16:27:34 UTC 2016


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

mattia pushed a commit to branch 635696_b-d_as_last_line_in_dsc
in repository pbuilder.

commit 36fa094123bd7d22b1f4b73580bf964af6e4d2ad
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Sat Jul 23 16:26:56 2016 +0000

    fixup! satisfydepends-funcs: don't ignore the last line of a .dsc while parsing it
    
    also deal with trailing comments (and \t, and ' ')
---
 pbuilder-satisfydepends-funcs        |  2 +-
 t/test_pbuilder-satisfydepends-funcs | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/pbuilder-satisfydepends-funcs b/pbuilder-satisfydepends-funcs
index 5c23080..60f8eca 100755
--- a/pbuilder-satisfydepends-funcs
+++ b/pbuilder-satisfydepends-funcs
@@ -78,8 +78,8 @@ t store
 d
 : store
 H
-$ b skip
 : loop
+$ b skip
 n
 /^#/ b loop
 /^[ \t]/ b store
diff --git a/t/test_pbuilder-satisfydepends-funcs b/t/test_pbuilder-satisfydepends-funcs
index 9302f8a..142bcf9 100755
--- a/t/test_pbuilder-satisfydepends-funcs
+++ b/t/test_pbuilder-satisfydepends-funcs
@@ -44,6 +44,7 @@ Build-Depends: wrong build depends, line
 Description: test
  other things
  wow
+# EOL comment
 EOF
     get_build_deps
 }
@@ -57,6 +58,15 @@ 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
+}
+
 test_get_build_deps_dsc() {
     cat <<EOF >"$DEBIAN_CONTROL"
 -----BEGIN PGP SIGNED MESSAGE-----
@@ -114,6 +124,7 @@ expect_output "autotools-dev (>= 1.2), debhelper, quilt (<< 12:0), libwxgtk2.8-d
 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