summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs_ipk.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-07-23 07:59:11 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-29 10:16:15 +0100
commit20ad566d609bccdadf871dab1bc31a0e243f8710 (patch)
treefaea9496677371ab81ea2704183c01ce54d088df /meta/classes/rootfs_ipk.bbclass
parent98b0f956e7d16c2791cc00dbb75187b886e4cbcd (diff)
downloadpoky-20ad566d609bccdadf871dab1bc31a0e243f8710.tar.gz
buildhistory: improve performance of image info collection
Reduce the number of calls to the packaging tool, especially in the case of rpm, using helper utilities to gather the required information more efficiently where possible. (From OE-Core rev: d0b8a98c5b46c305afd389fc862b3bf0c6f1eaab) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs_ipk.bbclass')
-rw-r--r--meta/classes/rootfs_ipk.bbclass34
1 files changed, 12 insertions, 22 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 7df97a014b..6cdd8f6062 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -131,33 +131,23 @@ remove_packaging_data_files() {
131list_installed_packages() { 131list_installed_packages() {
132 if [ "$1" = "arch" ] ; then 132 if [ "$1" = "arch" ] ; then
133 opkg-cl ${IPKG_ARGS_POST} status | opkg-query-helper.py -a 133 opkg-cl ${IPKG_ARGS_POST} status | opkg-query-helper.py -a
134 elif [ "$1" = "file" ] ; then
135 opkg-cl ${IPKG_ARGS_POST} status | opkg-query-helper.py -f | while read pkg pkgfile
136 do
137 fullpath=`find ${DEPLOY_DIR_IPK} -name "$pkgfile" || true`
138 if [ "$fullpath" = "" ] ; then
139 echo "$pkg $pkgfile"
140 else
141 echo "$pkg $fullpath"
142 fi
143 done
134 else 144 else
135 opkg-cl ${IPKG_ARGS_POST} list_installed | awk '{ print $1 }' 145 opkg-cl ${IPKG_ARGS_POST} list_installed | awk '{ print $1 }'
136 fi 146 fi
137} 147}
138 148
139get_package_filename() { 149rootfs_list_installed_depends() {
140 set +x 150 opkg-cl ${IPKG_ARGS_POST} status | opkg-query-helper.py
141 info=`opkg-cl ${IPKG_ARGS_POST} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" || true`
142 name=`echo "${info}" | awk '/^Package/ {printf $2"_"}'`
143 name=$name`echo "${info}" | awk -F: '/^Version/ {printf $NF"_"}' | sed 's/^\s*//g'`
144 name=$name`echo "${info}" | awk '/^Archi/ {print $2".ipk"}'`
145 set -x
146
147 fullname=`find ${DEPLOY_DIR_IPK} -name "$name" || true`
148 if [ "$fullname" = "" ] ; then
149 echo $name
150 else
151 echo $fullname
152 fi
153}
154
155list_package_depends() {
156 opkg-cl ${IPKG_ARGS_POST} info $1 | grep ^Depends | sed -e 's/^Depends: //' -e 's/,//g' -e 's:([=<>]* [^ )]*)::g'
157}
158
159list_package_recommends() {
160 opkg-cl ${IPKG_ARGS_POST} info $1 | grep ^Recommends | sed -e 's/^Recommends: //' -e 's/,//g' -e 's:([=<>]* [^ )]*)::g'
161} 151}
162 152
163rootfs_install_packages() { 153rootfs_install_packages() {