diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/package_deb.bbclass | 28 | ||||
-rw-r--r-- | meta/classes/package_ipk.bbclass | 24 | ||||
-rw-r--r-- | meta/classes/package_rpm.bbclass | 17 | ||||
-rw-r--r-- | meta/classes/populate_sdk_deb.bbclass | 26 | ||||
-rw-r--r-- | meta/classes/populate_sdk_ipk.bbclass | 22 | ||||
-rw-r--r-- | meta/classes/populate_sdk_rpm.bbclass | 15 |
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 | |||
423 | PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_DEB} ] || package_update_index_deb;" | 423 | PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_DEB} ] || package_update_index_deb;" |
424 | PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot" | 424 | PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot" |
425 | PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot" | 425 | PACKAGEINDEXDEPS += "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 | ||
429 | DPKG_QUERY_COMMAND = "${STAGING_BINDIR_NATIVE}/dpkg-query --admindir=$INSTALL_ROOTFS_DEB/var/lib/dpkg" | ||
430 | |||
431 | list_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 | |||
450 | rootfs_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 | |||
430 | PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_IPK} ] || package_update_index_ipk;" | 430 | PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_IPK} ] || package_update_index_ipk;" |
431 | PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot" | 431 | PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot" |
432 | PACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot" | 432 | PACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot" |
433 | |||
434 | |||
435 | list_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 | |||
453 | rootfs_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 | |||
1155 | PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_RPM} ] || package_update_index_rpm;" | 1155 | PACKAGEINDEXES += "[ ! -e ${DEPLOY_DIR_RPM} ] || package_update_index_rpm;" |
1156 | PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot" | 1156 | PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot" |
1157 | PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot" | 1157 | PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot" |
1158 | |||
1159 | |||
1160 | RPM_QUERY_CMD = '${RPM} --root $INSTALL_ROOTFS_RPM -D "_dbpath ${rpmlibdir}"' | ||
1161 | |||
1162 | list_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 | |||
1172 | rootfs_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 | ||
71 | DPKG_QUERY_COMMAND = "${STAGING_BINDIR_NATIVE}/dpkg-query --admindir=$INSTALL_ROOTFS_DEB/var/lib/dpkg" | ||
72 | |||
73 | list_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 | |||
92 | rootfs_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 | |||
60 | list_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 | |||
78 | rootfs_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 | ||
158 | RPM_QUERY_CMD = '${RPM} --root $INSTALL_ROOTFS_RPM -D "_dbpath ${rpmlibdir}"' | ||
159 | |||
160 | list_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 | |||
170 | rootfs_list_installed_depends() { | ||
171 | rpmresolve -t $INSTALL_ROOTFS_RPM/${rpmlibdir} | ||
172 | } | ||