into handhelds.org:/home/kergoth/code/oe/packages
2004/09/15 21:47:28-04:00 handhelds.org!kergoth
Add filter() and filter_out() convenience functions (def'd, in the python
namespace, not the oe metadata one).
BKrev: 4148f0e4hjS7vY7OQhMymq8dtyQMdg
FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"
+def filter(f, str, d):
+ from re import match
+ ret = []
+ for w in str.split():
+ if match(f, w, 0):
+ ret += [ w ]
+ return " ".join(ret)
+
+def filter_out(f, str, d):
+ from re import match
+ ret = []
+ for w in str.split():
+ if not match(f, w, 0):
+ ret += [ w ]
+ return " ".join(ret)
+
die() {
oefatal "$*"
}