diff options
-rw-r--r-- | meta/classes/package.bbclass | 17 |
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 | ||
921 | python populate_packages () { | 921 | python 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 | } | ||
1041 | populate_packages[dirs] = "${D}" | ||
1042 | |||
1043 | python 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 | } |
1082 | populate_packages[dirs] = "${D}" | ||
1083 | 1089 | ||
1084 | PKGDESTWORK = "${WORKDIR}/pkgdata" | 1090 | PKGDESTWORK = "${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 \ |