Commit Graph

166 Commits

Author SHA1 Message Date
Darren Hart 753bc3e919 logging: add bb* logging mechanisms for bash recipe functions
The following logging mechanisms are to be used in bash functions of recipes.
They are intended to map one to one in intention and output format with the
python recipe logging functions of a similar naming convention: bb.plain(),
bb.note(), etc.

For the time being, all of these print only to the task logs. Future
enhancements may integrate these calls with the bitbake logging infrastructure,
allowing for printing to the console as appropriate. The interface and intention
statements reflect that future goal. Once it is in place, no changes will be
necessary to recipes using these logging mechanisms.

I opted to write new functions instead of modifying the oe* logging functions
from base.bbclass (and utils.bbclass in oe) for a couple reasons. First, one of
my goals was to generate a uniform logging API between bash and python in
recipes. Second, there are no users of oe* logging in meta (oe-core) or
meta-yocto, while several oe recipes do use them. I wanted to make a clean start
with the freedom to change behavior without forcing the oe recipes to change or
experience unexpected logging changes. Eventually, the oe recipes can be
migrated to the new bb* logging routines and the existing oe* routines can be
retired (deleted).

(From OE-Core rev: 7cb3f0206619b725e404282fa7a3ac50b4609f1e)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-28 10:45:41 +01:00
Darren Hart 43493742a0 logging: fix oedebug loglevel test
When the existing test for loglevel fails, the syntax used results in the recipe
exiting with a silent failure. Performing any bash command after the test block
resolves the problem, such as "shift" or "echo ''". Rewriting with 'if []; then'
blocks provides a cleaner syntax and also resolves the failure.

(From OE-Core rev: 5857516404411040598b69c85d184ccdfc0af2e0)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-28 10:44:44 +01:00
Richard Purdie b5e03a1a17 base/kernel/image.bbclass: Clean up do_deploy ordering to ensure it just happens before a build completes
(From OE-Core rev: a3b80688465ba5ba7e6d514f9a40ee224a9d3a28)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-29 14:01:49 +01:00
Richard Purdie f8ca2383e1 base/utility-tasks.bbclass: Drop do_setscene and do_rebuild
The do_setscene task only exists for rebuild support now as all its other
functionality has been superceeded. The rebuild task currently crashes due
to removal of the working directory and therefore isn't working for anyone.
It also interacts extremely badly with the newer sstate technology to the
point of being dangerous.

Summary, if we want rebuild support it needs a reimplementation so remove
this version and all its remnants and hacks.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-01 00:10:56 +00:00
Beth Flanagan 411056041b Buildstats commit: buildstats.bbclass
Used to track some basic build metrics by build and task/event level.

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
2011-02-15 09:59:51 +00:00
Saul Wold 14dea89521 fetch2: Correct the clean() mechanism for the fetcher2 code
This create a clean() method in each of the fetcher modules
and correctly cleans the .done stamp file and lock files

Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-02-10 23:49:25 +00:00
Richard Purdie 984e90f4d7 meta/classes: Update classes to use new fetcher API
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07 09:06:37 +00:00
Richard Purdie 604037de4b base.bbclass: Update after fetcher changes
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07 09:06:35 +00:00
Yu Ke e2ac26e7b1 base/sstate.bbclass: Rename fetcher "go" method to "download" when using fetch v2
Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-01-25 12:25:47 +00:00
Yu Ke 8615b0e282 base.bbclass: use bb.fetch2 unpack API
Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-01-25 12:25:47 +00:00
Paul Eggleton 297f2a7afc base.bbclass: fix parse error on recipes with '++' in their name
Fixes "multiple repeat" or "nothing to repeat" errors when parsing recipes
with '++' in the file name.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-01-20 21:36:59 +00:00
Richard Purdie 3f78c071b7 base.bbclass: Use the new stampfile function in bitbake to determine the path to the stampfile
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-06 19:49:17 +00:00
Yu Ke 30d27115ec base.bbclass: add lock file for do_unpack task
This patch intend to fix the random unpack failure of linux-libc-headers-yocto
and linux-yocto.

