diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-09 15:00:01 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-10 11:51:19 +0000 |
commit | c8dee9b92dfd545852ecac8dc2adfc95ac02e957 (patch) | |
tree | 5f1b86954646a0f3bb914407994388a6a4346769 /meta/classes/debian.bbclass | |
parent | 5d3860f4a8abb8e95442b04f8b84a333af362fcd (diff) | |
download | poky-c8dee9b92dfd545852ecac8dc2adfc95ac02e957.tar.gz |
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/debian.bbclass')
-rw-r--r-- | meta/classes/debian.bbclass | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass index 554525dc84..025abcfad0 100644 --- a/meta/classes/debian.bbclass +++ b/meta/classes/debian.bbclass | |||
@@ -22,8 +22,8 @@ python () { | |||
22 | python debian_package_name_hook () { | 22 | python debian_package_name_hook () { |
23 | import glob, copy, stat, errno, re | 23 | import glob, copy, stat, errno, re |
24 | 24 | ||
25 | pkgdest = bb.data.getVar('PKGDEST', d, 1) | 25 | pkgdest = d.getVar('PKGDEST', 1) |
26 | packages = bb.data.getVar('PACKAGES', d, 1) | 26 | packages = d.getVar('PACKAGES', 1) |
27 | bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir", True)) + "$") | 27 | bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir", True)) + "$") |
28 | lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir", True)) + "$") | 28 | lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir", True)) + "$") |
29 | so_re = re.compile("lib.*\.so") | 29 | so_re = re.compile("lib.*\.so") |
@@ -60,7 +60,7 @@ python debian_package_name_hook () { | |||
60 | for f in files: | 60 | for f in files: |
61 | if so_re.match(f): | 61 | if so_re.match(f): |
62 | fp = os.path.join(root, f) | 62 | fp = os.path.join(root, f) |
63 | cmd = (bb.data.getVar('BUILD_PREFIX', d, 1) or "") + "objdump -p " + fp + " 2>/dev/null" | 63 | cmd = (d.getVar('BUILD_PREFIX', 1) or "") + "objdump -p " + fp + " 2>/dev/null" |
64 | fd = os.popen(cmd) | 64 | fd = os.popen(cmd) |
65 | lines = fd.readlines() | 65 | lines = fd.readlines() |
66 | fd.close() | 66 | fd.close() |
@@ -74,7 +74,7 @@ python debian_package_name_hook () { | |||
74 | if len(sonames) == 1: | 74 | if len(sonames) == 1: |
75 | soname = sonames[0] | 75 | soname = sonames[0] |
76 | elif len(sonames) > 1: | 76 | elif len(sonames) > 1: |
77 | lead = bb.data.getVar('LEAD_SONAME', d, 1) | 77 | lead = d.getVar('LEAD_SONAME', 1) |
78 | if lead: | 78 | if lead: |
79 | r = re.compile(lead) | 79 | r = re.compile(lead) |
80 | filtered = [] | 80 | filtered = [] |
@@ -95,21 +95,21 @@ python debian_package_name_hook () { | |||
95 | if soname_result: | 95 | if soname_result: |
96 | (pkgname, devname) = soname_result | 96 | (pkgname, devname) = soname_result |
97 | for pkg in packages.split(): | 97 | for pkg in packages.split(): |
98 | if (bb.data.getVar('PKG_' + pkg, d) or bb.data.getVar('DEBIAN_NOAUTONAME_' + pkg, d)): | 98 | if (d.getVar('PKG_' + pkg) or d.getVar('DEBIAN_NOAUTONAME_' + pkg)): |
99 | continue | 99 | continue |
100 | debian_pn = bb.data.getVar('DEBIANNAME_' + pkg, d) | 100 | debian_pn = d.getVar('DEBIANNAME_' + pkg) |
101 | if debian_pn: | 101 | if debian_pn: |
102 | newpkg = debian_pn | 102 | newpkg = debian_pn |
103 | elif pkg == orig_pkg: | 103 | elif pkg == orig_pkg: |
104 | newpkg = pkgname | 104 | newpkg = pkgname |
105 | else: | 105 | else: |
106 | newpkg = pkg.replace(orig_pkg, devname, 1) | 106 | newpkg = pkg.replace(orig_pkg, devname, 1) |
107 | mlpre=bb.data.getVar('MLPREFIX', d, True) | 107 | mlpre=d.getVar('MLPREFIX', True) |
108 | if mlpre: | 108 | if mlpre: |
109 | if not newpkg.find(mlpre) == 0: | 109 | if not newpkg.find(mlpre) == 0: |
110 | newpkg = mlpre + newpkg | 110 | newpkg = mlpre + newpkg |
111 | if newpkg != pkg: | 111 | if newpkg != pkg: |
112 | bb.data.setVar('PKG_' + pkg, newpkg, d) | 112 | d.setVar('PKG_' + pkg, newpkg) |
113 | 113 | ||
114 | # reversed sort is needed when some package is substring of another | 114 | # reversed sort is needed when some package is substring of another |
115 | # ie in ncurses we get without reverse sort: | 115 | # ie in ncurses we get without reverse sort: |
@@ -117,7 +117,7 @@ python debian_package_name_hook () { | |||
117 | # and later | 117 | # and later |
118 | # DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libticw orig_pkg ncurses-libtic debian_pn None newpkg libticw | 118 | # DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libticw orig_pkg ncurses-libtic debian_pn None newpkg libticw |
119 | # so we need to handle ncurses-libticw->libticw5 before ncurses-libtic->libtic5 | 119 | # so we need to handle ncurses-libticw->libticw5 before ncurses-libtic->libtic5 |
120 | for pkg in sorted((bb.data.getVar('AUTO_LIBNAME_PKGS', d, 1) or "").split(), reverse=True): | 120 | for pkg in sorted((d.getVar('AUTO_LIBNAME_PKGS', 1) or "").split(), reverse=True): |
121 | auto_libname(packages, pkg) | 121 | auto_libname(packages, pkg) |
122 | } | 122 | } |
123 | 123 | ||