summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-23 17:36:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-23 17:40:27 +0000
commit554e3d254075a75a0ce8e114ab5144fff5440440 (patch)
tree88a17bb63d4d4261352cfd9e10bb74131929005a
parent3fff11a7fc0449bf927bcc79773f37dee32e51f1 (diff)
downloadpoky-554e3d254075a75a0ce8e114ab5144fff5440440.tar.gz
package/populate_sdk: Move functions from package_* to populate_sdk_*
This fixes build failures introduced with "classes/buildhistory: implement history collection for SDK" by moving the functions to files where only the specific image type which is enabled is inherited. The failures occured when multiple PACKAGE_CLASSES were enabled. (From OE-Core rev: 9a414a57ad69a426a8d8a2970c42ca7427240615) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/package_deb.bbclass28
-rw-r--r--meta/classes/package_ipk.bbclass24
-rw-r--r--meta/classes/package_rpm.bbclass17
-rw-r--r--meta/classes/populate_sdk_deb.bbclass26
-rw-r--r--meta/classes/populate_sdk_ipk.bbclass22
-rw-r--r--meta/classes/populate_sdk_rpm.bbclass15
6 files changed, 63 insertions, 69 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index a937b85a61..455919913b 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -423,31 +423,3 @@ addtask package_write_deb before do_package_write after do_packagedata do_packag
423PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_DEB} ] || package_update_index_deb;" 423PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_DEB} ] || package_update_index_deb;"
424PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot" 424PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot"
425PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot" 425PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot"
426
427
428# This will of course only work after rootfs_deb_do_rootfs or populate_sdk_deb has been called
429DPKG_QUERY_COMMAND = "${STAGING_BINDIR_NATIVE}/dpkg-query --admindir=$INSTALL_ROOTFS_DEB/var/lib/dpkg"
430
431list_installed_packages() {
432 if [ "$1" = "arch" ] ; then
433 # Here we want the PACKAGE_ARCH not the deb architecture
434 ${DPKG_QUERY_COMMAND} -W -f='${Package} ${PackageArch}\n'
435 elif [ "$1" = "file" ] ; then
436 ${DPKG_QUERY_COMMAND} -W -f='${Package} ${Package}_${Version}_${Architecture}.deb\n' | while read pkg pkgfile
437 do
438 fullpath=`find ${DEPLOY_DIR_DEB} -name "$pkgfile" || true`
439 if [ "$fullpath" = "" ] ; then
440 echo "$pkg $pkgfile"
441 else
442 echo "$pkg $fullpath"
443 fi
444 done
445 else
446 ${DPKG_QUERY_COMMAND} -W -f='${Package}\n'
447 fi
448}
449
450rootfs_list_installed_depends() {
451 # Cheat here a little bit by using the opkg query helper util
452 ${DPKG_QUERY_COMMAND} -W -f='Package: ${Package}\nDepends: ${Depends}\nRecommends: ${Recommends}\n\n' | opkg-query-helper.py
453}
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index cec2f17334..d003ae7e81 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -430,27 +430,3 @@ addtask package_write_ipk before do_package_write after do_packagedata do_packag
430PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_IPK} ] || package_update_index_ipk;" 430PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_IPK} ] || package_update_index_ipk;"
431PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot" 431PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot"
432PACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot" 432PACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot"
433
434
435list_installed_packages() {
436 if [ "$1" = "arch" ] ; then
437 opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py -a
438 elif [ "$1" = "file" ] ; then
439 opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py -f | while read pkg pkgfile
440 do
441 fullpath=`find ${DEPLOY_DIR_IPK} -name "$pkgfile" || true`
442 if [ "$fullpath" = "" ] ; then
443 echo "$pkg $pkgfile"
444 else
445 echo "$pkg $fullpath"
446 fi
447 done
448 else
449 opkg-cl ${OPKG_ARGS} list_installed | awk '{ print $1 }'
450 fi
451}
452
453rootfs_list_installed_depends() {
454 opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py
455}
456
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 7d67b9685c..12b4bfa536 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -1155,20 +1155,3 @@ addtask package_write_rpm before do_package_write after do_packagedata do_packag
1155PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_RPM} ] || package_update_index_rpm;" 1155PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_RPM} ] || package_update_index_rpm;"
1156PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot" 1156PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"
1157PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot" 1157PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot"
1158
1159
1160RPM_QUERY_CMD = '${RPM} --root $INSTALL_ROOTFS_RPM -D "_dbpath ${rpmlibdir}"'
1161
1162list_installed_packages() {
1163 if [ "$1" = "arch" ]; then
1164 ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]" | translate_smart_to_oe arch
1165 elif [ "$1" = "file" ]; then
1166 ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH} %{PACKAGEORIGIN}\n]" | translate_smart_to_oe
1167 else
1168 ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]" | translate_smart_to_oe
1169 fi
1170}
1171
1172rootfs_list_installed_depends() {
1173 rpmresolve -t $INSTALL_ROOTFS_RPM/${rpmlibdir}
1174}
diff --git a/meta/classes/populate_sdk_deb.bbclass b/meta/classes/populate_sdk_deb.bbclass
index 0361a13bbf..3e123ac561 100644
--- a/meta/classes/populate_sdk_deb.bbclass
+++ b/meta/classes/populate_sdk_deb.bbclass
@@ -67,3 +67,29 @@ populate_sdk_deb () {
67 populate_sdk_log_check populate_sdk 67 populate_sdk_log_check populate_sdk
68} 68}
69 69
70# This will of course only work after rootfs_deb_do_rootfs or populate_sdk_deb has been called
71DPKG_QUERY_COMMAND = "${STAGING_BINDIR_NATIVE}/dpkg-query --admindir=$INSTALL_ROOTFS_DEB/var/lib/dpkg"
72
73list_installed_packages() {
74 if [ "$1" = "arch" ] ; then
75 # Here we want the PACKAGE_ARCH not the deb architecture
76 ${DPKG_QUERY_COMMAND} -W -f='${Package} ${PackageArch}\n'
77 elif [ "$1" = "file" ] ; then
78 ${DPKG_QUERY_COMMAND} -W -f='${Package} ${Package}_${Version}_${Architecture}.deb\n' | while read pkg pkgfile
79 do
80 fullpath=`find ${DEPLOY_DIR_DEB} -name "$pkgfile" || true`
81 if [ "$fullpath" = "" ] ; then
82 echo "$pkg $pkgfile"
83 else
84 echo "$pkg $fullpath"
85 fi
86 done
87 else
88 ${DPKG_QUERY_COMMAND} -W -f='${Package}\n'
89 fi
90}
91
92rootfs_list_installed_depends() {
93 # Cheat here a little bit by using the opkg query helper util
94 ${DPKG_QUERY_COMMAND} -W -f='Package: ${Package}\nDepends: ${Depends}\nRecommends: ${Recommends}\n\n' | opkg-query-helper.py
95}
diff --git a/meta/classes/populate_sdk_ipk.bbclass b/meta/classes/populate_sdk_ipk.bbclass
index becaf96dcf..4e14d9a3a6 100644
--- a/meta/classes/populate_sdk_ipk.bbclass
+++ b/meta/classes/populate_sdk_ipk.bbclass
@@ -56,3 +56,25 @@ populate_sdk_ipk() {
56 56
57 populate_sdk_log_check populate_sdk 57 populate_sdk_log_check populate_sdk
58} 58}
59
60list_installed_packages() {
61 if [ "$1" = "arch" ] ; then
62 opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py -a
63 elif [ "$1" = "file" ] ; then
64 opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py -f | while read pkg pkgfile
65 do
66 fullpath=`find ${DEPLOY_DIR_IPK} -name "$pkgfile" || true`
67 if [ "$fullpath" = "" ] ; then
68 echo "$pkg $pkgfile"
69 else
70 echo "$pkg $fullpath"
71 fi
72 done
73 else
74 opkg-cl ${OPKG_ARGS} list_installed | awk '{ print $1 }'
75 fi
76}
77
78rootfs_list_installed_depends() {
79 opkg-cl ${OPKG_ARGS} status | opkg-query-helper.py
80}
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass
index bbee35eab5..219cd185ce 100644
--- a/meta/classes/populate_sdk_rpm.bbclass
+++ b/meta/classes/populate_sdk_rpm.bbclass
@@ -155,3 +155,18 @@ python () {
155 d.setVar('MULTILIB_OS_LIST', ml_os_list) 155 d.setVar('MULTILIB_OS_LIST', ml_os_list)
156} 156}
157 157
158RPM_QUERY_CMD = '${RPM} --root $INSTALL_ROOTFS_RPM -D "_dbpath ${rpmlibdir}"'
159
160list_installed_packages() {
161 if [ "$1" = "arch" ]; then
162 ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]" | translate_smart_to_oe arch
163 elif [ "$1" = "file" ]; then
164 ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH} %{PACKAGEORIGIN}\n]" | translate_smart_to_oe
165 else
166 ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]" | translate_smart_to_oe
167 fi
168}
169
170rootfs_list_installed_depends() {
171 rpmresolve -t $INSTALL_ROOTFS_RPM/${rpmlibdir}
172}