The root cause of the unpack failure is that: these two recpies has the same URL, thus
has the same dest file during the fetch and unpack phase:
do_fetch  : create tar ball ${DL_DIR}/git_git.pokylinux.org.linux-yocto-2.6.37.tar.gz
do_unpack : extract tar ball ${DL_DIR}/git_git.pokylinux.org.linux-yocto-2.6.37.tar.gz
fetch phase is protected by lockfile, so it works fine. but unpack phase is not lock protected,
thus there is race condition like: when linux-yocto do_unpack is extracting the tar ball,
linux-libc-headers-yocto do_fetch starts to create tar ball thus overwrite linux-yocto's
tar ball and cause linux-yocto do_unpack failure

To fix this issue, do_unpack also need to be protected by lock

Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-01-04 09:46:37 -08:00
Richard Purdie cb79459c30 base.bbclass: Add error message for base_do_unpack failures
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-31 11:13:45 +00:00
Richard Purdie 278aad440e base.bbclass: Correct bb.debug parameters
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-31 09:51:18 +00:00
Richard Purdie edd290bd1a base/utils.bbclass: Drop former checksum code now bitbake is handling this for us
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-20 15:34:50 +00:00
Saul Wold 50911329d4 base.bbclass/poky.conf: Fix INCOMPATIBLE_LICENSE Whitelist checking
Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-11-14 16:50:18 -08:00
Richard Purdie 8e2150e5dc meta/classes: Mark do_package_write and do_build as noexec tasks
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-06 14:33:45 +00:00
Richard Purdie a9c46e44d4 base/utils.bbclass: Sync up overlapping functions
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-02 11:50:50 +00:00
Richard Purdie 48b42dae51 classes: Only enable fakeroot on setscene tasks with packaging
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 16:34:06 +01:00
Richard Purdie 36f1ae42fe pseudo/fakeroot: Move the pseudo directory creation into bitbake
If sstate was used to accelerate a build, the pseudo directory might not have
been created leading to subsequent task failures.

Also, sstate packages were not being installed under pseudo context meaning
file permissions could have been lost.

