summaryrefslogtreecommitdiffstats
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:54:02 +0000
commitb369a3619e3d967c6c81bb2828671e49683ec63b (patch)
tree297a85cd70f2172c5330864a7d1e5a05dd0e586e /meta/classes/package.bbclass
parentf955e4e482b3ab80fce0289d8c494fec630359e3 (diff)
downloadpoky-b369a3619e3d967c6c81bb2828671e49683ec63b.tar.gz
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) (From OE-Core rev: 08a194c13857b02a2febf9b1484b3cdd67a18160) 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 () {
919} 919}
920 920
921python populate_packages () { 921python populate_packages () {
922 import glob, stat, errno, re, subprocess 922 import glob, re, subprocess
923 923
924 workdir = d.getVar('WORKDIR', True) 924 workdir = d.getVar('WORKDIR', True)
925 outdir = d.getVar('DEPLOY_DIR', True) 925 outdir = d.getVar('DEPLOY_DIR', True)
@@ -1037,10 +1037,17 @@ python populate_packages () {
1037 package_qa_handle_error("installed_vs_shipped", msg, d) 1037 package_qa_handle_error("installed_vs_shipped", msg, d)
1038 1038
1039 bb.build.exec_func("package_name_hook", d) 1039 bb.build.exec_func("package_name_hook", d)
1040}
1041populate_packages[dirs] = "${D}"
1042
1043python package_fixsymlinks () {
1044 import errno
1045 pkgdest = d.getVar('PKGDEST', True)
1046 packages = d.getVar("PACKAGES").split()
1040 1047
1041 dangling_links = {} 1048 dangling_links = {}
1042 pkg_files = {} 1049 pkg_files = {}
1043 for pkg in package_list: 1050 for pkg in packages:
1044 dangling_links[pkg] = [] 1051 dangling_links[pkg] = []
1045 pkg_files[pkg] = [] 1052 pkg_files[pkg] = []
1046 inst_root = os.path.join(pkgdest, pkg) 1053 inst_root = os.path.join(pkgdest, pkg)
@@ -1059,13 +1066,13 @@ python populate_packages () {
1059 target = os.path.join(root[len(inst_root):], target) 1066 target = os.path.join(root[len(inst_root):], target)
1060 dangling_links[pkg].append(os.path.normpath(target)) 1067 dangling_links[pkg].append(os.path.normpath(target))
1061 1068
1062 for pkg in package_list: 1069 for pkg in packages:
1063 rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "") 1070 rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
1064 1071
1065 for l in dangling_links[pkg]: 1072 for l in dangling_links[pkg]:
1066 found = False 1073 found = False
1067 bb.debug(1, "%s contains dangling link %s" % (pkg, l)) 1074 bb.debug(1, "%s contains dangling link %s" % (pkg, l))
1068 for p in package_list: 1075 for p in packages:
1069 for f in pkg_files[p]: 1076 for f in pkg_files[p]:
1070 if f == l: 1077 if f == l:
1071 found = True 1078 found = True
@@ -1079,7 +1086,6 @@ python populate_packages () {
1079 bb.note("%s contains dangling symlink to %s" % (pkg, l)) 1086 bb.note("%s contains dangling symlink to %s" % (pkg, l))
1080 d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False)) 1087 d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
1081} 1088}
1082populate_packages[dirs] = "${D}"
1083 1089
1084PKGDESTWORK = "${WORKDIR}/pkgdata" 1090PKGDESTWORK = "${WORKDIR}/pkgdata"
1085 1091
@@ -1842,6 +1848,7 @@ PACKAGEFUNCS ?= "package_get_auto_pr \
1842 split_and_strip_files \ 1848 split_and_strip_files \
1843 fixup_perms \ 1849 fixup_perms \
1844 populate_packages \ 1850 populate_packages \
1851 package_fixsymlinks \
1845 package_do_filedeps \ 1852 package_do_filedeps \
1846 package_do_shlibs \ 1853 package_do_shlibs \
1847 package_do_pkgconfig \ 1854 package_do_pkgconfig \