summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_ipk.bbclass
AgeCommit message (Collapse)Author
2022-08-12classes: Update classes to match new bitbake class scope functionalityRichard Purdie
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>
2022-08-12classes: Add SPDX license identifiersRichard Purdie
As stated in our top level license files, the license is MIT unless otherwise stated. Add SPDX identifers accordingly. Replace older license statementa with the standardised syntax. Also drop "All Rights Reserved" expression as it isn't used now, doesn't mean anything and is confusing. (From OE-Core rev: 081a391fe09a21265881e39a2a496e4e10b4f80b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12classes: Add copyright statements to files without oneRichard Purdie
Where there isn't a copyright statement, add one to make it explicit. Also drop editor config lines where they were present. (From OE-Core rev: 880c1ea3edc8edef974e65b2d424fc36809ea034) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-10package_ipk/deb: Fix specific version handlingRichard Purdie
We recently added a "xxx (= 1.2.3)" style dependency to a recipe and have been having trouble with the opkg and debian backends with it. The issues is that for debian, "=" really does mean equals and includes the PR field. One bitbake recipe does not know the PR of another, nor shoud it. In other words 1.2.3 != 1.2.3-r0. Debian defaults to a PR of "0", not our "r0". The only way I can think of to make this work is to change "=" dependencies without revision information (no "-r" in the version) into things like: "xxx (>= 1.2.3), xxx (<< 1.2.3.0)". This appears to work even if it is a pretty horrible workaround. (From OE-Core rev: 3ba177a1b8e553716f45606aa65b0a74e55d94c1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-04package_deb/ipk/rpm: Add more minimal do_build dependencies backRichard Purdie
The dependencies for do_build became a little too minimal after the removal of recrdeptask since "bitbake go" would not package go-runtime despite it being in DEPENDS and the resulting package having a dependency on it. A reasonable compromise is probably rdeptask instead of recrdeptask which is a lot lower overhead but makes the build target more useful and importantly, lets world builds do what you'd expect them to. (From OE-Core rev: f3d02c328f3f182340528d11c7b10454e3f6a54b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-16reproducible: Merge code into base.bbclassRichard Purdie
Reproducibility is here to stay and needs to be part of our default workflow. Move the remaining code to base.bbclass so it is always a first class citizen and it is clear people need to be mindful of it. (From OE-Core rev: abb0671d2cebfd7e8df94796404bbe9c7f961058) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-28package_ipk: Use localdata store when signing packagesKenfe-Mickael Laventure
When signing a package, we were resolving the `PKGV` version using the original data store (`d`). However, since that store does not have the package name in its `OVERRIDES` list the wrong version can be returned in recipes that produce multiple packages. One such example would be `external-arm-toolchain.bb`. The above issue is fixed by using `localdata` instead of `d` when resolving the needed variables. (From OE-Core rev: 2b5f01cf5a92a873ac4c3f0ba0584cab2cc05714) Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@verkada.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-23reproducible_build/package_XXX: Ensure SDE task is in dependency chainRichard Purdie
(From OE-Core rev: 938e4dfb68a465f61cb754b2cd28d0728616b5a9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-23package_ipk/deb/rpm: Drop recursive do_build task dependenciesRichard Purdie
This is a controversial change which removes the recursive dependencies from the do_build target of packaging tasks of recipes. Currently this means when you "bitbake <image>" or "bitbake <recipe>", the packaging tasks run for all packaging backends enabled for all recipes in the dependency chain. The same therefore then applies to images. We don't actually need that, it is a convinience thing. Removing it massively simplifies the task graph and causes much fewer tasks to execute in many common scenarios. It also means less sstate is fetched for example when building an image. This means when building a recipe all package formats would be built but when building an image, only the format used by the image would be generated. This should be an improvement in most cases but some CI systems may need to be explict about what they're building. 'bitbake XXX --runall build' would give the previous behaviour. (From OE-Core rev: 220d29a5abb5be8b80c64d8f2f48949bc8c534a3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-16classes: Drop now unneeded umask flagsRichard Purdie
Now that 022 is the default in BB_DEFAULT_UMASK in bitbake.conf, we don't need any of these task flags, clean up. (From OE-Core rev: 816fca781943a7dbf40391d9db34c7bf12711962) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-13rootfs_ipk: allow do_populate_sdk in parallel to do_rootfsMichael Ho
Switch do_populate_sdk for the ipk package manager to use a separate target opkg config file and separate the lockfiles restricting do_rootfs and do_populate_sdk from running in parallel. This way if an image recipe includes a dependency to do_populate_sdk by default then it will run in parallel to do_rootfs saving time compared to the sequential execution. (From OE-Core rev: 8c210407d07483075a70c8b97ad52b5eae062c9c) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-25package_ipk.bbclass: add PACKAGE_ADD_METADATA_IPK to sstate variablesMichael Ho
Add PACKAGE_ADD_METADATA_IPK to IPKEXTRAVARS so it affects the sstate hash of do_package_write_ipk. (From OE-Core rev: 4147f0d7a1c2a35cb12e76ed910ef7f066bab90b) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-23package_ipk: Add missing variables to the task hashRichard Purdie
Several variables used by the task are not included in the hash, as highlighted by recent changes to MAINTAINERS not causing rebuilds. Fix this. (From OE-Core rev: 0bfb2e984062e2a00f8989d26aebb89b112d81d2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-13package_ipk: Minor import tweak + ensure packages regeneratedRichard Purdie
The recent opkg-utils change didn't update all the packages since its marked as ABISAFE (and has to be due to update-alternatives). Fix a minor import issue to avoid multiple imports of glob which also causes packages to re-generate. (From OE-Core rev: ef24a545d11febb96d1c0f02c60d9701295ef592) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-22package_ipk: Remove pointless comment to trigger rebuildRichard Purdie
The opkg-utils change didn't trigger a full repackage due to its mention in layer.conf for update-alternatives hash exclusion. Do it manually to invalidate broken ipks. (From OE-Core rev: 6dd59dffd73618e4c0979b284a7968055a4eb8fb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-17opkg/package/rootfs_ipk: allow overwriting OPKGLIBDIRAdrian Ratiu
Some distributions for various reasons (like for example mounting a tmpfs over /var at runtime) can't use /var/lib to store the opkg metadata, so a different path is required to have a functioning package manager. ${localstatedir} can't be modified to something other than the hardcoded value in bitbake.conf because other recipes depending on it will fail to install. So the only recourse, which is also the least invasive, is to allow distros to overwrite the OPKGLIBDIR variable just like they are also allowed to overwrite OPKGBUILDCMD. (From OE-Core rev: 81eae383c287ad2e74321345c5eba862d5704cc4) Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-14image_types.bbclass: Set memory usage limit and CPU threads for xzKhem Raj
when building with opkg backend and huge packages e.g. chromium/llvm all going in parallel, memory pressure causes xz to catapult with do_package_write_ipk: Failed to create package, opkg-build failed with: xz: (stdin): Cannot allocate memory since there are many tasks going on in parallel, xz adds to memory pressure and it wants it all, put an upper limit for memory xz can use We add a variable XZ_MAXRAM with 30% of RAM limit and can be customized if builders have more memory one can set it like XZ_DEFAULTS = "-M 0 -T 0" (From OE-Core rev: 28b277a93a34bba033d9d0d9f3227c9453efd384) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-27package_ip.bbclass: add xz threadingAlejandro del Castillo
Before, threading was enabled via a patch to opkg-build. Now that opkg-build provides a hook for extra arguments, use that. (From OE-Core rev: b288f4e825a036b9cc15b27301d264fe695dba65) Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package_ipk|deb: Use oe.utils.multiprocess_launchRichard Purdie
The current code had broken exception handling due to the use of a "traceback" variable as well as an import. Use the new library code for this instead which reduces code duplication and has fixed/improved exception handling. The chdir code can be dropped since any directory changes are in other processes now so there is no need for it here and the code no longer changes directory. (From OE-Core rev: bcd47389f4b1fc69d2bb4da01933bfa1fdcae092) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-23package_ipg: use xz when building packagesRoss Burton
Add a dependency on xz-native and pass '-Z xz' to opkg-build to use xz instead of gzip when building packages. (From OE-Core rev: b95b6ba1a2959e2294a8848fa35f20163388eb06) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-11package_ipk.bbclass: handle only whitespace in PACKAGE_EXCLUDEAndre McCurdy
If PACKAGE_EXCLUDE is constructed using _append then it's possible that the final value will contain only a space. Currently that results in build failures due to an invalid opkg command line. (From OE-Core rev: f832f57ba9f6babb946fbde580004acfd85667e1) 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>
2017-09-11package_[deb|ipk]: improve multiprocess logic when creating deb/ipk packagesLeonardo Sandoval
Current implementation does not handle possible exceptions coming from child processes, the latter responsible for creating packages. With the aim to have more control, use pipes to communicate exceptions and stop package creation in case of failure. Helps to debug [YOCTO #12012]. (From OE-Core rev: 11350a67ba137f560d04aa643ff500a7ff112c73) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11package_deb, ipk: improve subprocess output on package manager commandLeonardo Sandoval
Redirecting stderr to stdout helps debugging issues, i.e instead of just getting the return code, get also the error log from the pkg manger This commit is in the way to figure out the root cause of [YOCTO #12012], where dpkg-deb fails with a 2 return code and according to the man page, there are multiple issues leading to the same code. (From OE-Core rev: 9ff023fb26f5f0ce19e757beda00ccc32c009b21) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-22package_ipk: Parallelise ipk creationRichard Purdie
Allow the creation of ipks to happen in parallel, making best use of resources on multiprocessor systems. (From OE-Core rev: 07f6c0b464f0671bc39116317138e4ddf27bdae9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-16package_ipk: Clean up Source entry in ipk packagesRichard Purdie
There is the potential for sensitive information to leak through the urls there and removing it brings this into the behavior of the other package backends since filtering it is likely error prone. Since ipks don't appear to be generated at all if we don't set this, set the field to the recipe name used (basename only, no paths). This avoids information leaking. We may want to drop the field if opkg can allow that at a future point but the recipe name is a suitable identifier for now. Reported-by: Andrej Valek <andrej.valek@siemens.com> (From OE-Core rev: ec7feb9d315f357b9a073425a31b352ec24ddfd9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-30package_ipk: correct ipk multiline descriptionsLeonardo Sandoval
Empty descriptions lines are set with a space following by a dot and the multiline ones require a leading space. Also, for non-empty lines, there is no need for formating with textwrap, so remove the logic for the latter. The documentation for multiline description was taken from [1]. [1] https://web.archive.org/web/20100727133051/http://handhelds.org:80/moin/moin.cgi/BuildingIpkgs [YOCTO #10677] (From OE-Core rev: c768c536e4dbee69690d0dc131df05a74b4eac8c) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-12package_ipk/deb: Tweak functions for better cleanup and layoutRichard Purdie
This uses more modern formatting to handle the lockfiles and control file cleanup with try/finally, taking advantage of the previous extra indentation. (From OE-Core rev: 9cd7c2631b0840a57b9ed6c201bcb4fc80094f71) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-12package_ipk: Split into two functionsRichard Purdie
This prepares the way to parallelise ipk generation and splits the iteration over packages and the package generation into separate functions. Whitespace indentation is unchanged deliberately and is fixed in a followup patch. There should be no functional change. (From OE-Core rev: f190d8456c7e135164d3073acfb3319e75c9de76) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10package_ipk.bbclass: Replace empty lines in DESCRIPTION with '.'Mariano Lopez
opkg uses empty lines as separator for next package and if an ipk file was packaged with empty lines in DESCRIPTION opkg won't be able to handle such ipk file, this happens at execution time. This commit will replace empty lines in DESCRIPTION with a '.' when generating an ipk package to avoid this issue. [YOCTO #10677] (From OE-Core rev: 3e678d9b6a9eaeed76ce538d7f6ecf9f423864bc) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15classes: Drop now unneeded update_data callsRichard Purdie
Now that the datastore works dynamically we don't need the update_data calls so we can just remove them. They're not actually done anything at all for a while. (From OE-Core rev: 8de0c5d3bd01919e2bf0394f9c485936d6098cec) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-22package_ipk: Clean up pointless exception handlingRichard Purdie
The exception handling in this function seemed mildly crazy. Python will given perfectly good or in several cases better information if we let its standard traceback/exception handling happen. Remove the pointless code. (From OE-Core rev: 61390438aec4a1f9beb4d332821cc6cda82e0379) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-22package_ipk: Improve failure debug outputRichard Purdie
Currently if the dpkg-deb command fails you see an error message like this: ERROR: nss-3.27.1-r0 do_package_write_ipk: opkg-build execution failed ERROR: nss-3.27.1-r0 do_package_write_ipk: Function failed: do_package_ipk which is pretty much useless. If we use subprocess.check_output, we see a traceback and then: Exception: subprocess.CalledProcessError: Command '<cmd>' returned non-zero exit status 1 Subprocess output: <output> which is much easier to debug from. (From OE-Core rev: 64c8366a805e9cf0168ea2331c50c8d6a70c6dc4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-20classes/package*: Add support for PACKAGE_WRITE_DEPSRichard Purdie
Add a new variable to allow markup of postinstall (and preinst) script dependnecies on native/cross tools. If your postinstall can execute at rootfs creation time rather than on target but depends on a native tool in order to execute, you need to list that tool in PACKAGE_WRITE_DEPENDS. (From OE-Core rev: aff8ca95b8303a4a2a5600c0d8ec0a50ad677258) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16meta: remove True option to getVar callsJoshua Lock
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>
2016-10-04package_ipk.bbclass: Use bb.fatal() instead of raising FuncFailedUlf Magnusson
This sets a good example and avoids unnecessarily contributing to perceived complexity and cargo culting. Motivating quote below: < kergoth> the *original* intent was for the function/task to error via whatever appropriate means, bb.fatal, whatever, and funcfailed was what you'd catch if you were calling exec_func/exec_task. that is, it's what those functions raise, not what metadata functions should be raising < kergoth> it didn't end up being used that way < kergoth> but there's really never a reason to raise it yourself FuncFailed.__init__ takes a 'name' argument rather than a 'msg' argument, which also shows that the original purpose got lost. (From OE-Core rev: 01e3ac73860a24710852383a15bb5d01db13de57) Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14meta: cleanup d.getVar(var, 1)Robert Yang
(From OE-Core rev: 79fe476be233015c1c90e9c3fb4572267b5551d1) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-26package_deb.bbclass/package_ipk.bbclass: sort RPROVIDESRobert Yang
The dict.fromkeys() creates a dict without order, there might be a problem when build the same recipe again, for example: - First build of make: Provides: es-translation, make-locale - Second build of acl: Provides: make-locale, es-translation They are exactly the same Provides, but tools like "diff" doesn't think so. Sort RPROVIDES will fix the problem. (From OE-Core rev: 3506172d7d9f8d92362b6ebb75582b7c3e662dae) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15package_ipk: restore cwd after packagingRoss Burton
opkg-build needs to be executed in the root of the package, so save and restore the current directory so this task doesn't modify the state. (From OE-Core rev: 43dac97f397143abf61fc1c105ea0e4f2fffb90b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Convert to use python3 octal syntaxRichard Purdie
The syntax for octal values changed in python3, adapt to it. (From OE-Core rev: 737a095fcde773a36e0fee1f27b74aaa88062386) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-11gpg_sign: add local ipk package signing functionalityIoan-Adrian Ratiu
Implement ipk signing inside the sign_ipk bbclass using the gpg_sign module and configure signing similar to how rpm does it. sign_ipk uses gpg_sign's detach_sign because its functionality is identical to package feed signing. IPK signing process is a bit different from rpm: - Signatures are stored outside ipk files; opkg connects to a feed server and downloads them to verify a package. - Signatures are of two types (both supported by opkg): binary or ascii armoured. By default we sign using ascii armoured. - Public keys are stored on targets to verify ipks using the opkg-keyrings recipe. (From OE-Core rev: a40f27aa7802e8a0bd87a5417e35adbface62d05) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-09package_ipk: allow to specify OPKG_ARGS in local.confVladimir Zapolskiy
If user specific parameters to opkg are set in local.conf, they are rewritten in package_ipk.bbclass and ignored, instead append package_ipk specific arguments to the user defined ones. The change is needed, if a user has to pass an alternative path to a temporary directory for opkg, e.g. OPKG_ARGS = "--tmp-dir=${TOPDIR}/tmp-opkg" The default /tmp directory may be unusable for do_rootfs task, for example if there is no enough space or /tmp is mounted with noexec mount option, then an alternative path allows to complete do_rootfs and fix the problems like this: ERROR: Unable to install packages. ... sh: /tmp/opkg-5jPLag/run-postinsts-UsUtaI/preinst: /bin/sh: bad interpreter: Permission denied sh: /tmp/opkg-5jPLag/base-files-4hFwQS/preinst: /bin/sh: bad interpreter: Permission denied sh: /tmp/opkg-5jPLag/run-postinsts-UsUtaI/preinst: /bin/sh: bad interpreter: Permission denied sh: /tmp/opkg-5jPLag/busybox-syslog-sJmfbw/preinst: /bin/sh: bad interpreter: Permission denied ... (From OE-Core rev: 0be4c30aaf03de58d8037a89e342ca0b379a0881) Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30package_*.bbclass: Ensure OVERRIDES doesn't change sstate signatureRichard Purdie
Changes to OVERRIDES (e.g. from changing MACHINE) should not change the sstate signatures of do_package_write_*. Exclude the variable explicitly in the package classes to avoid this. (From OE-Core rev: 5826a9260138c437f87ba1a9f84d5c08442b997d) (From OE-Core rev: 59ccabdfb59a3e0917585dafab7a1e7c71330996) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-20package_ipk/deb: Drop version information from RPROVIDESRichard Purdie
In some scenarios rpm needs version information from RPROVIDES. We can add this to the metadata where needed however we need to stop it entering the ipk/deb packages. This data is not needed due to the way opkg/dpkg handle the data. This patch ensures that data isn't used. (From OE-Core rev: c68b975693c10899ce50b4d8c2aa3985ca890ce3) 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>
2015-06-23meta: Add explict getVar param for (non) expansionRichard Purdie
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` (From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-16package_ipk/deb/rpm: Improve OVERRIDES handlingRichard Purdie
(From OE-Core rev: 59ca90114fb0b770d9d79e548b7e52aa0c089e48) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-19packaging: allow globs in CONFFILESChen Qi
Allow globs in CONFFILES. This patch changes the way of CONFFILES handling. After this change, the CONFFILES can take the same form as FILES. That means, we don't have to list a bunch of files for CONFFILES. It will just be expanded like the FILES variable. We don't assume default value for CONFFILES in OE. But distro vendors could provide a default value for CONFFILES in their distro configuration file like below. CONFFILES = "${sysconfdir}" In this way, files under /etc are treated as configuration files by default. Of course, setting CONFFILES in recipes take precedence over the CONFFILES. For example, if the recipe author decides that package A should only treat files under ${sysconfdir}/default/ as config files, he/she can write like this. CONFFILES_A = "${sysconfdir}/default" [YOCTO #5200] (From OE-Core rev: 0d446ef0e5bbca7058eec7259e34f2a1637dfab1) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-06package_ipk.bbclass: Fix SRC_URI whitespace handlingMark Hatle
The SRC_URI may contain whitespace, but be otherwise empty. This can happen in the case: MYSRC = "" MYSRC_arm = "file://myarm.patch" SRC_URI += "${MYSRC}" Unless we strip blank spaces, to determine if it is empty, we can end up generating a "Source: " line which in invalid. This leads to the error: invalid Source: field is speified in the generated CONTROL file (From OE-Core rev: 16cedc3bce6fc37543e9ef053cd7c589e523ca1c) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23package_ipk.bbclass: Support hierarchical feedPaul Barker
This patch allows for an optional new layout for ipk feed directories which I've called a 'hierarchical feed' and is based on how Debian pools package files. It is disabled by default and is enabled by setting IPK_HIERARCHICAL_FEED to "1". In the traditional feed layout, package files are placed in <outdir>/<arch>/. This can lead to several thousand files existing in a single directory which is often a problem if developers want to upload a package feed to a shared web hosting provider. For example, in my case, listing files via FTP only shows the first 2000 files, breaking my scripts which attempt to upload only new and changed files via FTP. In the hierarchical feed, package files are written to <outdir>/<arch>/<pkg_prefix>/<pkg_subdir>, where pkg_prefix is the first letter of the package file name for non-lib packages or "lib" plus the 4th letter of the package file name for lib packages (eg, 'l' for less, 'libc' for libc6). pkg_subdir is the root of the package file name, discarding the version and architecture parts and the common suffixes '-dbg', '-dev', '-doc', '-staticdev', '-locale' and '-locale-*' which are listed in meta/conf/bitbake.conf. This change relies on recent patches to opkg-utils which support hierarchical package feeds. Signed-off-by: Paul Barker <paul@paulbarker.me.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30package_*.bbclass: Simplify addtaskRichard Purdie
The package_write task was previously removed. Remove a remaining superfluous reference to it. (From OE-Core rev: 76bbf9e8f07f3e6f20c890dd4c82c72641e2ca88) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>