Fix these problems by creating a FAKEROOTDIRS variable which bitbake ensures
exists before running tasks and running the appropriate setscene tasks under
fakeroot context.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 13:00:40 +01:00
Richard Purdie 6e277cb014 base.bbclass: Ensure an empty do_build tasks exists to silence a warning
The message "WARNING: Function do_build doesn't exist" doesn't look professional,
so fix the underlying problem even if this warning is harmless.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 12:53:36 +01:00
Richard Purdie fd4457199e base/sstate: Add cleanall task to remove downloads and sstate cached files
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 10:22:34 +01:00
Richard Purdie a743e823bc base.bbclass: Fix spelling mistakes and change log level
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-09 16:25:03 +01:00
Saul Wold 7d42965565 base.bbclass: add support for commercial license check
This addresses [BUGID #410], require implict action by someone to enable
functionality that may have license implications.

By default this diables mp3 and mpeg decoding

Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-10-08 16:46:33 +01:00
Richard Purdie 425435f403 base.bbclass: Implement PRINC, a way to increment the PR variable in .bbappend files
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-05 22:26:32 +01:00
Richard Purdie 904ae4a753 Improve FILESPATH usage in .bbappend recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-05 22:26:32 +01:00
Richard Purdie e3d7890cac Make invalid LICENSE fields fatal
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-30 20:46:23 +01:00
Richard Purdie e6566322bd meta/classes: Fix whitespace mismatch and broken functions
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-31 12:02:24 +01:00
Zhai Edwin c3232ed2da base.bbclass: Add xz-native as depends when finding *.xz in SRCURI
Just adding xz-native as DEPENDS in one bb file could not make its unpack run
after xz-native build done.

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
2010-08-27 13:04:38 +01:00
Saul Wold 179e056519 base.bbclass: Initial work to add GPLv2 Only Build with Whitelist for GPLv3 Native tools
[tweaks from Richard Purdie]

Signed-off-by: Saul Wold <Saul.Wold@intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-20 16:53:36 +01:00
Richard Purdie 657188bfef Revert "base.bbclass: Temporarily disable fakeroot for install/package until other fixes get merged"
This reverts commit 2225e12142 and reenables
the functionality now its safe to do so.
2010-08-19 22:41:00 +01:00
Richard Purdie a45e1d54e1 Remove packaged-staging.bbclass
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-19 20:06:25 +01:00
Richard Purdie 2225e12142 base.bbclass: Temporarily disable fakeroot for install/package until other fixes get merged
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-17 12:13:31 +01:00
Richard Purdie 6cbd557cf5 base: Allow unpack to handle localpath=None
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-13 11:35:11 +01:00
Mark Hatle 4e2c84f6b4 pseudo: Change pseudo integration to better support local DBs
Change the pseudo integration:
  * Uprev to latest open source version
  * Restructure the patches to allow for many local DBs, as well as
    pseudo specific lib dirs.

Signed-off-by: Mark Hatle <mhatle@windriver.com>
2010-08-04 15:40:56 -07:00
Mark Hatle aed7ee04fd base.bbclass: Enable fakeroot (pseudo) usage during install and packaging
Use the virtual fakeroot program when installing a package and also
during packaging.  This is important as it allows us to track full
permissions, owners, groups and special files generated by packages.

Signed-off-by: Mark Hatle <mhatle@windriver.com>
2010-08-04 10:40:49 -07:00
Joshua Lock a4fb2c9666 pseudo: Enhancements
Enable changing the data directory on the fly from the environment and then use
this feature within poky to confine pseudo usage to each WORKDIR.

This fixes issues that could be seen under heavy inode reusage e.g.
with rm_work.

Work based mainly off a patch from Joshua Lock but finished by Richard
Purdie.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-24 00:39:58 +01:00
Richard Purdie 2160dddcc1 base.bbclass: Fix after bb.decodeurl was fixed
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-06-07 21:16:16 +01:00
Joshua Lock e7fa3529f3 Update classes to use lib/oe
Adapt modifications from upstream to make Poky classes use lib/oe for the
common Python functionality.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-05-06 12:53:16 +01:00
Richard Purdie 14196cb031 base.bbclass: Sync minor layout changes with OE.dev
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-06 12:22:44 +01:00
Richard Purdie 847324b79b classes/conf: Update to handle gcc-runtime
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-29 22:28:49 +01:00
Richard Purdie 9c5386c1fd base.bbclass: Split up as per the patch in OE.dev by Chris Larson making code more readable and modularised
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-19 23:12:06 +00:00
Richard Purdie 185cb38f13 base.bbclass: Really drop siteinfo by default
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-19 22:53:21 +00:00
Richard Purdie fe55fe7a41 base.bbclass: Fix missing argument
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-18 12:13:32 +00:00
Richard Purdie 1ec852688b base.bbclass: Fix indentation error 2009-12-18 12:11:42 +00:00
Richard Purdie 22429b6137 base.bbclass: Partially sync branch/scm handling functions with OE.dev
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-18 11:41:43 +00:00
Richard Purdie dfd32b429a base.bbclass: Stage etc directory for native packages
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-30 15:11:22 +00:00
Richard Purdie 6568a6d8a9 base.bbclass: Drop unused PSTAGE_BROKEN_DESTDIR variable and run sysroot_prehook at the right point
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-16 22:38:23 +00:00
Richard Purdie e2677471e6 base.bbclass: Add special stage keyword to override leagcy mode
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-13 15:37:00 +00:00