mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 21:32:12 +02:00
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>
This commit is contained in:
@@ -1038,11 +1038,6 @@ python populate_packages () {
|
||||
|
||||
bb.build.exec_func("package_name_hook", d)
|
||||
|
||||
for pkg in package_list:
|
||||
pkgname = d.getVar('PKG_%s' % pkg, True)
|
||||
if pkgname is None:
|
||||
d.setVar('PKG_%s' % pkg, pkg)
|
||||
|
||||
dangling_links = {}
|
||||
pkg_files = {}
|
||||
for pkg in package_list:
|
||||
@@ -1154,6 +1149,11 @@ python emit_pkgdata() {
|
||||
for pkg in packages.split():
|
||||
subdata_file = pkgdatadir + "/runtime/%s" % pkg
|
||||
|
||||
pkgval = d.getVar('PKG_%s' % pkg, True)
|
||||
if pkgval is None:
|
||||
pkgval = pkg
|
||||
d.setVar('PKG_%s' % pkg, pkg)
|
||||
|
||||
sf = open(subdata_file, 'w')
|
||||
write_if_exists(sf, pkg, 'PN')
|
||||
write_if_exists(sf, pkg, 'PV')
|
||||
@@ -1189,7 +1189,6 @@ python emit_pkgdata() {
|
||||
sf.close()
|
||||
|
||||
# Symlinks needed for reverse lookups (from the final package name)
|
||||
pkgval = d.getVar('PKG_%s' % (pkg), True)
|
||||
subdata_sym = pkgdatadir + "/runtime-reverse/%s" % pkgval
|
||||
oe.path.symlink("../runtime/%s" % pkg, subdata_sym, True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user