aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-satisfydepends-funcs
diff options
context:
space:
mode:
authorJunichi Uekawa <dancer@netfort.gr.jp>2009-03-16 19:12:33 +0900
committerJunichi Uekawa <dancer@netfort.gr.jp>2009-03-16 19:12:33 +0900
commit499e3fa251a0352701e9f4faa1d5c797318692f4 (patch)
tree2b02648294ea43aef58095704d8564ec6f45f141 /pbuilder-satisfydepends-funcs
parentaa80657c561580daf6bb00436e0f6832e1e95dea (diff)
downloadpbuilder-499e3fa251a0352701e9f4faa1d5c797318692f4.tar
pbuilder-499e3fa251a0352701e9f4faa1d5c797318692f4.tar.gz
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.
Diffstat (limited to 'pbuilder-satisfydepends-funcs')
-rwxr-xr-xpbuilder-satisfydepends-funcs18
1 files changed, 15 insertions, 3 deletions
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/^[^: ]*://'
}