diff options
Diffstat (limited to 'pbuilder-satisfydepends-funcs')
-rwxr-xr-x | pbuilder-satisfydepends-funcs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pbuilder-satisfydepends-funcs b/pbuilder-satisfydepends-funcs index 7e4367d..0a4d181 100755 --- a/pbuilder-satisfydepends-funcs +++ b/pbuilder-satisfydepends-funcs @@ -50,6 +50,21 @@ function checkbuilddep_versiondeps () { return 1; } +get_control_re() { + control="$1" + re="$2" + + cat "$control" | + awk ' + BEGIN { source=1 } + /^$/ { source=0 } + /^Source:/ { source=1 } + /^[^ ]*:/ { p=0 } + tolower($0) ~ /^'"$re"':/ { p=1 } + { if (p && source) { print $0 } }' | + sed 's/^[^: ]*://' +} + function checkbuilddep_archdeps () { # returns FALSE on INSTALL local INSTALLPKG="$1" |