Commit Graph

5507 Commits

Author SHA1 Message Date
Armin Kuster
c83e52cef0 bitbake: tests/fetch: Resolve fetch error in bitbake-selftest
FAIL: test_wget_latest_versionstring (bb.tests.fetch.FetchLatestVersionTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest/build/bitbake/lib/bb/tests/fetch.py", line 1229, in test_wget_latest_versionstring
      self.assertTrue(verstring, msg="Could not find upstream version for %s" % k[0])
      AssertionError: '' is not true : Could not find upstream version for db

[YOCTO #13496]

The Oracle UPSTREAM_CHECK_URI used changed and does not work with logic in wget.

Update UPSTREAM_CHECK_URI and UPSTREAM_CHECK_REGEX to match the ones used in the
recipe. Also change the version being checked.

(Bitbake rev: 1b989fb76e3e5f044c2e14c7b26a5562803fde9d)

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-07 07:40:36 +00:00
Scott Rifenbark
5f660914cd bitbake: bitbake-user-manual: Fixed section head typo
Unseting -> Unsetting

(Bitbake rev: 582f1d7a8d150cf5917dfc1efa844f40131ae4bf)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-12 21:44:34 +00:00
Yong, Jonathan
6f8b9e9208 bitbake: bitbake-user-manual: Added "usehead" parameter.
(Bitbake rev: 0c7cf572b8350e7ec1e451d207d67f1f7ce018cb)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-10 20:42:47 +00:00
Richard Purdie
8883ee32f2 bitbake: main: Fix environment handling for UI module imports
The environment was being cleared before the UI imports occurred which
caused problems for graphical UIs like taskexp. The full environment was
intended to be available to UI clients and it was only meant to be cleared
for the server/cooker, so tweak the code order so this is the case.

This fixes problems reported for taskexp.

[YOCTO #12670]

(Bitbake rev: 2e4845c526117d5524cff910afbb6f8212a3e199)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23 15:57:32 +00:00
Ross Burton
61da85778a bitbake: checksum: sanity check path when recursively checksumming
In case something goes tragically wrong, catch a request to checksum / and
refuse.

(Bitbake rev: 8bd16328a9332c57b03198826e22b48fadcd21d9)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-29 15:23:58 +01:00
Ross Burton
1b966ffd5f bitbake: utils/md5_file: don't iterate line-by-line
Opening a file in binary mode and iterating it seems like the simple solution
but will still break on newlines, which for binary files isn't really useful as
the size of the chunks could be huge or tiny.

Instead, let's be a bit more clever: we'll be MD5ing lots of files, but we don't
want to fill up memory: use mmap() to open the file and read the file in 8k
blocks.

(Bitbake rev: f3f28ec7e6cad5003014462feeb9178496107e08)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-29 15:23:58 +01:00
Richard Purdie
f7a8c088ae bitbake: tests/fetch: Update gnome.org urls after upstream changes
(Bitbake rev: cdda992d4eedcf8e23b9a7222c16d49dee1586bd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-29 10:44:21 +01:00
Peter Kjellerstedt
9589076fed bitbake: fetch2/__init__: Disable pseudo in runfetchcmd()
If a fetcher, e.g., git, is run when pseudo is active it will think it
is running as root. If it in turn uses ssh (as git does), ssh too will
think it is running as root. This will cause it to try to read root's
ssh configuration from /root/.ssh which will fail. If ssh then needs to
ask for credentials it will hang indefinitely as there is nowhere for it
to ask the user for them (and even if there was it would not access the
correct private keys).

The solution to the above is to temporarily disable pseudo while
executing any fetcher commands. There should be no reason for them to be
executed under pseudo anyway so this should not be a problem.

RP Ammendum:

We finally did get more information about how to reproduce this problem,
something needs to trigger bb.fetch2.get_srcrev() in a pseudo context,
for example when AUTOREV is in use or the recipe doesn't have a defined
SRCREV. That SRC_URI needs to be using protocol=ssh. This would trigger
an ls-remote of the remote repo and if that happens under pseudo, the
wrong ssh credentials may be attempted which can hang.

[YOCTO #12464]

(Bitbake rev: d0fb46eead1f23356d8c3bd53a85047521ef29a7)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-02 11:56:01 +01:00
Tzu Hsiang Lin
63a68b093e bitbake: fetch2: fix import error for Python 3.6.5
When running bitbake command with Python 3.6.5 always result in
import error causing by the change of distutils module.
This patch replaces the method to search executable in PATH by
"/usr/bin/env <command>".

(Bitbake rev: e4fcf4d9cef6816afac9eebb8d57c82cd1ceb293)

Signed-off-by: Tzu Hsiang Lin <t9360341@ntut.org.tw>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-02 11:44:00 +01:00
David Reyna
9c3da34ec6 bitbake: toaster: do not fail on optional 'custom.xml' file
Explicitly capture and ignore errors when trying to load the optional
'custom.xml' fixture file.

[YOCTO #12554]

(Bitbake rev: 5b26fc8e332daaed092cdbafea3f0b8e11e5e7ae)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-29 11:41:57 +01:00
David Reyna
4c93959c55 bitbake: Toaster: fix shutdown and extra threads
Fix typo in shutdown code to kill threads when "kill -0" is not enough.
Use the '--noreload' flag for 'runserver' so that there are no extra
and unaccounted threads.

[YOCTO #12555]

(Bitbake rev: 14079cb1fd497799548c677962d89c02a6d2bf92)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-29 11:41:57 +01:00
Richard Purdie
fe2c3c59e3 bitbake: providers: Fix determinism issue
We saw builds where runtime providers were sometimes changing order and the
build result was therefore non-deterministic. For example it could show:

DEBUG: providers for lib32-initd-functions are: ['lib32-lsbinitscripts', 'lib32-initscripts']
or
DEBUG: providers for lib32-initd-functions are: ['lib32-initscripts', 'lib32-lsbinitscripts']

which could cause a test to pass or fail.

This change ensures we don't rely on the random order of dictonaries in
memory and act deterministically.

(Bitbake rev: 223a0f68530571d2280f526bddbc718fa803a3dc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-09 06:12:02 -08:00
David Reyna
ca5296a5e5 bitbake: toaster: add 'nobuild' option to Toaster
Add a 'nobuild' option for starting Toaster without the project
and hosted builds support. This allows a Toaster host to provide
local build statistics without opening the host to external users
building projects.

[YOCTO #12315]

(Bitbake rev: 686a230d48ca666bdc0b0565f8e55cc890b90c5f)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18 15:05:36 +00:00
David Reyna
6affa391f7 bitbake: toaster: landing page show cmdline capture
The Toaster initial landing page needs to show that it still has
the command line build capture support in addition to the new
project support.

[YOCTO #12316]

(Bitbake rev: 32f7a0df3626b36584f363897f9f092d8af1ac48)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18 15:05:36 +00:00
David Reyna
ae7eedd69e bitbake: toaster: enable custom env support for shell calls
Allow for custom environment additions for git cloning, for example
for anspass support.

[YOCTO #12193]

(Bitbake rev: 5770a65f4ec0e0c48d11a8b7a7cd297ba6875fd5)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18 15:05:36 +00:00
David Reyna
999834c036 bitbake: toaster: some recipe events do not include packages
Allow for "SinglePackageInfo" events that do not include package data,
for example OPKGN equal 'lib32-*' or 'lib64-*'.

[YOCTO #12204]

(Bitbake rev: 0c7aee74003dbd29da7e5e35cab466c8f858cad3)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18 15:05:36 +00:00
David Reyna
6b132acd0a bitbake: toaster: update Toaster for Django 1.11
Toaster needs to accomodate API changes in Django 1.11.

[YOCTO #12192]

(Bitbake rev: bfec25108d8e00a8ca2c93859a03082bea19789c)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18 15:05:36 +00:00
David Reyna
8eaf495b05 bitbake: toaster: unset BBPATH before starting bbserver for backwards compatibility
The latest build enviroment script is now setting BBPATH. This breaks
building previous releases from a master-based Toaster, because with this
newly inherited BBPATH value the 'bitbake.lock' file ends up in the
Toaster build directory instead of the project's build directory.

Toaster should always clear BBPATH so that the bbserver's environment
is clean (enough).

[YOCTO #12363]

(Bitbake rev: 11cb604a83375ba3b05f7bd36513b9c68852174d)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18 15:05:35 +00:00
Richard Purdie
1c61ba0a3f bitbake: tinfoil: Ensure we clean up loggers
This is primarily paranoid but ensure we remove any loggers we setup
either directly or indirectly so the initial state is restored after
we exit.

(Bitbake rev: 230493d9b99f7d315bc4e5e8d0093bd62ec8f9eb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit af7d63b1f76fd3f7fa92ed15ae61ca47d9e13472)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04 17:24:01 +00:00
Richard Purdie
babf923312 bitbake: event: Ensure we clean up loggers
Whilst we're likely exiting in this case, clean up the loggers we add
so that in the case of certain server retries there is no possibility
multiple loggers stack up.

(Bitbake rev: e52bf5f066618dfabecbd4197f77f78fa463af64)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 25b7bf6672be66bcbfe5760610dce7d3e866cdcc)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04 17:24:01 +00:00
Richard Purdie
a1bff37c3f bitbake: tests/fetch: Add ftp test url
Add in a tets ftp url so we ensure ftp urls contnue to work after the loss
of the ftp.gnu.org ones.

(Bitbake rev: 7016bd9c4b05df2e888ec98e37a8ae6f3ac398bd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e1e8565b5e19dd3f7ef6e7e41932456adaa3df81)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04 17:24:01 +00:00
Ross Burton
738fc234fa bitbake: tests/fetch: use subtests in the wget tests
As we test multiple URLs in this these tests and one failing abandons the test,
use subtests so all URLs are tested. This should help us identify patterns in
the failing URLs.

(Bitbake rev: 0eadcf94540c7e4a634c5c1e873658b65996f334)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c4c4465b32e82d4b6e46a44e776be5039aef6b18)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04 17:24:01 +00:00
Richard Purdie
f79c0d45fa bitbake: tests/fetch: Switch gnu.org urls from ftp -> http/https
The ftp server at ftp.gnu.org is likely to be retired at some point soon
so siwtch over to the http/https services.

This means bitbake-selftest doesn't have ftp test urls, however finding stable
ftp test servers is proving increasingly hard.

(Bitbake rev: 6497a030463cc7fd61bb8319d4c3ec824003c2fc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 892a08245ddb21a464aeb37d3e32377e99dd7e2b)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04 17:24:01 +00:00
Ross Burton
a5e95c2a85 bitbake: bitbake: be more explicit when warning about locale choice
(Bitbake rev: b3f7a75aeac31bc0afb7288fc54eb3929a8e1bae)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 286dce008d6e0bd3121393b28ca02de1385519fb)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04 17:24:01 +00:00
Ross Burton
4b2d0192b2 bitbake: tests/fetch: skip network tests the idiomatic way
Instead of not even having the test functions if network tests are disabled, use
a custom decorator to mark the network tests and skip them.

(Bitbake rev: 618cf9693b9f4b48208603b2359f5717a6a35f8f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit cc420f430b1dafd9ca944bea259a564aaab34595)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04 17:24:01 +00:00
Oleksandr Andrushchenko
fd93e26f0d bitbake: fetch2: Fix missing logger import in repo fetcher
After cleaning deprecated API usage repo fetcher is missing
logger as it was indirectly imported via deprecated bb.data.
Fix this by importing logger directly.

Fixes: 9752fd1c10b8 ("fetch2: don't use deprecated bb.data APIs")

(Bitbake rev: 7ae321a9ede9fb0ee1a0794aa22815a593d1568d)

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f8e027d26603db2f1fe757dca767ea35d95174c7)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-04 17:24:00 +00:00
Richard Purdie
f7b90ab3ea bitbake: main: Give a user readable error if we can't locate topdir
Currently if you run bitbake in an invalid directory, the user experience
is poor:

birbake/lib/bb/main.py", line 427, in setup_bitbake
    topdir, lock = lockBitbake()
  File "./bitbake/lib/bb/main.py", line 494, in lockBitbake
    lockfile = topdir + "/bitbake.lock"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

This ensures we exit straight away with a better error message.

[YOCTO #12163]

(Bitbake rev: 2a931d5e4ac092ce275f3a51e22b802689f511e6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-31 09:09:27 +00:00
Paul Eggleton
7226a1c600 bitbake: cooker: fix watching directories with Python 3.6+
In Python 3.6, glob.glob() was reimplemented to use os.scandir() (which
itself appeared in Python 3.5), thus our monkey patching of os.listdir()
here was no longer effective. The end result was not only that bitbake
wouldn't notice added recipes or bbappends with BB_SERVER_TIMEOUT set
when being run with Python 3.6 (the shipped Python version on Fedora 26
and some other distribution versions), it also broke devtool modify,
devtool upgrade and devtool extract since they rely on the ability to
create a bbappend on the fly and have bitbake pick it up.

To fix it, do the same monkey patching for os.scandir(), which needs to
be conditional upon that actually existing since we have to support
Python 3.4 that doesn't have it. Long term we should probably look for a
better way to handle this that doesn't involve monkey patching Python
library code.

Fixes [YOCTO #12185].

(Bitbake rev: d57c4718a3a1eb7b8397085c307fcb0bec6454ef)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-31 09:09:27 +00:00
Khem Raj
ca5bb8224f bitbake: bitbake: Update version to 1.36.0 for stable release
(Bitbake rev: 83834a58b6c1ec866967c03494b9a7f4d5f1177e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-31 09:02:47 +00:00
Richard Purdie
9696726199 bitbake: toaster/highlight.pack.js: Fix corrupted file
The newly added file in the last commit was corrupted, fix it.

(Bitbake rev: be393f247a08c0a4a50a6a76b8fd57f78295d2a1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-10 11:05:08 +01:00
David Reyna
2c27e3ea04 bitbake: toaster: Remove prettify
Remove "prettify.js" and "prettify.css" due to license issues with Apache2.
Replace with "highlight.pack.js" with its BSD3 License.

[YOCTO #12206]

(Bitbake rev: 6361698819530382541506b06a61f2c76dde59cb)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Brian Avery <brian.avery@intel.com>
Signed-off-by: David Reyna <david.reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-10 09:18:17 +01:00
Leonardo Sandoval
39910d0894 bitbake: README: new readme file including main aspects of the project
Includes brief description of the project, pointers to website, documentation,
mailing list and source code.

(Bitbake rev: 28249c42701f9156a0b3153d72d7e46dacab37cb)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-07 23:20:41 +01:00
Leonardo Sandoval
a667a85126 bitbake: bitbake-user-manual-metadata: include a space on a append example
By definition, the override operator "_append" does not include a space,
so include it.

(Bitbake rev: 6775e2de9067d8f472d7bfb5b78ec835a5688755)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-07 23:20:41 +01:00
Leonardo Sandoval
0582b2c6ca bitbake: bitbake-user-manual/bitbake-user-manual: remove YP as build system
YP is not a build system, so it can not be used as build system example.

(Bitbake rev: dc86d38816aeb0fcbceb34cbaaa6ed98d33383e9)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-07 23:20:41 +01:00
Jeremy A. Puhlman
801188bbd9 bitbake: Add args.force to localargs before do_add_layer
Adding layer "meta-signing-key" to conf/bblayers.conf
Traceback (most recent call last):
  File "/local/build/project/build/poky/bitbake/bin/bitbake-layers",
line 103, in <module>
    ret = main()
  File "/local/build/project/build/poky/bitbake/bin/bitbake-layers",
line 96, in main
    return args.func(args)
  File
"/local/build/project/build/poky/bitbake/lib/bblayers/layerindex.py",
line 250, in do_layerindex_fetch
    self.do_add_layer(localargs)
  File
"/local/build/project/build/poky/bitbake/lib/bblayers/action.py", line
44, in do_add_layer
    if not (args.force or notadded):
AttributeError: 'Namespace' object has no attribute 'force'

(Bitbake rev: 4325f7a7df67eaf4b51af03b453e84bf88fae408)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-07 23:20:41 +01:00
Mikko Ylinen
3e321ad2b8 bitbake: bitbake-user-manual: add more gitsm fetcher limitations
The submodule sources fetched by the gitsm fetcher are not automatically
tracked by the licensing and archiver infrastructures.

Add these limitations to the existing 'warnings' sections for
gitsm.

[YOCTO #11594]

(Bitbake rev: ca10186d60a52af6464bd998fa0b7146513bed0e)

Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-07 23:20:41 +01:00
David Reyna
3eb62b0d70 bitbake: toaster: build missing toaster.conf settings
The bitbake server changed such that the Toaster custom settings from
'toaster.conf' and 'toaster-bblayers.conf' that were set when
the '--server-only' mode was started were lost when the subsequent build
request happened, resulting in builds missing all custom changes.

This patch asserts those environment settings in both server calls.

[YOCTO #12194]

(Bitbake rev: fa767d85f19a7af92a44fe11fdfb38633009ad71)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-07 23:20:41 +01:00
Scott Rifenbark
3927067c8e bitbake: bitbake-user-manual: Updated kernel version in PREFERRED_VERSION example
(Bitbake rev: 41ba3c8bfcd3501604f6a17bd327a8193b11b656)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-26 15:44:15 +01:00
Mardegan, Alberto
e4dae63205 bitbake: bitbake: lib/bb/utils: fix movefile() copy to dir fallback
When the destination is a directory, building the the destination file
path is always needed.  That's because even if the copy fallback is
taken, it's always followed by a rename.

(Bitbake rev: 14c17480827ced2e03c1b62dc839696421fc4de8)

Signed-off-by: Alberto Mardegan <amardegan@luxoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-25 14:14:17 +01:00
Richard Purdie
7a822506c0 bitbake: server/process: Increase runCommand timeout
We were seeing cases where we could hit the 5s timeout on large/fast machines
running many different tasks at once. Increase this to 30s since the main
connection timeout path should no longer hit this slow path.

[YOCTO #12116]

(Bitbake rev: 131d4b8a5834781a93ed41e2967d8dcd4d80f29a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-25 14:14:17 +01:00
David Reyna
ce57a391af bitbake: toaster: allow dots in user path names
The dot '.' character should be allowed in the user paths for
local non-git layers, DL_DIR, and SSTATE_DIR.

[YOCTO #10650]

(Bitbake rev: 9c0f6e81dae0b91b425e6c0cdf64caa5c15d92b5)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-17 23:24:14 +01:00
David Reyna
d5a109daea bitbake: toaster: reserve HEAD from imported layers
The HEAD reference in Toaster layers are reserved for the
"Local Yocto Project" layers, stored at the top directory.
Imported layers are not allowed to use this since they are
managed differently - for example the 'remotes' will collide.

Fix the add layer handler to not drop the data fields when it
is a git repo.

Explicitly inform the user when an internal Toaster error is
returned via AJAX, so that they know why clicking the layer add
button did not do anything.

[YOCTO #9924]

(Bitbake rev: 04bd9c9341e8390a7923fa0122cd4cb0befa569f)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-17 23:24:14 +01:00
Paul Eggleton
56005ab7c1 bitbake: cooker: ensure monkey-patching in collect_bbfiles() gets undone on error
In collect_bbfiles() we're monkey-patching os.listdir in order to find
which directories to watch, and then undoing that when we're finished -
however if an exception occurred for any reason there was nothing to
ensure the latter occurred. This may not have caused any issues, but as
this kind of thing really ought to be secured using try...finally just
in case, so do that.

(Bitbake rev: 013047484a03185c0ce281c53c1db4949cdc4e69)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-17 23:23:21 +01:00
Paul Eggleton
a9b1aaced1 bitbake: cooker: fix watching empty directories
The code that was supposed to watch directories along BBFILES for
creation of new files wasn't working in the case where the directory did
not initially contain any matching files - since in updateCache() we are
passing the directory path to add_filewatch() and the latter function
calls os.path.dirname() on the path on the assumption that it is a file
path, and thus the parent of the directory got watched but not the
directory itself. (If the directory wasn't empty everything worked fine
since add_filewatch() was called elsewhere with the path to one of the
files in that directory, and thus the directory got watched). Add a
parameter to add_filewatch() to tell it we are passing it directory
path(s) rather than file path(s).

(Bitbake rev: 47a34dee08fcc25d896a1bdf16fa86267f0b898f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-17 23:23:21 +01:00
Scott Rifenbark
d4ac657f8a bitbake: bitbake-user-manual: Edits to "inherit" section.
Fixes [YOCTO #12031]

Applied minor wording changes based on review feedback.

(Bitbake rev: f0930f3216a8358759d561d244fa280932e8bf05)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13 17:19:15 +01:00
Scott Rifenbark
e7f817b56d bitbake: bitbake-user-manual: Removed bad links
Fixes [YOCTO #12029]

There were four links to an old blog post that was leveraged
for the hello world example.  The post has evidently been
removed and the links no longer resolved.  I have taken them out.

(Bitbake rev: db298262189c94be700abfdb8c2ad7827b53afca)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13 17:19:15 +01:00
Scott Rifenbark
4283ae56a9 bitbake: bitbake-user-manual: Updated inherit and INHERIT sections
Fixes [YOCTO #12031]

Moved an inappropriate example from the bottom of the INHERIT
Configuration Directive section up into the inherit directive
section.

Updated the example at the end of the INHERIT Configuration
Directive section to apply to INHERIT.

(Bitbake rev: f169ac5da18d55a40d0554668e1a0ace70f94768)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13 17:19:15 +01:00
Scott Rifenbark
c5820a3961 bitbake: bitbake-user-manual: Clarified inherit, include, require relationships
Fixes [YOCTO #12032]

I applied some re-writing to help clarify the relationships between
the inherit, include, and require directives.

(Bitbake rev: fded970a0709d928f70224d8b61534e9353ee6dd)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-13 17:19:15 +01:00
Paul Eggleton
e2c25f4bd0 bitbake: server/process: ensure server failure log is limited to current session
Printing the last 10 lines of bitbake-cookerdaemon.log when the server
fails to start can sometimes result in printing the output from a
previous run, which could lead the user completely down the wrong path
in terms of the cause of the failure. Use a known start text containing
the time which we can then look for when scanning through the log, and
then grab the last 10 lines of that part instead.

Fixes [YOCTO #11903].

(Bitbake rev: 567f2cf1bc455b4f3cfb1cbd7f25145360b05a62)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12 23:55:29 +01:00
Paul Eggleton
1bb49ce322 bitbake: runqueue: fix BB_SETSCENE_ENFORCE with empty BB_SETSCENE_ENFORCE_WHITELIST
The whitelist shouldn't have to be populated in order for the
enforcement to work properly - check if the list is not None in order to
determine whether the functionality is enabled or not since that is how
the function that sets up the list behaves.

(Bitbake rev: 7b1e79c352ca6eef1693d8abfacf7505544f1caa)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12 23:55:29 +01:00