summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-12-09 17:34:42 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-10 00:18:14 +0000
commit43c99c9d50035c9d269164c3d8e7a61a207c3a63 (patch)
tree2c3f8be276953a37d8c56ca35b2e6d0a76de3294 /meta/classes
parent488e8ba01971a2f80be92924e4dc561b3518fee8 (diff)
downloadpoky-43c99c9d50035c9d269164c3d8e7a61a207c3a63.tar.gz
classes/rootfs_deb: implement query functions for buildhistory
Implement the functions required for buildhistory to be able to query installed packages, get dependencies etc. for deb-based images. (From OE-Core rev: 58fbb430040c9cce9f2c5f1515a4453dd49032cc) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/rootfs_deb.bbclass23
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index bab8e1e8c7..bef055c6f5 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -81,3 +81,26 @@ remove_packaging_data_files() {
81 rm -rf ${IMAGE_ROOTFS}${opkglibdir} 81 rm -rf ${IMAGE_ROOTFS}${opkglibdir}
82 rm -rf ${IMAGE_ROOTFS}/usr/dpkg/ 82 rm -rf ${IMAGE_ROOTFS}/usr/dpkg/
83} 83}
84
85DPKG_QUERY_COMMAND = "${STAGING_BINDIR_NATIVE}/dpkg --admindir=${IMAGE_ROOTFS}/var/lib/dpkg"
86
87list_installed_packages() {
88 ${DPKG_QUERY_COMMAND} -l | grep ^ii | awk '{ print $2 }'
89}
90
91get_package_filename() {
92 fullname=`find ${DEPLOY_DIR_DEB} -name "$1_*.deb" || true`
93 if [ "$fullname" = "" ] ; then
94 echo $name
95 else
96 echo $fullname
97 fi
98}
99
100list_package_depends() {
101 ${DPKG_QUERY_COMMAND} -s $1 | grep ^Depends | sed -e 's/^Depends: //' -e 's/,//g' -e 's:([=<>]* [0-9a-zA-Z.~\-]*)::g'
102}
103
104list_package_recommends() {
105 ${DPKG_QUERY_COMMAND} -s $1 | grep ^Recommends | sed -e 's/^Recommends: //' -e 's/,//g' -e 's:([=<>]* [0-9a-zA-Z.~\-]*)::g'
106}