From 499e3fa251a0352701e9f4faa1d5c797318692f4 Mon Sep 17 00:00:00 2001 From: Junichi Uekawa Date: Mon, 16 Mar 2009 19:12:33 +0900 Subject: handle packages line wrapping with something other than ',' in Build-Depends (closes: 519306) It used to rely on ',' being there, which really package maintainers are free to insert '|' etc. --- pbuilder-satisfydepends-funcs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'pbuilder-satisfydepends-funcs') diff --git a/pbuilder-satisfydepends-funcs b/pbuilder-satisfydepends-funcs index f431880..5c16269 100755 --- a/pbuilder-satisfydepends-funcs +++ b/pbuilder-satisfydepends-funcs @@ -58,12 +58,24 @@ get_control_re() { cat "$control" | awk ' BEGIN { source=1 } - /^$/ { source=0 } + /^$/ { + if (p) { + print s + s="" + } + source=0 + } /^Source:/ { source=1 } - /^[^ ]*:/ { p=0 } + /^[^ ]*:/ { + if (source && p) { + print s + s="" + } + p=0 + } /^#/ { next } tolower($0) ~ /^'"$re"':/ { p=1 } - { if (p && source) { print $0 } }' | + { if (p && source) { s=s""$0 } }' | sed 's/^[^: ]*://' } -- cgit v1.2.3