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_rpm.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_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() { | |||
160 | rm -rf ${IMAGE_ROOTFS}${opkglibdir} | 160 | rm -rf ${IMAGE_ROOTFS}${opkglibdir} |
161 | } | 161 | } |
162 | 162 | ||
163 | RPM_QUERY_CMD = '${RPM} --root ${IMAGE_ROOTFS} -D "_dbpath ${rpmlibdir}" \ | ||
164 | -D "__dbi_txn create nofsync private"' | ||
165 | |||
166 | list_installed_packages() { | ||
167 | ${RPM_QUERY_CMD} -qa --qf "[%{NAME}\n]" | ||
168 | } | ||
169 | |||
170 | get_package_filename() { | ||
171 | resolve_package_rpm ${RPMCONF_TARGET_BASE}-base_archs.conf $1 | ||
172 | } | ||
173 | |||
174 | list_package_depends() { | ||
175 | pkglist=`list_installed_packages` | ||
176 | |||
177 | for req in `${RPM_QUERY_CMD} -q --qf "[%{REQUIRES}\n]" $1`; do | ||
178 | if echo "$req" | grep -q "^rpmlib" ; then continue ; fi | ||
179 | |||
180 | realpkg="" | ||
181 | for dep in $pkglist; do | ||
182 | if [ "$dep" = "$req" ] ; then | ||
183 | realpkg="1" | ||
184 | echo $req | ||
185 | break | ||
186 | fi | ||
187 | done | ||
188 | |||
189 | if [ "$realdep" = "" ] ; then | ||
190 | ${RPM_QUERY_CMD} -q --whatprovides $req --qf "%{NAME}\n" | ||
191 | fi | ||
192 | done | ||
193 | } | ||
194 | |||
195 | list_package_recommends() { | ||
196 | : | ||
197 | } | ||
163 | 198 | ||
164 | install_all_locales() { | 199 | install_all_locales() { |
165 | PACKAGES_TO_INSTALL="" | 200 | PACKAGES_TO_INSTALL="" |
166 | 201 | ||
167 | # Generate list of installed packages... | 202 | # Generate list of installed packages... |
168 | INSTALLED_PACKAGES=$( \ | 203 | INSTALLED_PACKAGES=`list_installed_packages | egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)"` |
169 | ${RPM} --root ${IMAGE_ROOTFS} -D "_dbpath ${rpmlibdir}" \ | ||
170 | -D "__dbi_txn create nofsync private" \ | ||
171 | -qa --qf "[%{NAME}\n]" | egrep -v -- "(-locale-|-dev$|-doc$|^kernel|^glibc|^ttf|^task|^perl|^python)" \ | ||
172 | ) | ||
173 | 204 | ||
174 | # This would likely be faster if we did it in one transaction | 205 | # This would likely be faster if we did it in one transaction |
175 | # but this should be good enough for the few users of this function... | 206 | # but this should be good enough for the few users of this function... |