summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/sdk.py
Commit message (Collapse)AuthorAgeFilesLines
* sdk: streamline locale removalRoss Burton2018-04-051-1/+1
| | | | | | | | | | | | | | | For some reason dnf is aborting with the fairly useless "failed to read RPMDB" error during SDK creation. Luckily as we're just deleting locale packages we can pass False to remove() to use RPM directly, which doesn't crash. (From OE-Core rev: cb118806841e585ec6ca820360329ae7d122c0af) (From OE-Core rev: 3ebd1a7db39ee5e7ea68e2642a14a03d9b48d8fa) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: generate locale archive and remove packagesRoss Burton2018-04-051-2/+54
| | | | | | | | | | | | | | (From OE-Core rev: c6f1010a47df33b40320aa5784181b659a3254d7) (From OE-Core rev: a043ec4fabad26861af83fdc54838544bb8bb3a8) (From OE-Core rev: 3819f8848e4b7b61a76925586e00b586916ea21a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup for getVar True bit] Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: only install locales if we're using glibcRoss Burton2018-04-051-0/+4
| | | | | | | | | | | | | | | | Using glibc-locale to install locales only makes sense if we're using glibc. (From OE-Core rev: 8fc80734053645fa893694dfe33ddaee99aa9a1a) (From OE-Core rev: 1ca33a798f5edf4bb1e695a79a46088dd23b6858) (From OE-Core rev: 75918061572c0943aa4ea24df07b4ec1ae1aa09f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup for the getVar True bit] Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: install specified locales into SDKRoss Burton2018-04-051-0/+16
| | | | | | | | | | | | | | (From OE-Core rev: 9b1c3dbe79f67d3b46e0f90a73bce6c61f094a50) (From OE-Core rev: f223f90d07965eef8ddbb047abd1f75da99b1c08) (From OE-Core rev: 691925df192b4b1671ba9d19cbc3602654826451) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup for getVar True bit] Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk ↵Richard Purdie2018-04-051-3/+10
| | | | | | | | | | | | | | | repos don't conflict (From OE-Core rev: c9c0927bb6e71253cbdd5b6b780dca829526e1d8) (From OE-Core rev: a18942b0b3b848ccfa4bc50c56a565c279da9d74) (From OE-Core rev: 94e21cf21f8d8adad352ef2f94d4f75e36cd843a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [Fixup do to merge conflicts] Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Complete transition to python3Richard Purdie2016-06-021-3/+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: Convert to use python3 octal syntaxRichard Purdie2016-06-021-2/+2
| | | | | | | | 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>
* sdk.py: preserve packaging data when SDKIMAGE_FEATURES has "package-management"Denys Dmytriyenko2016-04-291-4/+14
| | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 9ab934e4aecb759c922049245888dcd2a8c55477) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sdk: Partially revert "sdk.py: fix conflicts of packages"Richard Purdie2016-01-241-22/+8
| | | | | | | | | | | | 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. (From OE-Core rev: 98b585120137a3db07ed742a8f18223883ad6dc5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs: Use list_pkgs() instead of list()Mariano Lopez2016-01-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 983ea373362514e5888bd1d7d9c4f136c94b00f2) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk.py / OpkgSdk: remove_packaging_data() after installHaris Okanovic2015-12-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (From OE-Core rev: c8e0ec2da9ad4ce1c103966906a85f68c15400dd) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate SDK: prepare calling of bb.utils for exceptionsBenjamin Esquivel2015-10-211-24/+52
| | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 2e81dbdce6f92908c4d4c980af032516581178de) Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk.py: fix conflicts of packagesJian Liu2015-09-041-12/+33
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: f2b64f725803ad8be7c2876c531e057a4fe5ca7c) Signed-off-by: Jian Liu <jian.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sdk.py: Add SDKIMAGE_INSTALL_COMPLEMENTARY capabilities to DpkgSdkPau Espin Pedrol2015-01-231-0/+2
| | | | | | | | | | | | | | | | | 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) (From OE-Core rev: 6755935e58b0414870adb7c7abab1aa331596209) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk.py: fix write target sdk manifest failed based on ipkHongxu Jia2014-10-101-1/+1
| | | | | | | | | | | | | | | | | 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') (From OE-Core rev: 81b3cc448f040dcb4c2f2b05983231ac53270663) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sdk: Ensure target directory exists before creating the linkRichard Purdie2014-04-301-0/+1
| | | | | | (From OE-Core rev: d8096433c27643f39eeb29d34e20328a39981fd6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py, sdk.py: adjust/create the wrappers for creating installed ↵Laurentiu Palcu2014-03-211-0/+18
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: 8fc18e67504db5b6df3fdd239c6187a71af52656) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py, rootfs.py, sdk.py: add Indexer classLaurentiu Palcu2014-02-141-43/+5
| | | | | | | | | | | | | | | | | | | 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; (From OE-Core rev: d339d6f48f81330e94162f333aad76f3c65d6bfd) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py, package_manager.py, sdk.py: Fix building from feeds feature for opkgLaurentiu Palcu2014-02-111-1/+3
| | | | | | | | | | | | | | | 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; (From OE-Core rev: 19c538f57c8fa7c566e88a6dbe13ea4826d4f26c) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sdk.py: support RpmRootfsHongxu Jia2014-02-111-2/+136
| | | | | | | | | | - Implementation RpmSdk class (From OE-Core rev: 417b27ce5c1ea2fe2057caa898291cce0c043359) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sdk.py: add SDK classLaurentiu Palcu2014-02-111-0/+209
This new file contains the python 'populate sdk' implementation of the old bash populate_sdk_image() function for Opkg and Dpkg. (From OE-Core rev: 6247efaba592db924e6466c39aef441f0e07c62a) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>