aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-satisfydepends-funcs
diff options
context:
space:
mode:
authorLoïc Minier <lool@dooz.org>2007-03-31 22:47:33 +0200
committerLoïc Minier <lool@dooz.org>2007-03-31 22:47:33 +0200
commit475cf4ec89d394984172dadc35f95d7edb90eaac (patch)
tree892c5e754f68e5267d96bdd1ab6dc5b609db1455 /pbuilder-satisfydepends-funcs
parent78c12e2cfe056b94112e3207b7dc2305265bc727 (diff)
downloadpbuilder-475cf4ec89d394984172dadc35f95d7edb90eaac.tar
pbuilder-475cf4ec89d394984172dadc35f95d7edb90eaac.tar.gz
* Add function get_control_re() to pbuilder-satisfydepends-funcs to extract the
value of source headers from a control file. * Add function filter_arch_deps() to pbuilder-satisfydepends-aptitude to filter out arch dependencies not for a certain arch. * Source pbuilder-satisfydepends-funcs in pbuilder-satisfydepends-aptitude. * Add support for arch specific build-deps and build-conflicts to pbuilder-satisfydepends-aptitude.
Diffstat (limited to 'pbuilder-satisfydepends-funcs')
-rwxr-xr-xpbuilder-satisfydepends-funcs15
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"