diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-11-30 16:48:47 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-12-01 16:54:07 +0000 |
commit | 1dcb2d8eeb034ce7cca035830889e23bcae0722c (patch) | |
tree | 17f59c28e13bbf413f02cbc9559033dd5661e680 /meta/classes/rootfs_ipk.bbclass | |
parent | 8e2c57876764a498760cc310187f96e9126e3428 (diff) | |
download | poky-1dcb2d8eeb034ce7cca035830889e23bcae0722c.tar.gz |
classes/buildhistory: add new output history collection class
Create a new build output history reporting class, using testlab.bbclass
from meta-oe and packagehistory.bbclass as a base. This records information
from packages and images output from the build process in text files
structured suitably for tracking within a git repository, thus enabling
monitoring of changes over time.
Build history collection can be enabled simply by adding the following
to your local.conf:
INHERIT += "buildhistory"
The output after a build can then be found in BUILDHISTORY_DIR (defaults to
TMPDIR/buildhistory). If you set up this directory as a git repository and
set BUILDHISTORY_COMMIT to "1" in local.conf, the build history data will
be committed on every build.
(From OE-Core rev: 508ff624fea705eb93cf2cc1e0c9c42cb817acf8)
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.bbclass | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass index 4a5a2dd3be..b4b95c5645 100644 --- a/meta/classes/rootfs_ipk.bbclass +++ b/meta/classes/rootfs_ipk.bbclass | |||
@@ -143,11 +143,36 @@ remove_packaging_data_files() { | |||
143 | mkdir ${IMAGE_ROOTFS}${opkglibdir} | 143 | mkdir ${IMAGE_ROOTFS}${opkglibdir} |
144 | } | 144 | } |
145 | 145 | ||
146 | list_installed_packages() { | ||
147 | grep ^Package: ${IMAGE_ROOTFS}${opkglibdir}/status | sed "s/^Package: //" | ||
148 | } | ||
149 | |||
150 | get_package_filename() { | ||
151 | name=`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" | awk '/^Package/ {printf $2"_"}'` | ||
152 | name=$name`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" | awk -F: '/^Version/ {printf $NF"_"}' | sed 's/^\s*//g'` | ||
153 | name=$name`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" | awk '/^Archi/ {print $2".ipk"}'` | ||
154 | |||
155 | fullname=`find ${DEPLOY_DIR_IPK} -name "$name" || true` | ||
156 | if [ "$fullname" = "" ] ; then | ||
157 | echo $name | ||
158 | else | ||
159 | echo $fullname | ||
160 | fi | ||
161 | } | ||
162 | |||
163 | list_package_depends() { | ||
164 | opkg-cl ${IPKG_ARGS} info $1 | grep ^Depends | sed -e 's/^Depends: //' -e 's/,//g' -e 's:([=<>]* [0-9a-zA-Z.~\-]*)::g' | ||
165 | } | ||
166 | |||
167 | list_package_recommends() { | ||
168 | opkg-cl ${IPKG_ARGS} info $1 | grep ^Recommends | sed -e 's/^Recommends: //' -e 's/,//g' -e 's:([=<>]* [0-9a-zA-Z.~\-]*)::g' | ||
169 | } | ||
170 | |||
146 | install_all_locales() { | 171 | install_all_locales() { |
147 | 172 | ||
148 | PACKAGES_TO_INSTALL="" | 173 | PACKAGES_TO_INSTALL="" |
149 | 174 | ||
150 | INSTALLED_PACKAGES=`grep ^Package: ${IMAGE_ROOTFS}${opkglibdir}/status |sed "s/^Package: //"|egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` | 175 | INSTALLED_PACKAGES=`list_installed_packages | egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` |
151 | 176 | ||
152 | for pkg in $INSTALLED_PACKAGES | 177 | for pkg in $INSTALLED_PACKAGES |
153 | do | 178 | do |