Commit Graph

5448 Commits

Author SHA1 Message Date
Daisuke Yamane
2070441607 bitbake: lib/bb/utils.py: Preserve ownership of symlink
Yocto Bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13806

Uncomment lchown() to preserve ownership of symlink.

(Bitbake rev: 6a0b6dd17c6d842960d448114b252e92c55dea33)

Signed-off-by: Daisuke Yamane <daisuke.yamane@cybertrust.co.jp>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-22 23:57:26 +00:00
Richard Purdie
9b312bca47 bitbake: fetch2/svn: Avoid UnboundLocalError exception
The update codepath would trigger:
Exception: UnboundLocalError: local variable 'svnfetchcmd' referenced before assignment

Fix this so the code functions as intended in both fetch and update cases.

[YOCTO #13798]

(Bitbake rev: 16c4e930ff37ea6eac2ac0cb2197908ce3a1cc53)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-20 11:56:37 +00:00
Jan-Simon Moeller
273f78efb5 bitbake: layerindex: allow clones to be shallow
When bitbake-layers fetch-layerindex clones the repositories, these are
full clones. Allow the user to specify '-s' and do shallow clones
instead for faster downloads.

(Bitbake rev: a0c8b27675a590d9deeb3cbc462c0eb0e113cf3b)

Signed-off-by: Jan-Simon Moeller <dl9pf@gmx.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-19 11:26:12 +00:00
Jens Rehsack
5e90105d90 bitbake: fetch2: svn: care for path_spec
Documentation says:
    "path_spec": A specific directory in which to checkout the specified
    svn module.
but existing svn fetcher uses "module" always as path of checked out
svn-module, regardless whether path_spec was given or not.

(Bitbake rev: 75223644ab9bc94fc268f1bab775e66c4188f279)

Signed-off-by: Jens Rehsack <sno@NetBSD.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-19 11:26:12 +00:00
Robert Yang
50524c152c bitbake: event: Remove duplicated items from close matches
It printed duplicated ones when there are multiple similar recipes in
differrent layers, for example, if python-lockfile in different layers,
and there is no python3-lockfile:

$ bitbake python3-lockfile
ERROR: Nothing PROVIDES 'python3-lockfile'. Close matches:
python-lockfile
python-lockfile
python3-aiofiles

Remove the duplicated ones to fix the problem.

(Bitbake rev: 5612192cec9f467e2ab5a86482cb34876d198bc6)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-19 11:26:12 +00:00
Richard Purdie
17c60cc27b bitbake: cooker: Reset loghandler
When parsing, reset the loghandler when finished, else the messages
can be misleading.

(Bitbake rev: 7af80cd1dd577b05d39a3cc5d5c547a2549e39df)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-19 11:26:12 +00:00
Kyle Russell
06b2c82a43 bitbake: data: Don't allow renameVar calls with equivalent keys
While usually a programming error, the behavior can cause a Parser
instance to eventually gobble up a significant amount of memory,
greatly affecting system performance.  Try to avoid getting into
that situation and alert the user about what they attempted to do.

(Bitbake rev: 01bf0912eef5700d61c6e3c9138cb4b6825ee782)

Signed-off-by: Kyle Russell <bkylerussell@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-19 11:26:12 +00:00
Peter Kjellerstedt
14ba850aa9 bitbake: fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache"
Mark any keys used to cache the srcrevs for a recipe as "dontcache" if
BB_DONT_CACHE is set for the recipe. Remove any such keys upon the
next bitbake run even if BB_SRCREV_POLICY is set to "cache". This will
make sure the srcrev is updated as expected if ${AUTOREV} is used.

(Bitbake rev: ba093a38539960e645e994a66ed7872a604c00a9)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-19 11:26:12 +00:00
Peter Kjellerstedt
96074fa9bd bitbake: fetch2: Make fetcher_compare_revisions() work
This seems to have been broken for a very long time. Now it also works
regardless of BB_SRCREV_POLICY.

(Bitbake rev: ffd663a8e07e2e39e8ca2d2493f4f98037c5f9e4)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-19 11:26:12 +00:00
Peter Kjellerstedt
f8d1ac6653 bitbake: knotty: Make the bb.command.CommandExit event terminate bitbake
This matches the other bb.command.Command* events and without it,
running `bitbake --revisions-changed` will hang indefinitely if there
are changed revisions.

(Bitbake rev: 40520d229c8ea51ee9784184ab5d13a82dd1eb61)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-19 11:26:12 +00:00
Richard Purdie
925800570f bitbake: cooker/siggen: Empty siggen cache during parsing
When parsing recipes its apparent the memory usage of bitbake rises linearly
with number of recipes parsed. It shouldn't.

Using tracemalloc (thanks for the tip Joshua Lock) it was clear that the
dependency information left behind in siggen was the culprit. Add a new
method to allow us to drop this information. We don't need it after the recipe
has been parsed and hashes calculated (at runtime its different but only the
currently executing task would be in memory).

This should give signficant memory usage improvements for bitbake and that
in turn should help speed on more constrained systems, as well as when used in
multiconfig environments.

(Bitbake rev: 5d98d8e39bba42f458532b1eef3619f2321d8a2b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-17 23:11:38 +00:00
Jon Mason
eae875dae7 bitbake: bitbake: layerindex: use branch when specified
When currently specified, the branch is used to verify the versioning of
the meta layer, but the master branch is checked out.  This change
allows for the branch to be specified.  Now it is easy to specify all
of the meta layers being added are of the same version, without having
to do it in each individual git tree.  Also, it will error if there are
branches without a matching version.  Finally, this allows for meta
layer git trees without a master branch.

(Bitbake rev: 4ec49f42f327068890e7aad8553d7f282e2ffaa1)

Signed-off-by: Jon Mason <jdmason@kudzu.us>

Minor rework of the patch to use the layerBranch actual_branch since
the layerindex referenced branch may be different then the overall
release branch.

Also adjust the patch to use the default git checkout branch instead of
master if no branch was specified.  (Some repositories don't have a
master branch.)

Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-15 10:27:45 +00:00
Richard Purdie
9f6a310002 bitbake: siggen: Avoid cache mismatch issues with locked sigs
If locked sigs are in use this function makes little sense, need to
avoid generating mismatch warnings.

(Bitbake rev: 27ad9c1d468fba858a4adeb56b605227b415ae0f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08 16:01:33 +00:00
Richard Purdie
4d4f1ee5f6 bitbake: siggen: Cache unihash values to avoid cache lookup
Add unihash cache of values to speed up cache lookup.

This avoids the overhead of the disk based check functions.

(Bitbake rev: 5c9cc45b60904a1c355db9bf9c4495f1b25aca37)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08 16:01:33 +00:00
Richard Purdie
cedfbac466 bitbake: siggen: Optimise get_unihash disk based cache handling
Currently the cache can grow huge since any previously used hash is
retained in the cache. This change moves to use one hash per task
which improves the speed of the functions considerably. Currently
performance is an issue, as are very large cache files and cache
load time.

By moving to a single hash per task, the shorted filename as a key
is no longer usable as the same recipe has multiple variants for
the same filename so this has to change.

(Bitbake rev: ed764e7fcf04b6d0ba6b4cac7415b1ee8f492865)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08 16:01:33 +00:00
Frazer Clews
6ca91a91af bitbake: cooker/toaster: replaced deprecated method warn() with warning()
Removed the deprecated methods as it will only cause problems later on,
and since warn() just calls warning(), it shouldn't change anything

(Bitbake rev: a194f275235f22411cb2368f06a44f61ceb6a0f3)

Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-06 22:49:29 +00:00
Jean-Marie LEMETAYER
f6728edb7e bitbake: tests/fetch: add npmsw tests
This commit adds some tests to validate the npmsw fetcher:

     - bb.tests.fetch.NPMTest.test_npmsw
     - bb.tests.fetch.NPMTest.test_npmsw_bad_checksum
     - bb.tests.fetch.NPMTest.test_npmsw_destsuffix
     - bb.tests.fetch.NPMTest.test_npmsw_dev
     - bb.tests.fetch.NPMTest.test_npmsw_mirrors
     - bb.tests.fetch.NPMTest.test_npmsw_no_network_no_tarball
     - bb.tests.fetch.NPMTest.test_npmsw_no_network_with_tarball
     - bb.tests.fetch.NPMTest.test_npmsw_npm_reusability
     - bb.tests.fetch.NPMTest.test_npmsw_premirrors

(Bitbake rev: ba205df20b6a07a4b1125332601c6c54c7b019b5)

Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27 16:48:10 +00:00
Jean-Marie LEMETAYER
e0bd972ba7 bitbake: fetch2: add the npmsw fetcher
This commit adds a new npmsw fetcher that fetches every npm dependencies
described in a npm shrinkwrap file:

  https://docs.npmjs.com/files/shrinkwrap.json.html

The main package must be fetched separately:

  SRC_URI = "npm://registry.url;package=foobar;version=1.0.0 \
             npmsw://${THISDIR}/npm-shrinkwrap.json"

Since a separation has been created between the package and its
dependencies, the package can also be fetched with a non npm fetcher
without impacting the general behavior:

  SRC_URI = "git://github.com/foo/bar.git;protocol=https \
             npmsw://${THISDIR}/npm-shrinkwrap.json"

(Bitbake rev: f5223be54450bf20e0bfbd53b372a7748a44b475)

Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27 16:48:10 +00:00
Jean-Marie LEMETAYER
8b9505f1d4 bitbake: tests/fetch: add npm tests
This commit adds some tests to validate the npm fetcher:

     - bb.tests.fetch.NPMTest.test_npm
     - bb.tests.fetch.NPMTest.test_npm_bad_checksum
     - bb.tests.fetch.NPMTest.test_npm_destsuffix_downloadfilename
     - bb.tests.fetch.NPMTest.test_npm_mirrors
     - bb.tests.fetch.NPMTest.test_npm_no_network_no_tarball
     - bb.tests.fetch.NPMTest.test_npm_no_network_with_tarball
     - bb.tests.fetch.NPMTest.test_npm_package_invalid
     - bb.tests.fetch.NPMTest.test_npm_package_none
     - bb.tests.fetch.NPMTest.test_npm_premirrors
     - bb.tests.fetch.NPMTest.test_npm_registry_alternate
     - bb.tests.fetch.NPMTest.test_npm_registry_invalid
     - bb.tests.fetch.NPMTest.test_npm_registry_none
     - bb.tests.fetch.NPMTest.test_npm_version_invalid
     - bb.tests.fetch.NPMTest.test_npm_version_latest
     - bb.tests.fetch.NPMTest.test_npm_version_none

(Bitbake rev: b166bd3cc6cc1ca63e885319091f17daaaaa2537)

Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27 16:48:10 +00:00
Jean-Marie LEMETAYER
d842e9e738 bitbake: fetch2/npm: refactor the npm fetcher
This commit refactors the npm fetcher to improve some points and fix
others:

 - The big change is that the fetcher is only fetching the package
   source and no more the dependencies. Thus the npm fetcher act as the
   other fetchers e.g git, wget. The dependencies will be handled later.

 - The fetcher only resolves the url of the package using 'npm view' and
   then forwards it to a proxy fetcher.

 - This commit also fixes a lot of issues with the package names (exotic
   characters, scoped packages) which were badly handled.

 - The validation files - lockdown.json and npm-shrinkwrap.json - are no
   longer used by the fetcher. Instead, the downloaded tarball is
   verified with the 'integrity' and 'shasum' provided in the 'npm view'
   of the package [1][2].

1: https://docs.npmjs.com/files/package-lock.json#integrity
2: https://www.w3.org/TR/SRI

(Bitbake rev: 0f451cdc43130d503ada53ed1b4fc5a24943f6ef)

Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27 16:48:10 +00:00
Jean-Marie LEMETAYER
b9ce68a5d7 bitbake: fetch2/wget: fix downloadfilename parameter
When using a download filename with characters which can be interpreted
by the shell ('(', ')', '&', ';', ...) the command fails. Quoting the
filename fixes the issue.

(Bitbake rev: ed652dce5200161068eccdbfaaaefde33136eb09)

Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27 16:48:10 +00:00
Jean-Marie LEMETAYER
c37a1bc05e bitbake: fetch2: allow fetchers to forward the done condition
This commit is necessary to introduce proxy fetchers and do not modify
the behavior of existing fetchers.

This commit allows fetchers to forwards the done condition to a
proxy fetcher.

(Bitbake rev: ee3a2545e99e6e99559a72bcda64797ae674ec71)

Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27 16:48:10 +00:00
Jean-Marie LEMETAYER
4d771e2699 bitbake: fetch2: allow fetchers to forward the mirrors management
This commit is necessary to introduce proxy fetchers and do not modify
the behavior of existing fetchers.

This commit allows fetchers to forwards the "try_mirrors" functions to
a proxy fetcher.

(Bitbake rev: 462c9a2b368a1720da276310b1d5d0423b7cefea)

Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27 16:48:10 +00:00
Jean-Marie LEMETAYER
fb69936b63 bitbake: fetch2: allow fetchers to forward the donestamp management
This commit is necessary to introduce proxy fetchers and do not modify
the behavior of existing fetchers.

This commit allows fetchers to forwards the "verify_donestamp" and
"update_stamp" functions to a proxy fetcher.

(Bitbake rev: f7612c0704b4252bba5157ce9a94d8888c6d0760)

Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27 16:48:10 +00:00
Jean-Marie LEMETAYER
73912553c7 bitbake: fetch2: add more hash functions for checksum verification
This commit enables the "sha1", "sha384" and "sha512" hash functions in
the supported checksum list. This allows to use more SRC_URI checksums
functions for a url:

  SRC_URI[sha1sum] = "..."
  SRC_URI[sha384sum] = "..."
  SRC_URI[sha512sum] = "..."

The npm fetcher needs this to support subresource integrity:
  https://www.w3.org/TR/SRI/

(Bitbake rev: cd80a646aa841b71e68282bb8d11194abb5df0e4)

Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27 16:48:10 +00:00
Jean-Marie LEMETAYER
d6bd2c1a4b bitbake: fetch2: refactor checksum verification
This commit refactors the way checksums are verified to be more generic.

The support of new hash functions is now limited to the update of the
CHECKSUM_LIST variable.

(Bitbake rev: debd9eeaf5638755d8956b2d65b904fe02826966)

Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27 16:48:10 +00:00
Jean-Marie LEMETAYER
bd184ea6ff bitbake: utils: add is_semver function
This function checks if a string is a semantic version:
    https://semver.org/spec/v2.0.0.html

The npm fetcher needs this function to validate its version parameter.

(Bitbake rev: 61ac4e825fa7afbb76282030586abc9ee4ac215c)

Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27 16:48:10 +00:00
Jean-Marie LEMETAYER
bdcd68f092 bitbake: utils: add sha384_file and sha512_file functions
The npm fetcher needs these functions to support the subresource
integrity: https://www.w3.org/TR/SRI/

(Bitbake rev: 80e2216e2b41cb6170292009064864449bc48bbe)

Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27 16:48:10 +00:00
Richard Purdie
ca3993cc4b bitbake: tests/fetch: Allow wget upgrade tests to run against a local server
Currently these tests rely upon multiple uptream webservers which may change
or be unavailable. Add local copies of the test data, copy the httpserver
from OE-Core (used for testing there) and run these tests against a local
server instead.

(Bitbake rev: d5a4a352723258b4d499d3a51f340109c4f36f60)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-22 15:56:39 +00:00
Chris Laplante
1b1a533133 bitbake: persist_data.py: Immediately get exclusive lock in __setitem__
To avoid races, SQLTable::__setitem__ needs an exclusive lock for the
entire transaction, not just the INSERT/UPDATE part.

(Bitbake rev: feb43e7c30f5bfab75d718896c45df621810d06f)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-19 13:31:05 +00:00
Chris Laplante
96adf215cc bitbake: fetch2/git: _revision_key: collapse adjacent slashes
>From a SRCREV caching point of view, there is no reason to treat the
following upstreams as different:

    SRC_URI = "git://github.com/file/file.git"
    SRC_URI = "git://github.com//file/file.git"

(Bitbake rev: 425e21c14955dd38868c6e97637df3bbe0f89fac)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-19 13:31:05 +00:00
Chris Laplante
065ab5dce0 bitbake: fetch2: do not suffix srcrev cache key with PN
Prior to this change, two different recipes pulling from the same
exact repo could get a different SRCREV during a single parse session.

This was originally observed using git. For git at least, it still
allows recipes to pull from the same repo, but with different branches
or tags, since the form of the srcrev cache key for git is:

        "git:" + ud.host + ud.path.replace('/', '.') + ud.unresolvedrev[name]

Where the 'unresolvedrev' part is the branch or tag name.

(Bitbake rev: 6c938e6fd29beebe09b32be839dae008fe6491d2)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-19 13:31:05 +00:00
Chris Laplante via bitbake-devel
0b9b850537 bitbake: tests/utils: add tests for bb.utils.get_referenced_vars
(Bitbake rev: 346e74e5d751aadf7881de70b5ab6670dfc463ce)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-19 13:31:05 +00:00
Chris Laplante via bitbake-devel
d5b3b76a71 bitbake: bb.utils: add get_referenced_vars
Given a start expression, bb.utils.get_referenced_vars returns the
referenced variable names in a quasi-BFS order (variables within the
same level are ordered aribitrarily).

For example, given an empty data store:

    bb.utils.get_referenced_vars("${A} ${B} ${d.getVar('C')}", d)

returns either ["A", "B", "C"], ["A", "C", "B"], or another
permutation.

If we then set A = "${F} ${G}", then the same call will return a
permutation of [A, B, C] concatenated with a permutation of [F, G].

This method is like a version of d.expandWithRefs().references that
gives some insight into the depth of variable references.

(Bitbake rev: 076eb5453ca35b8b75b8270efb989d5208095b27)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-19 13:31:05 +00:00
Frazer Clews
fa5524890e bitbake: lib: amend code to use proper singleton comparisons where possible
amend the code to handle singleton comparisons properly so it only checks
if they only refer to the same object or not, and not bother
comparing the values.

(Bitbake rev: b809a6812aa15a8a9af97bc382cc4b19571e6bfc)

Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-19 13:31:05 +00:00
Frazer Clews
0ac5174c7d bitbake: lib: remove unused imports
removed unused imports which made the code harder to read, and slightly
but less efficient

(Bitbake rev: 4367692a932ac135c5aa4f9f2a4e4f0150f76697)

Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-19 13:31:05 +00:00
Richard Purdie
31e5bc2b58 bitbake: runqueue: Use a set for the setscene tasks list
This should give performance improvements to functions using this list of
tasks (sets are used for most of the other code for this reason, not sure
why this wasn't a set in the first place).

(Bitbake rev: f5daef68703481a3c243dfecc7de404e6ebfdbb6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-13 13:12:23 +00:00
Peter Kjellerstedt
fbe8b3e3e9 bitbake: knotty: Be consistent when creating/updating progress bars
When creating a new progress bar (using BBProgress), a colon was
appended to the supplied message. However, when updating the message,
no colon was appended.

Change this so that the colon is instead part of the widgets that make
up the progress bar so that it does not matter when and how the
message is updated, it always displays the same.

(Bitbake rev: 08f35c04f6e1ce4c4ca5c2bef4cd8a192e12e682)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-13 13:12:23 +00:00
Peter Kjellerstedt
5c935fb29c bitbake: knotty: Hide the footer if a process progress bar is shown
With the introduction of the hash equivalence server, the progress bar
for "Checking sstate mirror object availability" is shown repeatedly
while the tasks are being executed. If the footer is not hidden then,
it will be moved up one line every time, creating a messy interface.

(Bitbake rev: 56b5ec4c2b3e658e73ca6c3a12feeb96df0977fb)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-13 13:12:23 +00:00
Peter Kjellerstedt
1f383c6a06 bitbake: cooker: Keep track of watched files using a set instead of a list
When there are many watched files, keeping track of them using lists
is suboptimal. Using sets improves the performance considerably.

(Bitbake rev: 1e96df260e47d160dbd36bfc92c31ef06266f662)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-10 09:27:15 +00:00
Richard Purdie
3e108b7017 bitbake: cache: Lower debug level for wold build messages
These messages spam the logs for no good reason, they were useful for debugging
a particular problem long ago but are distracting noise now. Disable them.

(Bitbake rev: 1a9247c468cf09da60e5d396ccb81e950841c99e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-02 16:43:01 +00:00
Richard Purdie
5f349cc227 bitbake: siggen: Test extra cross/native hashserv method
Hack the hashserv to allow extra data to be injected into the hashserv
method. This allows OE-Core to handle cases where there are multiple
sstate objects for the same taskhash, e.g. native/cross objects based
upon BUILD_ARCH or the host distro (when uninative isn't used).

This has been tested and proven to be very effective. We will likely
rework the code to improve how this is handled but for now this
improves automated builds until we can get to that refactoring and
more invasive changes.

(Bitbake rev: 0a09b0fa03d1afc08037964dc63a18ef7cff9c78)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-02 16:43:01 +00:00
Richard Purdie
c9692bdff0 bitbake: runqueue: Fix task dependency corner case in sanity test
A corner case was identified where tasks with valid stamps from previous
builds need to be accounted for in the new sanity test in the migration
code. Add a variable to track such completed tasks to ensure the sanity
test works correctly.

(Bitbake rev: d517b1ef13ca7ab2fb4d761d3bd3b9fb7c591514)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-02 16:43:01 +00:00
Richard Purdie
7ab33df995 bitbake: runqueue: Ensure task dependencies are run correctly
We've seen a number of mystery failures where task B would run despite
task A, its dependency not having run. An example would be do_compile
when do_unpack didn't run.

This has been tracked down to this code block. In theory it shouldn't
trigger however it can and has due to bugs elsewhere. When it does, it
causes significant weird failures and possible build corruption.

Change the code to abort the build. This avoids any chance of corruption
and should ensure the issues get reported, putting an end to the weird
build failures.

There may be some cases where this triggers and it shouldn't, we'll work
through those as they arise and are identified.

(Bitbake rev: 7a92b7f58ab187eddfe550bd6fb687240c7b11bb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-02 16:43:01 +00:00
Richard Purdie
e8ebeeaa1b bitbake: runqueue: Fix equiv hash handling build failures
Regardless of whether we remapped the hash on the server or not, we need
to have bitbake work as if we did as we need to match how the stamp files
look.

This change resolves build failures where tasks were rerunning when they
shouldn't.

(Bitbake rev: 40928f6991436cf687821015324483b205abfcb1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-02 16:43:01 +00:00
Ola x Nilsson
41a0a29c4d bitbake: prserv/serv: Use with while reading pidfile
(Bitbake rev: 6fa8a18ea4994031fdd1253fe363c5d8eeeba456)

Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-30 23:39:42 +00:00
Aníbal Limón
99c27e5874 bitbake: lib/bb: Add BB_SIGNATURE_LOCAL_DIRS_EXCLUDE to speed-up taskhash on directories
The new BB_SIGNATURE_LOCAL_DIRS_EXCLUDE allows you to specify a list
of directories to exclude when making taskhash, our specific case
is using SRC_URI that points local VCS directory.

Use bb.fetch.module to set default to: "CVS .bzr .git .hg .osc .p4 .repo .svn"

(Bitbake rev: 923aff060d8aba8456979c35b16d300ba7c13ff9)

Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-30 23:39:42 +00:00
CHerzig@Gauselmann.de
fc752a831d bitbake: fetch2/clearcase: Fix tar command working directory
We need to ensure the correct working directory is used for this
tar command to succeed.

(Bitbake rev: e1a2a0e29a75dead3426ae083387181ad52da91f)

Signed-off-by: Christian Herzig <cherzig@gauselmann.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-28 12:12:02 +00:00
Richard Purdie
a96403c625 bitbake: lib/bb: Optimise out debug messages from cooker
We have bb.debug(2, xxx) messages in cooker which are useful for debugging
but have really bad effects on performance, 640,000 calls on recent profile
graphs taking tens of seconds.

Rather than commenting out debug which can be useful for debugging, don't
create events for debug log messages from cooker which would never be seen.
We already stop the messages hitting the IPC but this avoids the overhead
of creating the log messages too, which has been shown to be signficiant
on the profiles. This allows the code to perform whilst allowing debug
messages to be availble when wanted/enabled.

(Bitbake rev: f04cd931091fb0508badf3e002d70a6952700495)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-16 23:27:14 +00:00
Richard Purdie
ec3897d9c0 bitbake: runqueue: Only call into the migrations function if migrations active
This doesn't save much time but does make the profile counts for the
function more accurate which is in itself useful.

(Bitbake rev: d446fa89d206fbc6d098215163c968ea5a8cf4a9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-16 23:27:14 +00:00