summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/package.py
Commit message (Collapse)AuthorAgeFilesLines
* oe/package: enhance objdump command call with llvmlixiaoyong2024-03-301-1/+1
| | | | | | | | | | | | | Replace `${HOST_PREFIX}objdump` with `${OBJDUMP}`. When utilizing llvm for compiling packages, the invocation of GNU objdump will consistently occur during package precess. This behavior is unfriendly to llvm. So prefer `${OBJDUMP}` over `${HOST_PREFIX}objdump`. (From OE-Core rev: fac4d33041d8feb041e617b9b16689c4d3a522cb) Signed-off-by: lixiaoyong <lixiaoyong19@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package: fix LOCALE_PATHS scan to create locale packagesJonathan GUILLOT2024-02-241-5/+9
| | | | | | | | | | | | | | | | | split_locales() must only check subdirectories in paths added to LOCALE_PATHS to avoid creating weird packages based on filenames also present in paths. Without such a filter, cups recipe adding ${datadir}/cups/templates to LOCALE_PATHS creates the following incorrect packages: - cups-locale-add-class.tmpl - cups-locale-add-printer.tmpl - cups-locale-admin.tmpl (From OE-Core rev: ba3aee0d516bd066829d6edaa8d7bacdd75dd6ef) Signed-off-by: Jonathan GUILLOT <jonathan@joggee.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package: add LOCALE_PATHS to add define all locations for localesJonathan GUILLOT2024-02-141-10/+14
| | | | | | | | | | | | | Some packages may contain localized files not located in default path ${datadir}/locale. Add the new variable LOCALE_PATHS to allow a recipe to define extra paths or even fully override the scanned directories. LOCALE_PATHS is set at ${datadir}/locale by default to keep the exact same behavior for the recipes which did not need modification. (From OE-Core rev: 0ffc7cf01225743789ac30dd325fca05b9203be1) Signed-off-by: Jonathan GUILLOT <jonathan@joggee.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package: replace in place PN-locale-* packages in PACKAGESJonathan GUILLOT2024-02-141-3/+7
| | | | | | | | | | | | | split_locales() removes PN-locale from PACKAGES and adds PN-locale-* to the end. As the PN-locale package typically appears before PN base package, it may result in paths not installed in PN-locale-* packages if already catched by PN. Now insert PN-locale-* exactly where PN-locale was existing in list to avoid such an issue. (From OE-Core rev: 108bc167ed0d43505af3140947a0ab79c89f0a7b) Signed-off-by: Jonathan GUILLOT <jonathan@joggee.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.py: fix Darwin supportEtienne Cordonnier2024-01-151-3/+3
| | | | | | | | | | | | | | | | | - 'subprocess.Popen([d.expand("${HOST_PREFIX}otool)' requires text-mode (a more readable alias for the universal_newlines parameter), since otool produces text and the code 'out.split("\n")' expects a string, not a bytes object. otool is used on MacOS only, so this error isn't triggered on Linux. - use 'startswith("darwin")' in order to support all darwin versions and not just specific versions (meta-darwin supports darwin21 at the moment). (From OE-Core rev: 248ca79a6400e063c4965f9542c614bf837ff758) Signed-off-by: Dominik Schnitzer <dominik@snap.com> Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gdb/systemd: enable minidebuginfo support conditionallyEtienne Cordonnier2023-12-061-1/+1
| | | | | | | | | | | | | | Enabling minidebuginfo is not useful if gdb and systemd-coredump are unable to parse it. In order to parse it, gdb needs xz support. Systemd needs coredump enabled, as well as elfutil enabled as well (systemd-coredump loads libdw which is part of elfutils using dlopen). (From OE-Core rev: 0d2df803bebfd7e832ab7da54c4dacaaeeb424a9) Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: Drop oldincludedirRichard Purdie2023-11-201-2/+1
| | | | | | | | | | | | | | | | | | | Autoconf defines this as: "The directory for installing C header files for non-GCC compilers." Whilst this is something autoconf does allow changing, I find it hard to believe it has much use in the wild now and that headers don't get split like this in reality, it would probably only be useful on really old unixes.. The values are the same in our configuration anyway. Drop the value and just use includedir everywhere. (From OE-Core rev: 506c91cbc6a604a84e37e53ccff430436369802e) 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>
* lib/oe/package: Refactor to make strip_execs callable without dAdrian Freihofer2023-09-121-3/+4
| | | | | | | | | | | This allows to call strip_execs function from devtool without going via tinfoil and a bitbake server process. (From OE-Core rev: 3bde26d64a0c8c3ef8ffbcb398f2a268759321af) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: always sort the conffilesJean-Marie Lemetayer2023-08-091-1/+1
| | | | | | | | | | | | To improve package reproducibility, the conffiles order should not be directly linked to the file system. Sorting the conffiles solves this issue. (From OE-Core rev: c7800fa825fa610327e3d2ee8c5707973b726a83) Signed-off-by: Jean-Marie Lemetayer <j.lemetayer@kerlink.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: enable recursion on file globsRandolph Sapp2023-05-251-1/+1
| | | | | | | | | | | | | | Enable recursion of file globs. This just allows the use of '**' in file globs to match 0 or more subdirectories, it should not make all current globs recursive [1]. [1] https://docs.python.org/3.6/library/glob.html#glob.glob (From OE-Core rev: 4cd62f72dbaa0361e97d7c118752d0a2b02adfbe) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Use shlex instead of deprecated pipeOla x Nilsson2023-04-141-4/+3
| | | | | | | | | | | The pipe library is deprecated in Python 3.11 and will be removed in Python 3.13. pipe.quote is just an import of shlex.quote anyway. (From OE-Core rev: 47731e0f7d9e92db39a3d551fe50df69c1cc6d6a) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: moving field data process before variable process in process_pkgconfigXiangyu Chen2023-03-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the latest version abseil-cpp contains a new library named "absl_log_internal_format", it's basic package config(.pc file) as below: prefix=/usr exec_prefix=${prefix} ...... Requires: absl_config = 20230125, absl_core_headers = 20230125, absl_log_internal_append_truncated = 20230125, absl_log_internal_config = 20230125, absl_log_internal_globals = 20230125, absl_log_severity = 20230125, absl_strings = 20230125, absl_str_format = 20230125, absl_time = 20230125, absl_span = 20230125 ...... Normally, the process_pkgconfig() would process variable data before field data in a .pc file, but in the absl_log_internal_format, the field data in "Requires" section contains "xxxx = xxxx" format, the process_pkgconfig() treats them as normal variable and using the setVar() in bitbake's data_smart.py try to process. The absl_log_internal_format field data contains "_append_", this hit the setVar() checking and finally bitbake stop building and reporting an error as below: "Variable xxx contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake." This patch move the field data process before variable process to avoid the process_pkgconfig() treat the field data as variable. (From OE-Core rev: a73e269d3e591a10bb397b94b82e3fb960112d33) Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Move package functions to function libraryRichard Purdie2023-01-051-3/+1405
| | | | | | | | | Move the bulk of the remaining package "processing" functions over to the package function library for parsing efficiency. (From OE-Core rev: f8785117074908330faca0b99afa7f60ed6ad952) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Move get_conffiles/files_from_filevars functions to libRichard Purdie2023-01-051-0/+77
| | | | | | | | | To avoid reparsing the bbclass code all the time, move the functions to the python function library code which is more efficient. (From OE-Core rev: 424e65627c018b3119050f515b0c7cfb43be5573) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Move fixup_perms function to bb function libraryRichard Purdie2023-01-051-0/+242
| | | | | | | | | To avoid reparsing the bbclass code all the time, move the function to the python function library code which is more efficient. (From OE-Core rev: 7c8c4cfd9355a9cee1144e0444e1b54402f1951c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib: Add copyright statements to files without oneRichard Purdie2022-08-121-0/+2
| | | | | | | | | Where there isn't a copyright statement, add one to make it explicit. Also add license identifiers as MIT if there isn't one. (From OE-Core rev: bb731d1f3d2a1d50ec0aed864dbca54cf795b040) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Add support for kernel strippingSaul Wold2022-01-131-1/+8
| | | | | | | | | | | | | | Extend runstrip() to accept additional argument to enable sharing it with the kernel do_strip() so that KERNEL_IMAGE_STRIP_EXTRA_SECTIONS can be passed. Since is_elf() understands kernel modules there is no need to keep a seperate list for kernmodules or hardcode the values to runstrip. (From OE-Core rev: e09a8fa931fe617afc05bd5e00dca5dd3fe386e8) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package: remove unneeded npm_split_package_dirs functionJean-Marie LEMETAYER2020-01-271-33/+0
| | | | | | | | | | The npm_split_package_dirs function was used by the recipetool when creating npm recipes. This is not the case anymore. (From OE-Core rev: 6cd834737eaa42592e83300099c152e2cfef568c) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Improve determinismRichard Purdie2019-07-261-1/+1
| | | | | | | | | | Its possible in cases with multiple shlib providers we were not being deterministic. Add in a couple of sorted() calls to fix the shlibs and pkgconfig cases with this potential issue. (From OE-Core rev: 5b9a4214ee17e1a39dd5a1742f2ac5ed25a11310) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib+scripts: Convert to SPDX license headersRichard Purdie2019-05-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Fix Deprecated warnings from regexsRichard Purdie2019-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | Fix handling of escape characters in regexs and hence fix python Deprecation warnings which will be problematic in python 3.8. Note that some show up as: """ meta/classes/package.bbclass:1293: DeprecationWarning: invalid escape sequence \.   """ where the problem isn't on 1293 in package.bbclass but in some _prepend to a package.bbclass function in a different file like mesa.inc, often from do_package_split() calls. (From OE-Core rev: 4b1c0c7d5525fc4cea9e0f02ec54e92a6fbc6199) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package.py: use bb.utils.break_hardlinks helperRasmus Villemoes2018-08-231-1/+1
| | | | | | | | | | | | This does the same thing, but is more efficient in case st_nlinks is (already) 1. Depends on bitbake commit 7ae93cf40ab91965147055100432961436bce46c . (From OE-Core rev: a09f8e32044c8daec2d2fb3ff0e830c21402df6e) Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: skip strip on signed kernel modulesfoocampo2018-08-091-4/+16
| | | | | | | | | | | Executing strip action on kernel modules removes the signature. Is not possible to strip and keep the signature, therefore avoid strip signed kernel modules. (From OE-Core rev: 4c47e5f171fa2603355e2f9183065ce8137a18c7) Signed-off-by: Omar Ocampo <omar.ocampo.coronado@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package/package_manager: multiprocess_exec -> multiprocess_launchRichard Purdie2018-07-241-10/+3
| | | | | | | | | | | | After this replacement, the parent exception handling works so we don't need subprocess wrapping with bb.error in the underlying functions. The underlying contexts also have better module handling so the imports can be cleaned up. (From OE-Core rev: aa8260adf53139d776a2affe6118d28b295c1fab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Call file to determine elf status in parallelRichard Purdie2018-07-241-6/+12
| | | | | | | | | | This allows the calls to is_elf (which calls file) to happen in parallel allowing a speedup of do_package and do_populate_sysroot for native recipes. (From OE-Core rev: bbe0d3e26484f3f347262d40a8a9d415ce21fb43) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Refactor to remove isElf/is_elf function duplicationRichard Purdie2018-07-241-30/+43
| | | | | | | | | | | There are probably further cleanups needed here but this at least removes the major code duplication between these two similar funcitons, keeping the kernel module ".ko" extension check for efficiency to avoid opening and reading file contents in the general case. (From OE-Core rev: 7ad0c0d6ab12bebeac097fc0f5210c876dcfe9be) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Don't use subshell to execute fileRichard Purdie2018-07-241-6/+2
| | | | | | | | | We don't need any functionality from the shell here, its just extra fork overhead. Therefore remove it and use subprocess directly. (From OE-Core rev: bcc03ea19e103f6aa93bada2f49fcc5cc7bc0790) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.py: use single quotes for path passed to file in is_elf()Andre McCurdy2018-04-201-2/+1
| | | | | | | | | | | | | Align package.py is_elf() with recent changes in package.bbclass isELF(): http://git.openembedded.org/openembedded-core/commit/?id=7877761534b0c2492da6289e9f2269d41b6ed464 (From OE-Core rev: ab056c7f6065f310be4dd256ceb45f85ff981f69) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Add '-b' option to file call in isELFMark Hatle2018-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isELF function works by running: result = file <pathname> if 'ELF' in result By default 'file' will prepend the result with the path name of the file that is being checked. This usually works fine, such as: $ file /home/foo/openembedded-core/meta/classes/package.bbclass /home/foo/openembedded-core/meta/classes/package.bbclass: Python script, ASCII text executable, with very long lines However, if the path includes 'ELF', ELF will end up in the result, and then the check will return positive. $ file /home/ELF/openembedded-core/meta/classes/package.bbclass /home/ELF/openembedded-core/meta/classes/package.bbclass: Python script, ASCII text executable, with very long lines This will then result in the isELF coming back true, and possibly causing the checks that use isELF, such as the 'is it already stripped' check, to do the incorrect thing. Adding the '-b' option to file will result in the path being omitted in the result: $ file /home/ELF/openembedded-core/meta/classes/package.bbclass Python script, ASCII text executable, with very long lines (From OE-Core rev: 5a324e9b2cf6378f8eaa4e394f9cb36d4e2680ac) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package: Improve filedeprunner subprocess handlingRichard Purdie2017-09-021-8/+3
| | | | | | | | | | | | | | | Currently the exit code of the spawned program isn't checked so it can fail and the do_package task will continue merrily upon its way. Use subprocess.check_output() to ensure we check the exit code and redirect stderr to stdout so if it fails, we see the error output. We can then drop the existing exception handling as the subprocess exception gives a much better error. (From OE-Core rev: ce11cb449222bc47fea4f6d66ff1cc7cdc529ab9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.py: strip_execs: Support for .ko modulesTobias Hagelborn2017-08-271-9/+14
| | | | | | | | | | * Support stripping of .ko modules verifying file extension and check of content "vermagic=" (From OE-Core rev: 61a20502a8433729e2c25b8c718e6f93e3bb6614) Signed-off-by: Tobias Hagelborn <tobiasha@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.py: Fix some lint errorsTobias Hagelborn2017-08-271-10/+9
| | | | | | | | | | - rename type to exec_type not to shadow type - rename isELF is_elf (From OE-Core rev: c72bd726d3e8495aae3e57f524c43b3be6367796) Signed-off-by: Tobias Hagelborn <tobiasha@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Restore functionality to detect RPM dependenciesPeter Kjellerstedt2017-08-181-18/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the transition to dnf and rpm4, the functionality to automatically make RPM determine dependencies was lost. Before the transition, an OE specific tool called rpmdeps-oecore had been added to the rpm suit. It was based on the rpmdeps tool that is part of rpm. For each file specified on its command line, it would output the provides and requires that RPM could determine. During the transition to rpm4, rpmdeps-oecore was replaced with the standard rpmdeps. However, what no one noticed was that unless rpmdeps is given options, e.g., -P or -R, to tell it what it should output, it will not output anything. Thus, it would do all the work to determine the requirements, but would keep silent about it. And since no output from rpmdeps is expected unless there are requirements, there were no warnings indicating that everything was not working as expected. Porting the old rpmdeps-oecore to work with rpm4 is not really possible since it relied on being able to access internals of RPM that are no longer available. However, it turned out that rpmdeps had a debug option, --rpmfcdebug, that would output exactly the information that we need, albeit in a different format and to stderr. To make this usable, rpmdeps has now received a new option, --alldeps, which sends the information we need to stdout. (From OE-Core rev: 958501b3d9201aaabb81ec644c6049e0c9b737e7) (From OE-Core rev: bf017930036f19b3d6df8e5b50d9979ee7045c5c) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.py: Add function strip_execsTobias Hagelborn2017-06-281-0/+105
| | | | | | | | | | | | | Strip all executables in a directory. Utility function placed in oe-package together with run_strip. strip_execs is based on strip_sysroot from staging.bbclass Moving out datastore references in favor of function parameters. (From OE-Core rev: a350bfc41e8a19dfdc5b16e5fb8f2b198e7c55c1) Signed-off-by: Tobias Hagelborn <tobiasha@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "package.bbclass: Restore functionality to detect RPM dependencies"Richard Purdie2017-06-131-27/+20
| | | | | | | | | This reverts commit aea90e9ee6f34e7c1c08307080b1e29646668df6. RP hadn't meant to merge this yet and its causing problems so delay it until its ready. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Restore functionality to detect RPM dependenciesPeter Kjellerstedt2017-06-121-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the transition to dnf and rpm4, the functionality to automatically make RPM determine dependencies was lost. Before the transition, an OE specific tool called rpmdeps-oecore had been added to the rpm suit. It was based on the rpmdeps tool that is part of rpm. For each file specified on its command line, it would output the provides and requires that RPM could determine. During the transition to rpm4, rpmdeps-oecore was replaced with the standard rpmdeps. However, what no one noticed was that unless rpmdeps is given options, e.g., -P or -R, to tell it what it should output, it will not output anything. Thus, it would do all the work to determine the requirements, but would keep silent about it. And since no output from rpmdeps is expected unless there are requirements, there were no warnings indicating that everything was not working as expected. Porting the old rpmdeps-oecore to work with rpm4 is not really possible since it relied on being able to access internals of RPM that are no longer available. However, it turned out that rpmdeps had a debug option, --rpmfcdebug, that would output exactly the information that we need, albeit in a different format and to stderr. To make this usable, rpmdeps has now received a new option, --alldeps, which sends the information we need to stdout. (From OE-Core rev: aea90e9ee6f34e7c1c08307080b1e29646668df6) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Fix various rpmdeps relocation issuesRichard Purdie2017-03-141-2/+5
| | | | | | | | | | | | | | | | | There are several issues with rpmdeps after the rpm v5 -> v4 transition: * _rpmfc_magic_path is an invalid option for rpm4 * --rpmpopt is an invalid option for rpm4 * we need to use the path to rpmrc since otherwise it poitns at the original build path * we need to set MAGIC in the environment so libmagic can find its files. This patch addresses those and ensures rpmdeps works in relocated builds from sstate (or with rm_work). (From OE-Core rev: 806e37264d7102ae982867350ad8363ed3e5f475) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package.py: remove @ from package nameAnders Darander2017-03-041-0/+1
| | | | | | | | | | | @ isn't allowed in package names. Angular2 packages often have @ in their names. (From OE-Core rev: 3c4291bc58bcc5c66ef539eed29b7c37ac968a06) Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-1/+1
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: remove strings and migrate to direct arraysStephano Cetola2016-12-081-6/+7
| | | | | | | | | | | | | | When using subprocess call and check_output, it is better to use arrays rather than strings when possible to avoid whitespace and quoting problems. [ YOCTO #9342 ] (From OE-Core rev: b12cec9a5ef14ecb02be7feec65508cf5d65c795) Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe/lib/package: handle shlibs files disappearingRoss Burton2016-07-201-1/+6
| | | | | | | | | | | | | | During a parallel build it's possible for unrelated shlib files to be removed if the recipe they came from is about to be rebuilt. They can't be involved in the dependency chains as otherwise they wouldn't be removed, so just silently handle files disappearing. [ YOCTO #8555 ] (From OE-Core rev: 1e355da3fda742c78d99ddd2ee5caa9df52f92e1) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Complete transition to python3Richard Purdie2016-06-021-1/+1
| | | | | | | | | This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. (From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Update to use python3 command pipeline decodingRichard Purdie2016-06-021-2/+2
| | | | | | | | | | | In python3, strings are unicode by default. We need to encode/decode from command pipelines and other places where we interface with the real world using the correct locales. This patch updates various call sites to use the correct encoding/decodings. (From OE-Core rev: bb4685af1bffe17b3aa92a6d21398f38a44ea874) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix picking up false npm package directoriesPaul Eggleton2016-05-061-1/+1
| | | | | | | | | | | | It is possible for a Node.js module to have node_modules subdirectories that contain no package.json file (e.g. iotivity-node has such a directory). It appears these should simply be ignored, or else with the way the current code works we will get errors later. (From OE-Core rev: 8c522f1f536270e195c8c73f5c72801495e7b33b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm.bbclass: Stop packagenames containing underscores from being generatedBrendan Le Foll2016-04-141-1/+1
| | | | | | | | | | | Package names cannot contain underscores yet some npm modules use them as part of the name, replace them with hyphens in the package name. (From OE-Core rev: fea932c79c8201e3e7649f4443874ea540e33461) Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: split npm module dependencies into packagesPaul Eggleton2016-03-091-0/+32
| | | | | | | | | | | | | | | | | | | | Rather than rolling all of an npm module's dependencies into the same package, split them into one module per package, setting the SUMMARY and PKGV values from the package.json file for each package. Additionally, mark each package with the appropriate license using the license scanning we already do, falling back to the license stated in the package.json file for the module if unknown. All of this is mostly in aid of ensuring all modules and their licenses now show up in the manifests for the image. Additionally we set the main LICENSE value more concretely once we've calculated the per-package licenses, since we have more information at that point. (From OE-Core rev: 8226805f83d21e7c1d2ba21969f3e8ee4b137496) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* split_and_strip_files: regroup hardlinks to make build deterministicEd Bartosh2015-04-291-2/+1
| | | | | | | | | | | | | | | | | | | | | Reverted 7c0fd561bad0250a00cef63e3d787573112a59cf Created separate group of hardlinks for the files inside the same package. This should prevent stripped files to be populated outside of package directories. This turns out not to be straightforward and has overlap with the other hardlink handling code in this area. The code is condensed into a more concise and documented form. [Original patch from Ed with tweaks from RP] [YOCTO #7586] (From OE-Core rev: 82d00f7254b7d3bb6a167d675d798134884d1b19) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package: Improve strip subprocess handlingRichard Purdie2015-04-291-4/+4
| | | | | | | | | Currently if the strip process fails, we get a message but don't know why. This adds code to show the return value and any error output. (From OE-Core rev: 85e8fb1c7a3baac5633ecdfb36113aec7f4235cb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib/oe/package.py: fix files ownership in packagesFabrice Coulon2015-03-201-1/+1
| | | | | | | | | | | | | | | | This fix solves the problem with the ownership of files in packages. The do_install task was producing correct and expected output but when the files were being put in, e.g. a rpm package, the ownership could be different than that in the do_install task. [YOCTO #7428] (From OE-Core rev: 1a50cc5aeafff0d8ee6c4a41dd2770ecd31455f0) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Fabrice Coulon <fabrice.coulon@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package: Ensure strip breaks hardlinksRichard Purdie2015-01-231-1/+2
| | | | | | | | | | | | | Normally, strip preserves hardlinks which in the case of the way our hardlink rather than copy functionality works, is a disadvantage and leads to non-deterministic builds. This adds a move into place after the strip operation to ensure hardlinks are broken and we bring back build determinism. (From OE-Core rev: 7c0fd561bad0250a00cef63e3d787573112a59cf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>