summaryrefslogtreecommitdiff
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-29 13:55:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-01 15:51:29 +0000
commit08a194c13857b02a2febf9b1484b3cdd67a18160 (patch)
treede50df26fa510e3419ca59fc5ea14cb429eb607d /meta/classes/package.bbclass
parentdf38695f0fbea10289e85fdcb7c2bdf566990577 (diff)
downloadopenembedded-core-08a194c13857b02a2febf9b1484b3cdd67a18160.tar.gz
openembedded-core-08a194c13857b02a2febf9b1484b3cdd67a18160.tar.bz2
openembedded-core-08a194c13857b02a2febf9b1484b3cdd67a18160.zip
package.bbclass: Split out package_fixsymlinks function
The symlink handling code doesn't need to being part of populate_packages and is logically separate so split it out into a separate function, package_fixsymlinks. (From OE-Core rev: fc964ed2b558b08327e2bc8c93ada80ca9d97337) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass17
1 files changed, 12 insertions, 5 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 858afbd07c..8bf80f5afb 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -919,7 +919,7 @@ python split_and_strip_files () {
}
python populate_packages () {
- import glob, stat, errno, re, subprocess
+ import glob, re, subprocess
workdir = d.getVar('WORKDIR', True)
outdir = d.getVar('DEPLOY_DIR', True)
@@ -1037,10 +1037,17 @@ python populate_packages () {
package_qa_handle_error("installed_vs_shipped", msg, d)
bb.build.exec_func("package_name_hook", d)
+}
+populate_packages[dirs] = "${D}"
+
+python package_fixsymlinks () {
+ import errno
+ pkgdest = d.getVar('PKGDEST', True)
+ packages = d.getVar("PACKAGES").split()
dangling_links = {}
pkg_files = {}
- for pkg in package_list:
+ for pkg in packages:
dangling_links[pkg] = []
pkg_files[pkg] = []
inst_root = os.path.join(pkgdest, pkg)
@@ -1059,13 +1066,13 @@ python populate_packages () {
target = os.path.join(root[len(inst_root):], target)
dangling_links[pkg].append(os.path.normpath(target))
- for pkg in package_list:
+ for pkg in packages:
rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
for l in dangling_links[pkg]:
found = False
bb.debug(1, "%s contains dangling link %s" % (pkg, l))
- for p in package_list:
+ for p in packages:
for f in pkg_files[p]:
if f == l:
found = True
@@ -1079,7 +1086,6 @@ python populate_packages () {
bb.note("%s contains dangling symlink to %s" % (pkg, l))
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
}
-populate_packages[dirs] = "${D}"
PKGDESTWORK = "${WORKDIR}/pkgdata"
@@ -1842,6 +1848,7 @@ PACKAGEFUNCS ?= "package_get_auto_pr \
split_and_strip_files \
fixup_perms \
populate_packages \
+ package_fixsymlinks \
package_do_filedeps \
package_do_shlibs \
package_do_pkgconfig \