diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-05-15 11:06:22 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 12:04:37 +0100 |
commit | 6ac7e9b5981872b22dcd07f0f7171e1f7c10e284 (patch) | |
tree | 4e36c4023c1358b108a4546abc60d91fdb425d57 /meta/classes/package.bbclass | |
parent | f28209d9d3c67203a2c7a2b25cacfe31643d1bfa (diff) | |
download | poky-6ac7e9b5981872b22dcd07f0f7171e1f7c10e284.tar.gz |
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.
(From OE-Core rev: 309117d26de6a87b16406a44a0cefcbaaf7b5d7a)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 16 |
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() { | |||
1156 | rpmdeps = d.expand("${RPMDEPS}") | 1156 | rpmdeps = d.expand("${RPMDEPS}") |
1157 | r = re.compile(r'[<>=]+ +[^ ]*') | 1157 | r = re.compile(r'[<>=]+ +[^ ]*') |
1158 | 1158 | ||
1159 | def file_translate(file): | ||
1160 | ft = file.replace("@", "@at@") | ||
1161 | ft = ft.replace(" ", "@space@") | ||
1162 | ft = ft.replace("\t", "@tab@") | ||
1163 | ft = ft.replace("[", "@openbrace@") | ||
1164 | ft = ft.replace("]", "@closebrace@") | ||
1165 | ft = ft.replace("_", "@underscore@") | ||
1166 | return ft | ||
1167 | |||
1159 | # Quick routine to process the results of the rpmdeps call... | 1168 | # Quick routine to process the results of the rpmdeps call... |
1160 | def process_deps(pipe, pkg, provides_files, requires_files): | 1169 | def process_deps(pipe, pkg, provides_files, requires_files): |
1161 | provides = {} | 1170 | provides = {} |
@@ -1173,12 +1182,7 @@ python package_do_filedeps() { | |||
1173 | continue | 1182 | continue |
1174 | 1183 | ||
1175 | file = f.replace(pkgdest + "/" + pkg, "") | 1184 | file = f.replace(pkgdest + "/" + pkg, "") |
1176 | file = file.replace("@", "@at@") | 1185 | file = file_translate(file) |
1177 | file = file.replace(" ", "@space@") | ||
1178 | file = file.replace("\t", "@tab@") | ||
1179 | file = file.replace("[", "@openbrace@") | ||
1180 | file = file.replace("]", "@closebrace@") | ||
1181 | file = file.replace("_", "@underscore@") | ||
1182 | value = line.split(":", 1)[1].strip() | 1186 | value = line.split(":", 1)[1].strip() |
1183 | value = r.sub(r'(\g<0>)', value) | 1187 | value = r.sub(r'(\g<0>)', value) |
1184 | 1188 | ||