diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-22 12:03:17 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-24 09:40:20 +0000 |
commit | 3e3cb6207b07b4e9f15c621e2851c8950b724215 (patch) | |
tree | c52c6e3e74d560230707f5ddeab3c15aa6525e76 /meta/conf/bitbake.conf | |
parent | b963efbc9c4852328975046caa76cf941518f168 (diff) | |
download | poky-3e3cb6207b07b4e9f15c621e2851c8950b724215.tar.gz |
bitbake.conf: Remove horrible variable expansion hacks
We used to need these hacks to make things work. Rework the variables to
remove the horrible hacks and make things slightly less ugly. This does
mean PE and PRAUTO are given default empty values but this is preferred
to the other ugliness.
(From OE-Core rev: f37af830448794d3941aca9ab4b2bfa9d8358694)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf/bitbake.conf')
-rw-r--r-- | meta/conf/bitbake.conf | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index fc57a58366..3a1953785e 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -189,17 +189,19 @@ ASSUME_PROVIDED = "\ | |||
189 | PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}" | 189 | PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}" |
190 | PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}" | 190 | PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}" |
191 | PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}" | 191 | PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}" |
192 | PE = "" | ||
192 | PF = "${PN}-${EXTENDPE}${PV}-${PR}" | 193 | PF = "${PN}-${EXTENDPE}${PV}-${PR}" |
193 | EXTENDPE = "${@['','${PE\x7d_'][int(d.getVar('PE', True) or 0) > 0]}" | 194 | EXTENDPE = "${@['','${PE}_'][int(d.getVar('PE', True) or 0) > 0]}" |
194 | P = "${PN}-${PV}" | 195 | P = "${PN}-${PV}" |
195 | 196 | ||
196 | EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO', True) is None]}" | 197 | PRAUTO = "" |
198 | EXTENDPRAUTO = "${@['.${PRAUTO}', ''][not d.getVar('PRAUTO', True)]}" | ||
197 | PRAUTOINX = "${PF}" | 199 | PRAUTOINX = "${PF}" |
198 | 200 | ||
199 | PKGV ?= "${PV}" | 201 | PKGV ?= "${PV}" |
200 | PKGR ?= "${PR}${EXTENDPRAUTO}" | 202 | PKGR ?= "${PR}${EXTENDPRAUTO}" |
201 | PKGE ?= "${@['','${PE\x7d'][int(d.getVar('PE', True) or 0) > 0]}" | 203 | PKGE ?= "${@['','${PE}'][int(d.getVar('PE', True) or 0) > 0]}" |
202 | EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE', True).strip() != '']}" | 204 | EXTENDPKGEVER = "${@['','${PKGE}:'][d.getVar('PKGE', True).strip() != '']}" |
203 | EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}" | 205 | EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}" |
204 | 206 | ||
205 | # Base package name | 207 | # Base package name |