summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: fetch2: npm: Put all downloaded files in the npm2 directoryPeter Kjellerstedt2022-02-053-5/+9
| | | | | | | | | | | | | Previously npm files that specify downloadfilename= in the SRC_URI would be downloaded to the root of ${DL_DIR} rather than in the ${DL_DIR}/npm2 directory where all other npm files are downloaded. This should make it simpler when setting up and configuring a premirror with the downloaded npm packages. (Bitbake rev: 73fa376d6502ab6f2cccfb25a1193d9b1c3c3bc8) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Correct handling of replacing the basename in URIsPeter Kjellerstedt2022-02-052-22/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The solution implementated in commit 96c30007 (fetch2: fix downloadfilename issue with premirror) missed two corner cases. The first is if the basename of the original URI also appears somewhere else in the replacement URI, in which case it would also be replaced. The second is if the basename of the original URI partially matches the basename of the replacement URI, in which case the inital part of the basename from the replacement URI would be left behind. The second case caused test_npm_premirrors_with_specified_filename to fail. The solution is to prefix the basename with a slash when matching to avoid partial matches, and only replace the basename at the end of the URI. This also adds two test cases that test for these problems. Before this they would give the following errors: - ['file:///mirror/example/1.0.0/some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz'] + ['file:///mirror/some-example-1.0.0.tgz/1.0.0/some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz'] ? +++++ ++++++++++ - ['file:///mirror/some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz'] + ['file:///mirror/some-some-example-1.0.0.tgz;downloadfilename=some-example-1.0.0.tgz'] ? +++++ (Bitbake rev: 5924c6f007519cd8ea6cc8b316814d17b43048ca) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Make test_npm_premirrors work with the current fetcherPeter Kjellerstedt2022-02-051-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two totally opposite use cases for how a premirror is expected to behave in combination with specifying a downloadfilename= parameter in the SRC_URI. On the one hand there is the expectation that it works like any other mirror, which means the premirror is expected to contain a file with the original name specified in the SRC_URI. On the other hand there is the expectation that one can use the artefacts downloaded by bitbake in ${DL_DIR} as a premirror, in which case it is expected to contain a file with the name from the downloadfilename= parameter. The latter case has been how downloaded files have been handled until commit 8a3ff9f3 (fetch2: fix premirror URI when downloadfilename defined), where the fetcher was changed to store files as per the first case. This is also when the test_npm_premirrors test case was modified in commit 5ba191a0 (tests/fetch: add and fix npm tests) to expect the first case. The above change was later reverted in commit 96c30007 (fetch2: fix downloadfilename issue with premirror). However the test_npm_premirrors test case was not updated to match, and has been failing ever since. This has probably gone unnoticed because the npm related test cases require that npm is installed on the host. This commit updates test_npm_premirrors to expect that premirrors use the filenames specified by downloadfilename= as this matches the current fetcher implementation and also is the most likely use case for premirrors. It also tries to mimic how one typically might setup the premirror directory by simply copying the download directory. (Bitbake rev: 9e913ade70474aaeb928814d4763e7105569d63a) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Only set the Git user name/email if they are not ↵Peter Kjellerstedt2022-02-051-18/+13
| | | | | | | | | | | already set If they are set, assume they are correct. (Bitbake rev: a3a3a40b96c29051d97d0c96eb01784cbd1f5420) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Unify how git commands are runPeter Kjellerstedt2022-02-051-46/+27
| | | | | | | | | | | | This unifies the three separate implementations of git() from GitMakeShallowTest, GitShallowTest and GitLfsTest into one implementation in FetcherTest. It also makes use of this in FetcherLocalTest and FetcherNetworkTest. (Bitbake rev: 8c8b418c3e6f8ab2535ad405e8006ee1012f3484) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Improve the verbose messages for skipped testsPeter Kjellerstedt2022-02-051-2/+2
| | | | | | | | | | | | | | | | | | | This changes: test_foo .. skipped 'Network tests being skipped' test_foo .. skipped 'npm not installed, tests being skipped' to: test_foo .. skipped 'network test' test_foo .. skipped 'npm not installed' to avoid double "skipped" in the output. (Bitbake rev: e551328a4595c220b94ab5002d978ddb4deeebcf) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Remove unnecessary \n from mirror variablesPeter Kjellerstedt2022-02-051-0/+2
| | | | | | | | | | | Since commit 044fb04d (fetch2: Allow whitespace only mirror entries) there is no need to separate the entries in mirror variables with "\n". (Bitbake rev: ed22b078aae25e804ca5edf062e2c905d3e49426) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Skip the crate tests if network tests are disabledPeter Kjellerstedt2022-02-051-23/+23
| | | | | | | | | Both test_crate_url and test_crate_url_multi require Internet access. (Bitbake rev: 34e9daed6a7f766bb6e27c7e02c94b545f4791d8) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Remove unnecessary \n from a PREMIRRORS examplePeter Kjellerstedt2022-02-051-4/+4
| | | | | | | | | | Since commit 044fb04d (fetch2: Allow whitespace only mirror entries) there is no need to separate the entries in PREMIRRORS with "\n". (Bitbake rev: 341746c7f7b8e04d3fad51ec1b9e462ced355bfc) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: bitbake-worker: Preserve network non-local uidRobert Yang2022-02-012-2/+21
| | | | | | | | | | | | | | | | The NIS can't work when network is dissable, so preserve network for it, the error is like: do_ypcall: clnt_call: RPC: Unable to send; errno = Network is unreachable Note, enable nscd on the build machine might be a solution, but that isn't reliable since it depends on whether the network function has been cached or not. (Bitbake rev: 4eafae7904bae6e5c6bc50356e8a9077f2e207fa) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Add crate fetcherRichard Purdie2022-01-193-0/+174
| | | | | | | | | This imports the crate fetcher from OE-Core to resolve various module issues and adds some very very basic tests of that new fetcher. (Bitbake rev: 1f06f326fa8b47e2a4dce756d57a9369a2225201) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: build: Tweak exception handling for setscene tasksRichard Purdie2022-01-191-5/+9
| | | | | | | | | | | | | | | If an unexpected exception occurs in a setscene task, it is currently hidden from the user and not recorded in any logs. This isn't helpful to debug such failures. Change the code so that even in the "silent" or "quiet" task case (setscene tasks), a warning is shown with the traceback unless it was an "handled" exception. This means the failing function can show it's own warning/error instead if it wants to and then raise a handled event. (Bitbake rev: 41dcdc61eb40def8c14a42e8d7bb9ce5a34afa57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: Drop BB_STAMP_POLICY/BB_STAMP_WHITELISTRichard Purdie2022-01-182-29/+0
| | | | | | | | These variables were removed from the codebase, update the docs to match. (Bitbake rev: 32180d5057c818a69987aada482e82acf3c72ef2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual: expand BB_HASHSERVE explanationsMichael Opdenacker2022-01-181-1/+4
| | | | | | | (Bitbake rev: 143070a647b7db902a68d81f0b488e45e4d3f6bb) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual: specify the URL to be used with SSH over ↵Quentin Schulz2022-01-171-0/+14
| | | | | | | | | | | | | | | | git is different from `git clone`'s The URL expected by git fetcher when the SSH protocol is used differs from the one given by Git servers to be used with the `git clone` command. Add a note making this specificity known to users. Cc: Quentin Schulz <foss+yocto@0leil.net> (Bitbake rev: 81c09d434aed13fcfc4ba426ae6a0b849447eb5f) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Drop BB_STAMP_POLICY/BB_STAMP_WHITELISTRichard Purdie2022-01-121-22/+1
| | | | | | | | | | | | The different stamp policies were poor versions of the siggen code and task hashes, predating it and being used by packaged staging. They had many limitations, hence their replacement. I'm not aware of any users of that code any more so I believe it and the assoicated stamp whitelist variable can simply be removed. (Bitbake rev: 98407efc8c670abd71d3fa88ec3776ee9b5c38f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-worker: Add/support network task flagRichard Purdie2022-01-121-0/+8
| | | | | | | | | | | | | | | | This patch changes behaviour. After this change any task which does not have the network flag set will have networking disabled on systems that support that (kernel version dependent). Add a "network" task specific flag which then triggers networking to be enabled for this task, it is otherwise disabled. This needs to happen before we enter the fakeroot environment of the task due to the need for the real uid/gid which we save in the parent process. (Bitbake rev: 0746b6a2a32fec4c18bf1a52b1454ca4c04bf543) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: utils: Add disable_network functionRichard Purdie2022-01-121-0/+31
| | | | | | | | | | | | Add a function which uses the unshare glibc call to disable networking in the current process. This doesn't work on older distros/kernels but will on more recent ones so for now we simply ignore the cases we can't execute on. uid/gid can be passed in externally so this can work with pseudo/fakeroot contexts. (Bitbake rev: 9d6341df611a1725090444f6f8eb0244aed08213) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: utils: Update to use exec_module() instead of load_module()Richard Purdie2022-01-051-2/+5
| | | | | | | | | This is deprecated in python 3.12 and Fedora 35 is throwing warnings so move to the new functions. (Bitbake rev: 68a18fbcb5959e334cf307d7fa8dc63832edb942) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/fetch: Drop gnu urls from wget connectivity testRichard Purdie2021-12-201-3/+0
| | | | | | | | | These urls are no longer adding much to the test coverage but the intermittent network issues connecting to them are painful. Drop the urls. (Bitbake rev: bdf5739c5d831dc97a7d81568f94a0953c71017f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual: expand BB_HASHSERVE and document ↵Michael Opdenacker2021-12-201-2/+22
| | | | | | | | | BB_HASHSERVE_UPSTREAM (Bitbake rev: 23cb09108b3064e46e79f6644b802f3539069088) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: npm: Use temporary file for empty user configStefan Herbrechtsmeier2021-12-141-9/+5
| | | | | | | | | | | | Always use a temporary file for the user config 'NPM_CONFIG_USERCONFIG' because npm otherwise failed if configs and npmrc aren't set: double-loading config "/dev/null" as "global", previously loaded as "user" (Bitbake rev: 9f272ad7f76c1559e745e9af686d0a529f917659) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: npm: Quote destdir in run chmod commandStefan Herbrechtsmeier2021-12-141-1/+1
| | | | | | | | | | | Quote destdir in run chmod command to support special characters in package name and to avoid syntax error for packages like '@(._.)/execute'. (Bitbake rev: a701dfce3f0e74b4d7c687eeda83fe9c8e7240b1) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/runqueue: Improve lockfile handling raceRichard Purdie2021-12-141-2/+38
| | | | | | | | | | | | | | Internal bitbake shutdown timings must have changed recently as we're seeing race issues on the autobuilder around the removal of the bitbake.lock file. Improve the lockfile race code to cover bitbake's lockfile too and use it in all the tests. [YOCTO #14658] [YOCTO #14652] (Bitbake rev: bd1912bed64424f9fb28396b71bb49b6090ed087) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: process: Do not mix stderr with stdoutAnton Mikanovich2021-12-091-1/+1
| | | | | | | | | | We should not redirect stderr to stdout if we need to get separated stdout and stderr contents from Popen.communicate() later. (Bitbake rev: 1ecc1d9424877df89fcda2f23c306998998a65ff) Signed-off-by: Anton Mikanovich <amikan@ilbers.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: add a test for version check where compression changesAlexander Kanavin2021-12-092-0/+65
| | | | | | | (Bitbake rev: b6f0c29346ad6463c0e521248633e71886bfb5dc) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: Ensure dumpsig output is deterministicRichard Purdie2021-12-091-8/+8
| | | | | | | | | Currently the console output for signature dumps e.g. with bitbake-dumpsig isn't deterministic. Add some sorting to improve that. (Bitbake rev: a663440b1623f97c9c169df5566e429fbc932a53) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: do not hardcode tarball compressors in version checkAlexander Kanavin2021-12-081-1/+1
| | | | | | | (Bitbake rev: ba3aa8591327d43935f000c6884637997438ecb2) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: add redirectauth parameterJustin Bronder2021-12-082-1/+16
| | | | | | | | | | | | | | | | | | | | Add a parameter that limits sending Basic authentication in the Authorization header to only the first host and not any that we're redirected to. Ignoring potential security concerns, temporary AWS URLs will reject any request that includes authentication details in both the query parameters (from the redirect) and in the Authorization header. Temporary AWS URLs are now being used for release assets from private Github repositories. According to the previous discussion linked below, they're also in use by bitbucket. See also: https://lore.kernel.org/bitbake-devel/CAC9ffDEuZL-k8199bUyN+8frjw6bg-g=vrumxxtvt+RVParQ8Q@mail.gmail.com/ (Bitbake rev: a6ab32013a4381a1b694ed46caf2c9da932644d0) Signed-off-by: Justin Bronder <jsbronder@cold-front.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: test/fetch: Add striplevel unpack parameter testStefan Herbrechtsmeier2021-11-261-0/+15
| | | | | | | (Bitbake rev: 7e1ca7ab50e3c6b642c3c11504c7c8f52cfa4528) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Add striplevel unpack parameterStefan Herbrechtsmeier2021-11-261-0/+3
| | | | | | | (Bitbake rev: f0442a30d3a8459195dbf51a778ffb6150688a0a) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Add striplevel support to unpackStefan Herbrechtsmeier2021-11-261-0/+2
| | | | | | | | | | | | | | | | | | | | Add a parameter `striplevel` to the SRC_URI to strip NUMBER leading components (levels) from file names on extraction. For example, if the archive `archive.tar.gz` contains `some/file`, the SRC_URI `https://.../archive.tar.gz;subdir=other;striplevel=1` will extract `some/file` to `other/file`. This is useful to extract archives to a specified directory instead of the original root component of the archive. The feature is required for the npm support. The npm package contents should reside in a subfolder inside a npm archive (usually it is called package/). npm strips one directory layer when installing the package. (Bitbake rev: aa4926e5d9c92f33b4434e2da709ff0bf3049f5b) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Unify tar command in unpackStefan Herbrechtsmeier2021-11-261-8/+9
| | | | | | | | | | | The tar command and its arguments are repeated for many archive types in the unpack function. Unify the common parts in a variable to prepare further extension. (Bitbake rev: a08e57c9eaec1d9740a96149bf4843e576da4e5c) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart.py: Skip old override syntax checking for anonymous ↵Robert Yang2021-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | functions Fixed when oe-core's path contians append/prepend/remove, e.g.: /path/to/append_test/oe-core/ Initial a build in any build dirs: $ bitbake -p ERROR: Variable __anon_32__buildarea2_xhou_builds_append_test_layers_oe_core_meta_classes_patch_bbclass contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake. The anonymous fuctions has no names, so skip checking for it to fix the issue. (Bitbake rev: ebd00330c41c75797529ff38d6a0955b93f05d1b) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: SRC_URI: mention gitsm fetcherMichael Opdenacker2021-11-251-0/+3
| | | | | | | (Bitbake rev: 0d0e552d87c52c1f90b601698c3d54eec427ee21) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: fix backslash issuesMichael Opdenacker2021-11-211-5/+5
| | | | | | | (Bitbake rev: ffd87a89393f25924f53dbc86dcf5a98c3a8d0ff) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Remove newline string in MIRRORS/PREMIRRORSRichard Purdie2021-11-211-10/+10
| | | | | | | | This syntax is obsolete, update to the correct modern version. (Bitbake rev: 744e9a4c2b6f44116435feb62ac64ff256c752e9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: add missing referenceMichael Opdenacker2021-11-211-1/+1
| | | | | | | (Bitbake rev: d05529cc322ba9198edc12954b982729fc628fa0) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: fix typoMichael Opdenacker2021-11-211-1/+1
| | | | | | | (Bitbake rev: 3ebaba2b2eada35e26c1105291de0d85bd6d2bb8) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: quoting fixesMichael Opdenacker2021-11-212-3/+3
| | | | | | | (Bitbake rev: 0ac887253e6b2df187bcbac0b060dd39920538af) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Fix url remap issue and add testcaseRichard Purdie2021-11-212-1/+2
| | | | | | | | | | Using "" as a target for .replace() is a really bad idea as it duplicates the replacement for every character in the string. Add a testcase which triggered this and correct the code to return the correct result. (Bitbake rev: 3af1ecf049d2eed56f6d319dc7df6eb4a3d4eebc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: utils: Handle lockfile filenames that are too long for filesystemsRichard Purdie2021-11-211-1/+5
| | | | | | | | | | | | | The fetcher mirror code can go crazy creating lock filenames which exceed the filesystem limits. When this happens, the code will loop/hang. Handle the filename too long exception correctly but also truncate lockfile lengths to under 256 since the worst case situation is lockfile overlap and lack of parallelism. (Bitbake rev: 63baf3440b16e41ac6601de21ced94a94bdf1509) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache/ConfHandler: Drop TOPDIR/chdir manipulationsRichard Purdie2021-11-152-29/+5
| | | | | | | | | | | | | | | | | | | | | | | | | This code has been unchanged since 2006 apart from attempts to optimise performance by minimising chdir() calls. There is no reason the modern bitbake parser should be changing directory all the time. We did have some path assumptions in the mists of time but those were resovled and the code is deterministic and doesn't depend on cwd now for parsing. We can therefore drop the changes in directory. Also, TOPDIR is now being set by cookerdata in all cases so we don't need the fallbacks in this code (which was used to effectively initialise a value). We don't need to change TOPDIR when parsing a recipe, that makes no sense. If we stop all the other messing around, we don't need to expand TMPDIR either. These changes have the potential to break some obscure use cases such as an anonymous function assuming the current working directory, or some case which depends on TOPDIR changing but I believe any such uses should be fixed at this point. (Bitbake rev: add5d488e1d6607a98441836075d01cb1dc9c0fa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cookerdata: Set TOPDIR explicitly and fix broken findTopdir()Richard Purdie2021-11-151-6/+6
| | | | | | | | | | | | | | | | | | TOPDIR is set internally deep within the parser to os.getcwd(). Rather than do that, set it explicitly if not set. Note that modern code will almost always have a bblayers.conf file which would have already set TOPDIR before this new code. Also fix findTopdir since the conf/bitbake.conf codepath is just plain incorrect, it would find build metadata, not the current build directory that bitbake would use. Again, the use of bblayers.conf means hitting the fallback code was unlikely. This change makes everything clear and explicit. (Bitbake rev: c03df5283408dfd089b6317677d2b7af6fa73936) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/runqueue: Set TOPDIR in testRichard Purdie2021-11-151-1/+2
| | | | | | | | | | It was clear with testing that we're asuming bitbake sets TOPDIR correctly when running these tests. Remove that implict assumption and make it explicit. (Bitbake rev: c8f1eb377ceb1fc78cbfaed976107720ad78c075) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: doc: bitbake-user-manual: expand SRC_URI descriptionMichael Opdenacker2021-11-131-26/+59
| | | | | | | | | | | >From contents from the Yocto Project manual Took the opportunity to reorder SRC_URI fetchers and options alphabetically. (Bitbake rev: ee6a951de31471c610030d0cf745039a71706b50) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: Fix task-depends.dot for multiconfig targetsRichard Purdie2021-11-131-1/+3
| | | | | | | | | | | | The right hand side of dependencies in the task dependency file generated by bitbake -g was missing multiconfig prefixes, corrupting the data. Fix this. [YOCTO #14621] (Bitbake rev: 1d5ca721040c5e39aefa11219f62710de6587701) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: Add README on fetcher design constraintsRichard Purdie2021-11-111-0/+57
| | | | | | | | | There have been requests to better document the contraints of fetcher design and operation. This README attempts to start that. (Bitbake rev: d9cda7835816ecd5a60f0575f6ce832ec9c6aced) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/pyinotify.py: Remove deprecated module asyncoreRobert Yang2021-11-111-30/+0
| | | | | | | | | | | | | | | When build with nativesdk-python3 (3.10) from buildtools: /path/to/bitbake/lib/pyinotify.py:55: DeprecationWarning: The asyncore module is deprecated. The recommended replacement is asyncio The pyinotify.py's upstream didn't have any update in recent 7 years: https://github.com/seb-m/pyinotify And bitbake doesn't use the asyncore module, so remove the related code. (Bitbake rev: 58fbb01c3e2111bef4f79f88e1aac1827350c82a) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: Handle parsing results queue raceRichard Purdie2021-11-101-5/+9
| | | | | | | | | | The previous fix introduced a race where the queue might not be empty but all the parser processes have exited. Handle this correctly to avoid occasional errors. (Bitbake rev: 8e7f2b6500e26610f52d128b48ca0a09bf6fb2cb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>