summaryrefslogtreecommitdiff
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-05-15 11:06:22 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 10:43:41 +0100
commit309117d26de6a87b16406a44a0cefcbaaf7b5d7a (patch)
tree399af4175aef587ae2882af2d6f7a19545b7f6c2 /meta/classes/package.bbclass
parent363424cdc78cafa278008f973c2b4288297ebf8c (diff)
downloadopenembedded-core-309117d26de6a87b16406a44a0cefcbaaf7b5d7a.tar.gz
openembedded-core-309117d26de6a87b16406a44a0cefcbaaf7b5d7a.tar.bz2
openembedded-core-309117d26de6a87b16406a44a0cefcbaaf7b5d7a.zip
update-alternatives.bbclass: Refactor the implementation
Refactor in order to: * Deprecate the old interfaces, but keep them for compatibility * Provide a new, interface -- capable of working with split packages * Each update-alternative will now set proper "per-file" provides Note: this adds a warning message when the older deprecated behavior is used. The older behavior has been fully tested using oe-core. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass16
1 files changed, 10 insertions, 6 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 8b0ac55b76..58320dd7ef 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1156,6 +1156,15 @@ python package_do_filedeps() {
rpmdeps = d.expand("${RPMDEPS}")
r = re.compile(r'[<>=]+ +[^ ]*')
+ def file_translate(file):
+ ft = file.replace("@", "@at@")
+ ft = ft.replace(" ", "@space@")
+ ft = ft.replace("\t", "@tab@")
+ ft = ft.replace("[", "@openbrace@")
+ ft = ft.replace("]", "@closebrace@")
+ ft = ft.replace("_", "@underscore@")
+ return ft
+
# Quick routine to process the results of the rpmdeps call...
def process_deps(pipe, pkg, provides_files, requires_files):
provides = {}
@@ -1173,12 +1182,7 @@ python package_do_filedeps() {
continue
file = f.replace(pkgdest + "/" + pkg, "")
- file = file.replace("@", "@at@")
- file = file.replace(" ", "@space@")
- file = file.replace("\t", "@tab@")
- file = file.replace("[", "@openbrace@")
- file = file.replace("]", "@closebrace@")
- file = file.replace("_", "@underscore@")
+ file = file_translate(file)
value = line.split(":", 1)[1].strip()
value = r.sub(r'(\g<0>)', value)