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-05 16:23:27 +0000 |
commit | 14acb530a27a3b088d0bfd56db291f4e72ace8ab (patch) | |
tree | 5e568844017e062e0399c55bb098ac4cc64dd44f /meta/classes/rootfs_rpm.bbclass | |
parent | 09f79dd245ab82bf105b6efeb1dfbf2d180d9fc8 (diff) | |
download | openembedded-core-14acb530a27a3b088d0bfd56db291f4e72ace8ab.tar.gz openembedded-core-14acb530a27a3b088d0bfd56db291f4e72ace8ab.tar.bz2 openembedded-core-14acb530a27a3b088d0bfd56db291f4e72ace8ab.zip |
classes/buildhistory: add new output history collection class
Create a new build output history reporting class, using testlab.bbclass
from meta-oe as a base. This records information from images produced by
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.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'meta/classes/rootfs_rpm.bbclass')
-rw-r--r-- | meta/classes/rootfs_rpm.bbclass | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass index 6973008c59..5fd45d758c 100644 --- a/meta/classes/rootfs_rpm.bbclass +++ b/meta/classes/rootfs_rpm.bbclass @@ -160,16 +160,47 @@ remove_packaging_data_files() { rm -rf ${IMAGE_ROOTFS}${opkglibdir} } +RPM_QUERY_CMD = '${RPM} --root ${IMAGE_ROOTFS} -D "_dbpath ${rpmlibdir}" \ + -D "__dbi_txn create nofsync private"' + +list_installed_packages() { + ${RPM_QUERY_CMD} -qa --qf "[%{NAME}\n]" +} + +get_package_filename() { + resolve_package_rpm ${RPMCONF_TARGET_BASE}-base_archs.conf $1 +} + +list_package_depends() { + pkglist=`list_installed_packages` + + for req in `${RPM_QUERY_CMD} -q --qf "[%{REQUIRES}\n]" $1`; do + if echo "$req" | grep -q "^rpmlib" ; then continue ; fi + + realpkg="" + for dep in $pkglist; do + if [ "$dep" = "$req" ] ; then + realpkg="1" + echo $req + break + fi + done + + if [ "$realdep" = "" ] ; then + ${RPM_QUERY_CMD} -q --whatprovides $req --qf "%{NAME}\n" + fi + done +} + +list_package_recommends() { + : +} install_all_locales() { PACKAGES_TO_INSTALL="" # Generate list of installed packages... - INSTALLED_PACKAGES=$( \ - ${RPM} --root ${IMAGE_ROOTFS} -D "_dbpath ${rpmlibdir}" \ - -D "__dbi_txn create nofsync private" \ - -qa --qf "[%{NAME}\n]" | egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)" \ - ) + INSTALLED_PACKAGES=`list_installed_packages | egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` # This would likely be faster if we did it in one transaction # but this should be good enough for the few users of this function... |