diff options
Diffstat (limited to 'pbuilder-satisfydepends-funcs')
-rwxr-xr-x | pbuilder-satisfydepends-funcs | 18 |
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/^[^: ]*://' } |