diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-29 13:53:17 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-01 15:54:01 +0000 |
commit | f955e4e482b3ab80fce0289d8c494fec630359e3 (patch) | |
tree | 8c6f2c8cf69f6c8b029c5ff3246419edf40eaa77 | |
parent | 8a0b4578ecf4403f8551e159cc59de4088c3a0af (diff) | |
download | poky-f955e4e482b3ab80fce0289d8c494fec630359e3.tar.gz |
package.bbclass: Move PKG handling code to emit_pkgdata
We only use the PKG variable in emit_pkgdata so we might as well move the
fallback code there, allowing restructuring of other parts of the metadata.
(From OE-Core rev: 0136ae9a5f719f0e7ba6e00bfd366c0e61b3b3f2)
(From OE-Core rev: df38695f0fbea10289e85fdcb7c2bdf566990577)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/package.bbclass | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 4e7db9af25..858afbd07c 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -1038,11 +1038,6 @@ python populate_packages () { | |||
1038 | 1038 | ||
1039 | bb.build.exec_func("package_name_hook", d) | 1039 | bb.build.exec_func("package_name_hook", d) |
1040 | 1040 | ||
1041 | for pkg in package_list: | ||
1042 | pkgname = d.getVar('PKG_%s' % pkg, True) | ||
1043 | if pkgname is None: | ||
1044 | d.setVar('PKG_%s' % pkg, pkg) | ||
1045 | |||
1046 | dangling_links = {} | 1041 | dangling_links = {} |
1047 | pkg_files = {} | 1042 | pkg_files = {} |
1048 | for pkg in package_list: | 1043 | for pkg in package_list: |
@@ -1154,6 +1149,11 @@ python emit_pkgdata() { | |||
1154 | for pkg in packages.split(): | 1149 | for pkg in packages.split(): |
1155 | subdata_file = pkgdatadir + "/runtime/%s" % pkg | 1150 | subdata_file = pkgdatadir + "/runtime/%s" % pkg |
1156 | 1151 | ||
1152 | pkgval = d.getVar('PKG_%s' % pkg, True) | ||
1153 | if pkgval is None: | ||
1154 | pkgval = pkg | ||
1155 | d.setVar('PKG_%s' % pkg, pkg) | ||
1156 | |||
1157 | sf = open(subdata_file, 'w') | 1157 | sf = open(subdata_file, 'w') |
1158 | write_if_exists(sf, pkg, 'PN') | 1158 | write_if_exists(sf, pkg, 'PN') |
1159 | write_if_exists(sf, pkg, 'PV') | 1159 | write_if_exists(sf, pkg, 'PV') |
@@ -1189,7 +1189,6 @@ python emit_pkgdata() { | |||
1189 | sf.close() | 1189 | sf.close() |
1190 | 1190 | ||
1191 | # Symlinks needed for reverse lookups (from the final package name) | 1191 | # Symlinks needed for reverse lookups (from the final package name) |
1192 | pkgval = d.getVar('PKG_%s' % (pkg), True) | ||
1193 | subdata_sym = pkgdatadir + "/runtime-reverse/%s" % pkgval | 1192 | subdata_sym = pkgdatadir + "/runtime-reverse/%s" % pkgval |
1194 | oe.path.symlink("../runtime/%s" % pkg, subdata_sym, True) | 1193 | oe.path.symlink("../runtime/%s" % pkg, subdata_sym, True) |
1195 | 1194 | ||