summaryrefslogtreecommitdiffstats
path: root/meta/classes-global/base.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* base/insane: Move S/B checks to more logical place in insane classRichard Purdie5 days1-5/+0
| | | | | | (From OE-Core rev: f8f3315d58f9ec7824961d1f6f96d39c449b9578) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/bitbake.conf: Move S/B to PSEUDO_IGNORE_PATHS unconditionallyRichard Purdie5 days1-5/+0
| | | | | | | | | Now S and B can't be set to WORKDIR, add to PSEUDO_IGNORE_PATHS unconditionally and simplify the code. (From OE-Core rev: 26cd2d56261827ad8d07e2145e95f82422accac2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Switch UNPACKDIR to a subdir of WORKDIRRichard Purdie5 days1-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change do_unpack to unpack files to a subdirectory of WORKDIR instead of WORKDIR itself. There are several good reasons for this but it is mainly about being able to isolate the output of the unpack task and tell the files apart from other things which are created in workdir (logs, sysroots, temp dirs and more). This means that when the do_unpack task reruns, we can clean UNPACKDIR and know we have a standard point to start builds from. It also makes code in tools like devtool and recipetool easier. To reduce the impact to users, if a subdirectory under UNPACKDIR matches the first subdirectory under WORKDIR of S, that directory is moved into position inside WORKDIR. This preserves the behaviour of S = "${WORKDIR}/git", S = "${WORKDIR}/${BPN}" and other commonly used source directory setups. The directory is moved since sadly many autotools based projects can't cope with symlinks in their paths. The patch also updates reproducible and SOURCE_DATE_EPOCH handling to match the new potential source locations. We can get rid of the horrible list of hardcoded directories in WORKDIR to ignore from that code. (From OE-Core rev: b84eec5c4cbf4b39d6712800dd0d2fe5337721cb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/bitbake.conf: Introduce UNPACKDIRRichard Purdie2024-05-021-2/+2
| | | | | | | | | | | | | Having the unpack directory hardcoded to WORKDIR makes it really hard to make any changes to the unpack process to try and allow for cleanup for example. As a first step toward unraveling the intertwined location usages, add a variable, UNPACKDIR which is where the fetcher is asked to unpack fetched sources. It defaults to the existing value of WORKDIR at this point. (From OE-Core rev: e022d62ba917790af2121da57646271ef17c03fa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Unpack .7z files with p7zipDaniel Ammann2023-12-131-0/+4
| | | | | | | | (From OE-Core rev: b129a45288ce465888b609e463cf94538de22a3c) Signed-off-by: Daniel Ammann <daniel.ammann@bytesatwork.ch> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Ensure recipes using mercurial-native have certificatesRichard Purdie2023-10-271-1/+1
| | | | | | | | | | | | If you try and fetch using mercurial-native, you see certificate errors since it is configured to find ones in the sysroot, not the system. Add the missing dependency so that mercurial recipes using the native tool work. Found trying to make mirroring for old meta-oe stable branches work. (From OE-Core rev: fc567e35b374f8b08975602609ee71e64357fb3d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: add newline before LICENSE_FLAGS_DETAILSMichael Opdenacker2023-09-111-1/+1
| | | | | | | | | | | To improve readability and avoid putting one inside LICENSE_FLAGS_DETAILS. (From OE-Core rev: 5e027da9265e58df016fc3ebe45e4400f0e5c7a7) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/package: Move source revision information from PV to PKGVRichard Purdie2023-08-241-25/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Source control information being present in PV used to be a hard requirement for bitbake to operate correctly. Now that hashes are a required part of task stamps, this requirement no longer exists. This means we can defer the hash pieces to PKGV and simplify PV. Use new bitbake fetcher API to inject the source revisions directly into the hash allowing removal of some horrible code from base.bbclass and avoiding any hardcoding about how SRCREV may or may not be used. Use that API to object the string to append to PKGV and append that directly. The user visible effect of this change is that PV will no longer have revision information in it and this will now be appended to PV through PKGV when the packages are written. Since PV is used in STAMP and WORKDIR, users will see small directory naming and stamp naming changes. This will mean that sstate reuse through hash equivalence where the source revision changes but the output does not will become possible as the sstate naming will become less specific and no longer contain the revision. The SRCPV variable will no longer be needed in PV and is effectively now just a null operation. Usage can be removed over time. (From OE-Core rev: a8e7b0f932b9ea69b3a218fca18041676c65aba0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: improve LICENSE_FLAGS_DETAILS outputRoss Burton2023-06-241-1/+1
| | | | | | | | | | | | Don't prefix the output of LICENSE_FLAGS_DETAILS with "For further details, see" so that recipes can put arbitrary text in their license details instead of being limited to a specific sentence structure. (From OE-Core rev: d606ad5c237d0e28f09f0aa783e83846cbca8d21) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: add ability to provide further details when using LICENSE_FLAGSRoss Burton2023-05-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recipes with proprietary licenses often need to use LICENSE_FLAGS so that the user can opt-in with consent. However, if you don't consent then the error simply tells you the license identifier but not further context. Add a new variable LICENSE_FLAGS_DETAILS, which will be looked in for a flag with the name of the licence. If found then the contents are printed as a source of further details. For example, a recipe with an EULA may set: LICENSE_FLAGS = "FooBar-EULA" LICENSE_FLAGS_DETAILS[FooBar-EULA] = "https://example.com/eula" If Foobar-EULA isn't in LICENSE_FLAGS_ACCEPTED then the error message is more useful: Has a restricted license 'FooBar-EULA' which is not listed in your LICENSE_FLAGS_ACCEPTED. For further details, see https://example.com/eula. (From OE-Core rev: cb5cdcaf3310e889e80861ccfaf46c1bce624ac1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: fix typosUlrich Ölmann2023-03-071-2/+2
| | | | | | | (From OE-Core rev: 0f8baa36fa99c66dbf305da355b665cb053c3ef4) Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Fix way to check ccache pathChangqing Li2022-12-231-1/+1
| | | | | | | | | | | | | | The previous code had 2 issues: 1. make hosttools/ccache always link to host's ccache (/usr/bin/ccache) even we have one buildtools 2. make hosttools/gcc etc, link to host's gcc event we have one buildtools when keyword ccache in buildtools's path, eg: /mnt/ccache/bin/buildtools This patch is for fix above issues. Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Switch to use addpylib directive and BB_GLOBAL_PYMODULESRichard Purdie2022-12-081-23/+0
| | | | | | | | | | | | | | | Since bitbake now supports an official method to inject python modules, switch to it. Anyone using OE_EXTRA_IMPORTS will need to adjust their code accordingly, probably switching to their own module namespace. Also switch to using BB_GLOBAL_PYMODULES to list the global modules to import. (From OE-Core rev: 1f56155e91da2030ee0a5e93037c62e1349ba89f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Drop do_package base definitionRichard Purdie2022-11-271-5/+1
| | | | | | | | | | | | I can't see how anyone would be using this very old package function definition since package.bbclass is always inherited in modern OE. All it seems to do is waste CPU cycles. Drop it and it's associated EXPORT_FUNCTIONS entry. (From OE-Core rev: 56f7aa4cc0256aff96a1d720bd1931ea9a9bac8a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Update classes to match new bitbake class scope functionalityRichard Purdie2022-08-121-0/+789
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>