summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
Commit message (Collapse)AuthorAgeFilesLines
...
* classes/buildhistory: avoid buildhistory triggering rebuilds (again)Paul Eggleton2014-02-111-1/+4
| | | | | | | | | | | | | | | | | | | | Postfuncs are now incorporated into task signatures as of BitBake rev b84d010144de687667cf855ddcb41c9b863c236e, so we need to exclude the one we're adding to do_fetch. The change to the SSTATEPOSTINSTFUNCS variable value was also entering the signatures of do_populate_sysroot and probably other tasks, so we need to use a slightly hacky trick to avoid that as well. Apart from the final do_rootfs / do_populate_sysroot, this now means that adding and removing INHERIT += "buildhistory" will not cause tasks to be re-run. Also update the copyright date, properly this time. (From OE-Core rev: 953df67eb877a6d0fc68d122964440a9a47de3c3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: write out files in UTF-8 formatPaul Eggleton2014-02-061-21/+25
| | | | | | | | | | | | | If the package information contained unicode characters (for example, in the package file listing) then writing them out as ASCII would fail, so write them out using codecs.open() instead of open() using UTF-8. This fixes ca-certificates failing in do_packagedata when buildhistory is enabled. (From OE-Core rev: dcf228fe69bfee4e22baad477ad407248c0f9cdb) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: fix expansion of escape sequencesPaul Eggleton2014-02-031-1/+1
| | | | | | | | | | | | | OE-Core commit 259b8718a31b886f8a158aeb5de164840c9a28b2 fixed UTF-8 errors but broke decoding of escape sequences in strings (e.g. pkg_postinst scripts had \n \t in them instead of newlines and tabs.) We need a second call to decode() here as specifying 'string_escape' as the second parameter won't do anything. (From OE-Core rev: 15e0cdff08b8b9b826bbb9f00192a27318a3ee65) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass: Improve robustness in image file listingOtavio Salvador2014-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The filenames sometimes may have strange names. With the 'awk' script it handled a limited number of spaces in the filename and a package installing a file named "test file with spaces" would have its name truncated. This patch uses the find's printf formating to simplify the code and properly handle this case. From a testing image, the only diff produced is: ,----[ files-in-image.txt diff ] | --rwxr-xr-x root root 0 ./usr/bin/test\ file\ with\ | +-rwxr-xr-x root root 0 ./usr/bin/test file with spaces `---- The options used are available since findutils 4.2.5, released in 19 Nov 2004, making it available in all supported host distributions. (From OE-Core rev: b09e24449c1c9ae335732dd070eacf66777556a1) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: be quiet when garbage collecting the git repoRoss Burton2013-12-181-1/+1
| | | | | | | (From OE-Core rev: b117403423f700eb4cc6967b9fb8ff3e2858e279) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass: Specify lang in decoding stringsKhem Raj2013-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | On systems where default locale is utf-8 we get errors like File: 'buildhistory.bbclass', lineno: 38, function: write_pkghistory 0034: if pkginfo.rconflicts: 0035: f.write("RCONFLICTS = %s\n" % pkginfo.rconflicts) 0036: f.write("PKGSIZE = %d\n" % pkginfo.size) 0037: f.write("FILES = %s\n" % pkginfo.files) *** 0038: f.write("FILELIST = %s\n" % pkginfo.filelist) 0039: 0040: for filevar in pkginfo.filevars: 0041: filevarpath = os.path.join(pkgpath, "latest.%s" % filevar) 0042: val = pkginfo.filevars[filevar] Exception: UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 337: ordinal not in range(128) This patch specifies decode to use utf-8 so ascii and utf-8 based locales both work (From OE-Core rev: 259b8718a31b886f8a158aeb5de164840c9a28b2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass/image.bbclass: remove obsolete codesRoy Li2013-12-091-6/+4
| | | | | | | | | | | | After 1b8e4abd2d9c0 [bitbake.conf/package: Collapse PKGDATA_DIR into a single machine specific directory], oe-pkgdata-util does not use target_suffix parameter, so do not need to loop the vendor (From OE-Core rev: 03c5f39b4d7dd8c81e0a130b7d5884e5af039a24) Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: fix reading of package-specific values from pkgdataPaul Eggleton2013-12-051-11/+14
| | | | | | | | | | | | | | | | | When writing out variable values to pkgdata, if the value has been set in the datastore with an override for the package, we use the package name override in the pkgdata key as well; however the recently added code to read pkgdata in buildhistory.bbclass was just using the override where we normally expect to have it. However, if a recipe overrides one of the values that is normally set for the recipe on a per-package basis (e.g. the external-sourcery-toolchain recipe sets PKGV this way) then this led to KeyErrors. Re-write the pkgdata loading code to always strip off the package name override if it is present. (From OE-Core rev: e40e8e574b3688400a668d3ad76b6cef1920e3e0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: do git garbage collection after committingPaul Eggleton2013-12-031-0/+1
| | | | | | | | | | | | | | We don't normally perform any operations (such as "git pull") that trigger "git gc --auto", thus garbage collection never happens which means performance of accessing the repository degrades noticeably over time. Add an explicit "git gc --auto" to clean things up when needed. Thanks to Elijah Newren and Ross Burton for suggesting this. (From OE-Core rev: 4a45a999e0ad2e99581428a5a6d34f483c00544f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: reduce parsing timePaul Eggleton2013-12-031-0/+6
| | | | | | | | | | | | | | Disable several python functions if not parsing within the worker context. This avoids executing expensive operations while parsing recipes (which is unnecessary). (Thanks to Richard Purdie for pointing out the issue and suggesting the workaround.) (From OE-Core rev: 540a2a30be21c3eca4323efbe91e7dcfc31a4c97) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: improve collection of package infoPaul Eggleton2013-12-031-43/+48
| | | | | | | | | | | | | | | | | | | | Use a function added to SSTATEPOSTINSTFUNCS and read the necessary information out of pkgdata, instead of using a function executed during do_package that reads the data directly. This has two benefits: * The package info collection will now work when the package content is restored from shared state * Adding/removing the inherit of buildhistory will no longer change the do_package signatures and force re-execution of that function for every recipe. Fixes [YOCTO #5358] (From OE-Core rev: cd7f7efcd5f297d876823b8f579ecefb9542b089) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: add additional variables to image informationPaul Eggleton2013-12-031-4/+4
| | | | | | | | | | Add PACKAGE_EXCLUDE and NO_RECOMMENDATIONS to the info we track for images, since these can change what ends up in the image. (From OE-Core rev: a10189366f180b87f5be20b66834b7e7a9bb8c12) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: drop cruft from old SRCREV tracking implementationPaul Eggleton2013-12-031-12/+0
| | | | | | | | | | | This should have been removed when the implementation was rewritten in OE-Core commit 2179db89436d719635f858c87d1e098696bead2a. The collected values weren't being used anywhere since then. (From OE-Core rev: cbc23a87c1897b7fda40f452dd36acb0bca3d197) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory/distrodata: Adapt to updated fetcher APIRichard Purdie2013-11-221-1/+5
| | | | | | | | | | The buildhistory code has fallback paths for older bitbakes for now. The distrodata class is much less used and it can be assumed a recent bitbake is used in that case rather than adding fallback code. (From OE-Core rev: 570cc145029fd9d5528aef5c27cb65164265c799) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf/package: Collapse PKGDATA_DIR into a single machine specific ↵Richard Purdie2013-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | directory Currently we have a hierarchy of pkgdata directories and the code has to put together a search path and look through each in turn until it finds the data it needs. This has lead to a number of hardcoded paths and file globing which is unpredictable and undesirable. Worse, certain tricks that should be easy like a GL specific package architecture become problematic with the curretn search paths. With the modern sstate code, we can do better and construct a single pkgdata directory for each machine in just the same way as we do for the sysroot. This is already tried and well tested. With such a single directory, all the code that iterated through multiple pkgdata directories and simply be removed and give a significant simplification of the code. Even existing build directories adapt to the change well since the package contents doesn't change, just the location they're installed to and the stamp for them. The only complication is the we need a different shlibs directory for each multilib. These are only used by package.bbclass and the simple fix is to add MLPREFIX to the shlib directory name. This means the multilib packages will repackage and the sstate checksum will change but an existing build directory will adapt to the changes safely. It is close to release however I believe the benefits this patch give us are worth consideration for inclusion and give us more options for dealing with problems like the GL one. It also sets the ground work well for shlibs improvements in 1.6. (From OE-Core rev: 1b8e4abd2d9c0901d38d89d0f944fe1ffd019379) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: avoid mangling names in dot graphs for imagesPaul Eggleton2013-08-161-6/+6
| | | | | | | | | | | We were mangling names here to avoid characters that are invalid for dot node names, but if you just quote all names that isn't necessary and we retain the original naming, allowing easy searching of the graph files. (From OE-Core rev: 99efdad886aa5063a68912846c00a46ba9b15536) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: tag last 3 build revisionsPaul Eggleton2013-08-161-0/+4
| | | | | | | | | | | | This makes it easier to obtain the difference from the last three builds particularly where a single build might account for more than one commit in the buildhistory git repository (e.g. if package and image changes occurred). (From OE-Core rev: 9512f3787295d662678c2943da31197c8df39e99) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: show command line in commit messagePaul Eggleton2013-08-161-2/+11
| | | | | | | | | | Record the bitbake command line in the commit message as a further context indication. (From OE-Core rev: 34fb802b2170f0fe208e54e7a4d18f663db72f90) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: record size of installed package not compressed archiveMartin Jansa2013-08-161-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | * usually it's more important to know how much space will each package take on target device then size of compressed package * example for libewebkit0 with 4 different architectures, interesting that om_gta02 .ipk is bigger but it's smaller when installed before: MACHINE DEFAULTTUNE SIZE (.ipk file) om_gta04 cortexa8t-neon 15996 KiB libewebkit0 qemux86_64 x86-64 16992 KiB libewebkit0 spitz xscale 16148 KiB libewebkit0 om_gta02 arm920t 16260 KiB libewebkit0 after: MACHINE DEFAULTTUNE SIZE (installed) om_gta04 cortexa8t-neon 60544 KiB libewebkit0 qemux86_64 x86-64 63720 KiB libewebkit0 spitz xscale 60588 KiB libewebkit0 om_gta02 arm920t 56268 KiB libewebkit0 (From OE-Core rev: 85e4a77138381a6086d5ebd3a28cb5a94bc26a19) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: remove default of BUILDHISTORY_CHECKVERBACKWARDSPaul Eggleton2013-08-161-1/+0
| | | | | | | | | | Since this variable is no longer used, we don't need to set a default for it. (From OE-Core rev: a5230835c539781b5b035dc6d0be3cac5a5bd305) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: use bb.utils.mkdirhier instead of os.makedirsMartin Jansa2013-08-121-3/+3
| | | | | | | | | | | | | | * Multiple do_fetch[prefunc] can happen at the same time and if not os.path.exists(pkghistdir): os.makedirs(pkghistdir) isn't safe * Use bb.utils.mkdirhier which doesn't raise error when directory exists (From OE-Core rev: 9aac194d7db79129dcbed29cfb89c57dccf33729) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: use package_qa_handle_error for version-going-backwardsMartin Jansa2013-08-121-9/+9
| | | | | | | | | | | * this way it's easier for distro to select if such issue should be error, warning or ignored and also it gets recorded in qa.log (From OE-Core rev: 44624853de8c88abdcae2ccd0902b390ff546d4c) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: add a note when committing to buildhistoryRoss Burton2013-08-061-0/+1
| | | | | | | | | | | | If there's been a lot of changes the commit to buildhistory can take a significant amount of time, so print a note so there's some indication of progress. (From OE-Core rev: ccd911ba8887f5c9a72d5178617c2a3ee73264ff) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: fix error when no packages are installedPaul Eggleton2013-06-201-1/+5
| | | | | | | | | | | | | | | | "xargs -n1 basename" will execute basename even if there are no lines piped into it, causing a "basename: missing operand" error if no packages are installed, which will happen for the target portion of buildtools-tarball. (xargs' -r option could have been used here, but it is a GNU extension and I thought it best to avoid that for the sake of future interoperability). (From OE-Core rev: 03d86123e9e804e62de38effd307f070d7863080) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/conf: Add eventmasks for event handlersRichard Purdie2013-06-141-4/+4
| | | | | | | | | | | Now that bitbake supports masking events for event handlers, lets use this so event handlers are only called for events they care about. This lets us simplify the code indentation a bit at least as well as mildly improving the event handling performance. (From OE-Core rev: bff73743280f9eafebe4591f7368ead91a4eb74d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: split SDK data by IMAGE_NAMEPaul Eggleton2013-06-111-1/+1
| | | | | | | | | | | | | | | | | | Data from SDKs produced from different images or different meta-toolchain style recipes should go into separate directories, since SDK_NAME doesn't include anything to differentiate these by default (only pieces for the distro name and architectures). Note you should delete or move existing data under the buildhistory/sdk/ directory manually after this change. Fixes [YOCTO #4622]. (From OE-Core rev: 74658b66530184b0287152397341fbe411e90c71) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: record removals in buildhistory directoryJonathan Liu2013-06-041-1/+1
| | | | | | | | | | | | | | | "git add ." does not record files that were removed in the buildhistory directory. Specify the -A flag to also record removals. This was discovered by the following warning added in Git 1.8.3: warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal', whose behaviour will change in Git 2.0 with respect to paths you removed. (From OE-Core rev: a45a247e2cfa58892a0c9eb050d603a38cd839db) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Sync with bitbake changesRichard Purdie2013-05-231-1/+4
| | | | | | | | | | Adjust to the recent changes in the git fetcher. This code should work with current and previous versions of bitbake and can be cleaned up when we move to new bitbake versions. (From OE-Core rev: 835b64d4e9ed7b627b56a75d529f1a403c5db1a8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: track contents of selected files in imagesPaul Eggleton2013-05-101-0/+10
| | | | | | | | | | | | | | | Add a BUILDHISTORY_IMAGE_FILES variable specifying a space-separated list of files within an image to copy into buildhistory, so that changes to them can be tracked. Typically this would be used for configuration files, and by default this includes /etc/passwd and /etc/group, but the user is free to extend this list by setting the variable in local.conf. Implements [YOCTO #4154]. (From OE-Core rev: ed6bb6e3db518082d3a9c45d548bc1339be2c5ca) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: change default BUILDHISTORY_DIR to TOPDIRMartin Jansa2013-05-031-1/+1
| | | | | | | | | | | | * like PERSISTENT_DIR I find BUILDHISTORY_DIR more persistent then tmp-eglibc directory * WARN: people with existing checkouts in TMPDIR/buildhistory need to move it to new location first (in order to save history) (From OE-Core rev: d3ad9a4c573fec08b5606a4c3e86f93cb95e8718) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: fix interaction with rm_workPaul Eggleton2013-04-091-3/+2
| | | | | | | | | | | Change do_write_srcrevs to a postfunc of do_fetch, avoiding a dependency being created that causes large numbers of setscene tasks being executed on every build with both buildhistory and rm_work being enabled. (From OE-Core rev: a751e9042dfffcc5c4701634a1f1f598012d609c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: record tag names and show warning when the same tag ↵Martin Jansa2013-04-041-4/+25
| | | | | | | | | | | | | | | corresponds to different revision * persistent cache records tag-srcrev mappings, but is not shared between builders * when tag is moved in remote repo, all builders should rebuild the component to use the same source, show warning when revision is different than what was used in last build (From OE-Core rev: 0bc22ed6bd67031749e8f2cb5415dabf933eef56) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: improve SRCREV recordingPaul Eggleton2013-03-291-6/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Collect SRCREV information in a separate task and write it out in a format which is more consistent with the rest of the buildhistory output. Using a task means that SRCREV values will also be recorded for native recipes and not just target ones, and the new formatting also correctly handles multiple entries in SRC_URI. Also adds scripts/buildhistory-collect-srcrevs which will report on all of the recorded SRCREV values in a format suitable for use in global configuration (e.g. local.conf or a distro inc file) to override AUTOREV values to a fixed set of revisions. Example output: # emenlow-poky-linux SRCREV_machine_pn-linux-yocto = "b5c37fe6e24eec194bb29d22fdd55d73bcc709bf" SRCREV_emgd_pn-linux-yocto = "caea08c988e0f41103bbe18eafca20348f95da02" SRCREV_meta_pn-linux-yocto = "c2ed0f16fdec628242a682897d5d86df4547cf24" # core2-poky-linux SRCREV_pn-kmod = "62081c0f68905b22f375156d4532fd37fa5c8d33" SRCREV_pn-blktrace = "d6918c8832793b4205ed3bfede78c2f915c23385" SRCREV_pn-opkg = "649" Some notes on using this script: * By default only values where the SRCREV was not hardcoded (usually i.e. AUTOREV was used) are reported - use the -a option to see all SRCREV values. * The output statements may not have any effect in the face of overrides applied elsewhere; use the -f option to add the forcevariable override to each output line to work around this. * The script does not do any special handling for multiple machines; however it does place a comment before each set of values specifying which triplet they belong to as shown above. Relates to [YOCTO #3041]. (From OE-Core rev: 2179db89436d719635f858c87d1e098696bead2a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: ensure SDK package lists include complementary pkgsPaul Eggleton2013-03-271-2/+3
| | | | | | | | | | We need to get in after complementary package installation, so use _append instead of +=. (From OE-Core rev: 8be32b8f30f63691f6b7a9592361b0975c6f8d7a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: trim trailing spaces in file listingsPaul Eggleton2013-03-231-1/+1
| | | | | | | | | | These are mildly annoying when viewing git diffs of the buildhistory repository, so let's just get rid of them. (From OE-Core rev: c257f292bf75061647e380889487c7e2625592de) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: implement history collection for SDKsPaul Eggleton2013-03-231-40/+90
| | | | | | | | | | | | | | | | | | | | | | SDKs are constructed in a similar manner to images, and the contents can be influenced by a number of different factors, thus tracking the contents of produced SDKs when buildhistory is enabled can help detect the same kinds of issues as with images. This required adding POPULATE_SDK_POST_HOST_COMMAND and SDK_POSTPROCESS_COMMAND variables so that data collection functions can be injected at the appropriate points in the SDK construction process, as well as moving the list_installed_packages and rootfs_list_installed_depends functions from the rootfs_{rpm,ipk,deb} to the package_{rpm,ipk,deb} classes so they can also be called during do_populate_sdk as well as do_rootfs. Implements [YOCTO #3964]. (From OE-Core rev: c3736064483d4840e38cb1b8c13d2dd3a26b36aa) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass: add support for SRCREV loggingConstantin Musca2013-03-071-1/+22
| | | | | | | | | | | | | - create "latest_srcrev" for each recipe with the following format: ${BB_FILENAME},${SRC_URI},${SRCREV},${FROM_AUTOREV} [YOCTO #3041] (From OE-Core rev: f9acd756746e61b82b58d300f3ab13f3b086787d) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Allow the version backwards check to be disabledRichard Purdie2013-03-051-8/+10
| | | | | | | | | | When the PR service is not enabled, the versions can go backwards and there are cases we don't want to know about this. This patch adds a variable allowing these checks to be turned off whilst still using buildhistory. (From OE-Core rev: 49f33a42e93711c96fbb099f3e6ee7f092d7b356) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: record more R* variablesPaul Eggleton2013-02-111-0/+23
| | | | | | | | | | | | | | Add RPROVIDES, RREPLACES, RCONFLICTS and RSUGGESTS to the list of tracked variables. Of these, RPROVIDES is always output, whereas the others are only output if they have a value (since it is more common that they don't). Implements [YOCTO #3391]. (From OE-Core rev: 564d76bed7b96d381d6438df81c0d5b4f5a7b2b0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Create global package file list and use throughout PACKAGEFUNCSRichard Purdie2013-02-011-6/+5
| | | | | | | | | | | | | Currently we do a signficant amount of tree traversal in many different places which in inefficient. We can assume that the files don't change and cache the file list which gives an efficiency improvement which this patch does using a global variable. (From OE-Core rev: 2d7608842d2dab07065e60aab729a5c8fd6b7907) (From OE-Core rev: 5c7c8347eb1bc25d194be6f4be142ba0924e2600) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass: track also complementary package informationAndreas Müller2013-01-281-0/+5
| | | | | | | | (From OE-Core rev: ffdb003590d5c1d49d6c6a6710adf71397e4fb9b) Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass: Fix hostname print for 'No changes' caseOtavio Salvador2012-10-181-1/+1
| | | | | | | | (From OE-Core rev: f9e3745d8eeef0df7e6dba3ba17d0b00645c92fa) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Replace "echo -e" with "printf" to have the same behavior in dash or bashAndrei Gherzan2012-09-201-3/+3
| | | | | | | | | | | | | | | | | | | | oe-core removed the prerequisite to have sh as bash. POSIX doesn't define any options and furthermore allows 'echo -e' to be the default behavior. This means that in dash 'echo -e' will actually print '-e' and interpret backslashes by default. We use instead 'printf' builtin command with or without '\n' to simulate 'echo -e' or 'echo -n'. 'printf' needs format while 'echo' can be used without any arguments. So 'echo >' was replaced by 'printf "" >'. 'echo' without '-n' flag adds a new line by default so to keep the same behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is used. [YOCTO #3138] (From OE-Core rev: a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: save metadata revisionsPaul Eggleton2012-08-061-4/+19
| | | | | | | | | | | | Always write the metadata revisions for each layer into a machine- readable "metadata-revs" file so that you can potentially link changes in the output back to changes in the metadata. (Unlike the existing similar build-id file, this is not specific to image changes.) (From OE-Core rev: 45f38d167b523d769c072474b36b3d9b31b4e9d9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: record PKG/PKGE/PKGV/PKGRPaul Eggleton2012-08-061-16/+50
| | | | | | | | | | | | | | | | | | | | Save PKG (the actual output package name, which is often different due to debian renaming), and PKGE/PKGV/PKGR (which may be manipulated in certain special cases e.g. gitpkgv.bbclass in meta-oe, the external-sourcery-toolchain recipe, etc.) Note that these are only written when they are different from the normal package name in the case of PKG, or PE/PV/PR for the other variables. Also, use PKGE/PKGV/PKGR instead of PE/PV/PR when comparing package versions since these actually represent the version that the package manager sees. Implements [YOCTO #2787]. (From OE-Core rev: 65d7e9b2d4d8115ac9fd513c04f39a2df9556a5a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: save preinst/postinst/prerm/postrmPaul Eggleton2012-08-061-8/+16
| | | | | | | | | | | | | Write the value of these package script variables into the packageinfo so that any changes to them can be tracked (in separate files since they are multi-line). Inspired by an earlier patch from Andreas Müller <schnitzeltony@googlemail.com> (From OE-Core rev: 988a417c857c01c87de6ba9602968059cf8d830f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: remove unused functionsPaul Eggleton2012-08-061-29/+0
| | | | | | | | | | | getlastrecipeversion and readRecipeInfo weren't called anywhere. Remove them so we don't have to keep them up-to-date with future additions to the recipe info file. (From OE-Core rev: 22bf6284576ccee607d7bd197420a29242df11c0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: ensure old package info is removedPaul Eggleton2012-08-061-4/+14
| | | | | | | | | | | If a package is removed from PACKAGES, ensure that the package info file and directory are removed from buildhistory so that we don't have stale data lying around. (From OE-Core rev: 223b183197b363edef0c11a25bad33555fca5a15) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: remove obsolete flat package history featurePaul Eggleton2012-08-061-35/+8
| | | | | | | | | | | | Remove the ability to set BUILDHISTORY_KEEP_VERSIONS = "1" to save the package history as flat versioned files rather than relying on git to keep previous versions of the package information. git has proven to work quite well in this capacity. (From OE-Core rev: ccedfd250620fc562988ba730ad5717b107a9d3e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: improve performance of image info collectionPaul Eggleton2012-07-291-28/+23
| | | | | | | | | | | 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>