1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 01:19:52 +00:00

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>
This commit is contained in:
Mark Hatle
2012-05-15 11:06:22 -05:00
committed by Richard Purdie
parent f28209d9d3
commit 6ac7e9b598
3 changed files with 293 additions and 71 deletions
+10 -6
View File
@@ -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)