summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/sdk.py
AgeCommit message (Collapse)Author
2022-01-04package_manager: ipk: Fix host manifest generationOleksiy Obitotskyy
Since honister host manifest stopped to generate, i.e. manifest file is empty but all ipks/files into sdk is ok. Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24package management: Allow dynamic loading of PMFredrik Gustafsson
Dynamic loading of package managers will allow other layers to simply add their package manager code in package_manager/ and have bitbake find it according to the package manager configuration. This is useful for adding new (faster) package managers to Open Embedded while not increasing the test scope or require Open Embedded to support more package managers. How this is tested: * Build core-image-minimal with all three package managers * Build the sdk with all three package managers. dpkg fails, but it fails on master as well. * Run the complete test suite, all tests passed except 16 * Run those 16 tests on master and verify that they fail there as well * Fix errors making tests works on master but not with this patch. Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-01lib/package_manager: Fix missing importsRichard Purdie
The package_manager code rearranging had some issues with module imports that were now missing. Fix all the ones I could spot from quick inspection. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-27deb: Move package manager to its own dirFredrik Gustafsson
This is a part of a refactor that will split the package manager code so that it's possible to use other package managers in other layers. RP: Fixes to parse/build Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-27ipk: Move package manager to its own dirFredrik Gustafsson
This is part of a refactor that will split the package manager code so that it's possible to use other package managers in other layers. RP: Fixes to parse/build Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-27rpm: Move package manager to its own dirFredrik Gustafsson
This is part of a refactor that will split the package manager code so that it's possible to use other package managers in other layers. RP: Fixes to parse/build Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-27deb: Move sdk to its own dirFredrik Gustafsson
This is a part of a refactor that will split the package manager code so that it's possible to use other package managers in other layers. Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-27ipk: Move sdk to its own dirFredrik Gustafsson
This is a part of a refactor that will split the package manager code so that it's possible to use other package managers in other layers. Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-27rpm: Move sdk to its own dirFredrik Gustafsson
This is part of a refactor that will split the package manager code so that it's possible to use other package managers in other layers. Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27sdk: Install nativesdk locales for all TCLIBC variantsKhem Raj
install_locales() here is actually operating on nativesdk and only glibc is the default library for nativesdk, since thats what most of desktop/server distros use, therefore bailing out based on TCLIBC is not needed here, since nativesdk-glibc would be required for all non-glibc targetting SDKs as well. Fixes SDK install time error ERROR: OE-core's config sanity checker detected a potential misconfiguration. Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). Following is the list of potential problems / advisories: Your system needs to support the en_US.UTF-8 locale. ERROR: SDK preparation failed Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09meta/lib+scripts: Convert to SPDX license headersRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-11sdk: Fix SDKIMAGE_LINGUAS handlingRichard Weinberger
Currently SDKIMAGE_LINGUAS is broken for any inputs except "all". In the non-"all" case, each enabled language package is installed via pm.install("nativesdk-glibc-binary-localedata-%s.utf-8" % lang) This will throw a python exception since pm.install() expects a list of strings and not a string. Fix the problem by constructing a list. That way it is now also possible to call the package installer just once. Cc: "Burton, Ross" <ross.burton@intel.com> Fixes: 67615e01751b ("rootfs_rpm.bbclass: migrate image creation to dnf") Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-08-15package_manager/sdk: Use filtered copies of the deploy ipk/deb directoriesRichard Purdie
Similar to rpm, use copies of the ipk/deb directories for rootfs construction. This means the image creation code can no longer "see" recipes wich aren't in its dependency chain which is good for a variety of reasons including determinism, incompatible recipe (e.g. systemd/sysvinit) package conflicts and locking performance. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15image: Add locale archive optimisationRichard Purdie
Refactor the locale archive function from the SDK to also make it work during general image creation. This reduces the size of the locales from 900MB to 220MB in core-image-lsb-sdk. The exception handling around subprocess was dropped as the standard subprocess exception printing is better handled than the catchall exception. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18package_manager.py: rework postinst_intercept failuresAlexander Kanavin
Previously a warning was printed regardless of context and nature of the failure, and because it was only a warning, it was mostly ignored. Now, the following is considered when a failure happens: 1) whether we are installing packages into a target image, or populating a SDK with host or target packages. 2) whether the failure was due to qemu not supporting the target machine. Accordingly, warnings, notes, and failures are printed, and postponing to first boot happens if possible. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05sdk.py: run postinst interceptsAlexander Kanavin
Previously this wasn't done, and so any packages installed from populate_sdk would not have the postinsts fully executed (particularly generation of various caches via running nativesdk or target binaries with qemu wasn't working). [YOCTO #12630] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-06sdk: only install locales if we're using glibcRoss Burton
Using glibc-locale to install locales only makes sense if we're using glibc. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-01sdk: generate locale archive and remove packagesRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01sdk: install specified locales into SDKRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-22lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk ↵Richard Purdie
repos don't conflict The repository indexes updated during do_populate_sdk_ext and do_populate_sdk can conflcit. Add the missing lockfile calls for deb/ipk and in the rpm case, ensure different directories are used for the index for the two sdk cases. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-10nativesdk/sdk: Update sdk dummy providersRichard Purdie
When we migrated rpm v5 -> v4, we lost the ability to drop "per file" dependencies from the rpm backend for things like "/bin/bash" and "/usr/bin/env" which meant the sdks were becomming 'bloated'. This restores the functionality using a dummy package, similarly to the way the buildtools perl issue was addressed. It also removes the non-functional old code so as not to confuse people in future. I ran into this problem trying to filter dependencies to only rpms a build directly depends upon and it turns out we have some determinism issues in this area so this is something key to fix. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-06meta/lib/oe/sdk.py: support added for executing pre-target commandsAmarnath Valluri
Added a new POPULATE_SDK_PRE_TARGET_COMMAND variable, which can contain functions need to be executed at pre traget sysroot creation phase. classes/populate_sdk_base.bbclass: Added POPULATE_SDK_PRE_TARGET_COMMAND to sdk command variables list. Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12lib/oe/sdk: Adds get_extra_sdk_info to reuse code in buildhistoryFrancisco Pedraza
This function is going to be used for generating the target and host manifest files packages for eSDK. Added some fixes for buildhistory.bblclass, and docstring for get_extra_sdkinfo at oe.sdk [YOCTO #9038] Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-13rootfs_rpm.bbclass: migrate image creation to dnfAlexander Kanavin
To properly look at this patch, you probably need a side-by-side diff viewing tool. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
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\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-02classes/lib: Complete transition to python3Richard Purdie
This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. 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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29sdk.py: preserve packaging data when SDKIMAGE_FEATURES has "package-management"Denys Dmytriyenko
This is not enabled by default, as there are still limitations and possible issues with opkg (and rpm?) packaging data containing broken symlinks for local indexes: http://cgit.openembedded.org/openembedded-core/commit/?id=c8e0ec2da9ad4ce1c103966906a85f68c15400dd There are other use cases for the packaging data to be available in SDK, since it provides comprehensive info about SDK's contents and in the case of opkg and dpkg is all text-based and can be easily parsed by simple scripts. Introduce new "package-management" flag for SDKIMAGE_FEATURES list (similar to the one already used for IMAGE_FEATURES) that controls presence of the packaging data in resulting SDK, while unifying this behavior across the board for supported pkg managers - rpm, opkg, dpkg. Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-23lib/oe/sdk: Partially revert "sdk.py: fix conflicts of packages"Richard Purdie
OE-Core rev: f2b64f725803ad8be7c2876c531e057a4fe5ca7c (poky 1362986886cc96c8cc11fb60795f729b41770414) unintentionally broke opkg/dpkg multilib support within the SDK by making things not honour self.install_order. This reinstates that code for opkg/dpkg but not rpm where the original problem was. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-20lib/oe/rootfs: Use list_pkgs() instead of list()Mariano Lopez
This patch changes the use list_pkgs() instead of list() from class RpmPkgsList. The change is in two functions, image_list_installed_packages from rootfs.py and sdk_list_installed_packages from sdk.py. With this change the functions calling the functions listed above, must format the output as they required. The formatting can be done using format_pkg_list() from oe.utils. The classes calling the afected functions are changed too with this patch, to keep the same functionality using the new data structure. [YOCTO #7427] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-09sdk.py / OpkgSdk: remove_packaging_data() after installHaris Okanovic
Run remove_packaging_data() on both host and target sysroots to wipe opkg state after install, similar to what RpmSdk does. Use case: Opkg may download local package indexes (I.e. file:// URLs) by sym-linking them into /var/lib/opkg/lists/ instead of copying [1]. This leaves behind broken symlinks under the lists directory when using opkg to build SDK sysroots. The -h option may be set via SDKTAROPTS in some configurations to create symlink-less SDK archives for Windows file systems. Sysroots containing broken symlinks will fail to archive under this configuration. Testing: Verified /var/lib/opkg/ is empty after running populate_sdk() in a Fido based distribution. [1] http://git.yoctoproject.org/cgit/cgit.cgi/opkg/commit/?h=opkg-0.3.x&id=f9022a8520fcde8f1b71424d26a652c218fce685 Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Reviewed-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> Natinst-ReviewBoard-ID: 119065 Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21populate SDK: prepare calling of bb.utils for exceptionsBenjamin Esquivel
bb.utils.remove, bb.utils.movefile and bb.utils.mkdirhier can throw exceptions that need handling and proper error messages more work is required for these methods to handle properly the exceptions that can be raised within the various OS calls they make but this is a start to at least not hide the errors in the requested operations [YOCTO#8213] Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-03sdk.py: fix conflicts of packagesJian Liu
If packages are conveyed to smart to install at the same time, conflicts will not happen. Try to install packages into sdk image at the same time. This patch is not so perfect. For example, IMAGE_INSTALL += "lib32-ncurses" IMAGE_INSTALL += "ncurses-dev" ncurses-dev and lib32-ncurses-dev will have conflicts during packages installation. Signed-off-by: Jian Liu <jian.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23lib/oe/sdk.py: Add SDKIMAGE_INSTALL_COMPLEMENTARY capabilities to DpkgSdkPau Espin Pedrol
Creating an SDK by means of do_populate_sdk, complementary packages (SDKIMAGE_FEATURES = "dev-pkgs dbg-pkgs") are not installed when using the deb packaging system. The reason is that the call to install the complementary packages is missing from the deb backend. This patch fixes that. [YOCTO #7160] (From OE-Core rev: 0bcca69ea97ac51acf290f8f1da1bde715ab51c4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-10sdk.py: fix write target sdk manifest failed based on ipkHongxu Jia
bitbake meta-toolchain ls tmp/deploy/sdk/poky-glibc-x86_64-meta-toolchain-i586-toolchain-1.7.manifest -al ... |-rw-rw-r-- 1 root root 0 Oct 10 15:05 tmp/deploy/sdk/poky-glibc-x86_64- meta-toolchain-i586-toolchain-1.7.manifest ... The manifest is empty, the reason is target's ipk config path is d.getVar('IPKGCONF_TARGET') rather than d.getVar('IPKGCONF_Target') Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-30lib/oe/sdk: Ensure target directory exists before creating the linkRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21rootfs.py, sdk.py: adjust/create the wrappers for creating installed ↵Laurentiu Palcu
packages list Since we created a new PkgsList object that will deal with listing the installed packages in a rootfs, use the new class both for images and SDKs in the wrapper functions. The old list_installed_packages() wrapper listed only the packages inside an image rootfs. It didn't deal with target/host SDK rootfs's. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-14package_manager.py, rootfs.py, sdk.py: add Indexer classLaurentiu Palcu
Because the package-index.bb needs to create package indexes outside do_rootfs environment, move the indexing capability out of PackageManager class to a smaller Indexer class. This commit: * simply moves the indexing functions for ipk/deb with no changes; * rewrites the RPM indexing function so that it can be easily moved out of the PackageManager class; * removes some RPM duplicate code, moves it into a method inside RpmPM class and changes the RpmPM constructor so that the new method is effective; Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11rootfs.py, package_manager.py, sdk.py: Fix building from feeds feature for opkgLaurentiu Palcu
When using opkg as the PM backend, one has the option to provide custom feeds to create the rootfs from. This commit: * fixes this in the refactored code; * moves the custom config creation code to python; * clean up the package-ipk.bbclass; Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2014-02-11lib/oe/sdk.py: support RpmRootfsHongxu Jia
- Implementation RpmSdk class Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2014-02-11lib/oe/sdk.py: add SDK classLaurentiu Palcu
This new file contains the python 'populate sdk' implementation of the old bash populate_sdk_image() function for Opkg and Dpkg. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>