summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/package_manager.py
AgeCommit message (Collapse)Author
2020-07-27package_manager: Move to package_manager/__init__.pyFredrik 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. (From OE-Core rev: 66ccc7a228bf73df0a4dd846bf2c8e99eaa79580) Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-04apt: update to 1.8.2.1Alexander Kanavin
I took the opportunity to rewrite the recipe from scratch; there was just too much baggage in it. (From OE-Core rev: f058272de9cba188d96940c8c921cf31727fe4d1) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-09lib/oe/package_manager: update default rpm config %_prefer_colorChangqing Li
* %_prefer_color is used by rpm to determine which color's ELF file is preferred to be installed. Here are file colors: 0 is unknown or other 1 is Elf32 2 is Elf64 4 is MIPS64 n32 (this color is added by oe-core's patch) if default value set to 7, all colors are preferred color, always be last-in-wins. For this scenario, when we have 64bits python3 installed first, then install 32bits python3 later, 64bits python3 will be overwrited, and sys.path will point to /usr/lib, not /usr/lib64, this may cause some python3 modules not work. so fixed by remove setting of default value 7, and use default value 2 of rpm * other distro like fedora also use the default %_prefer_color 2 (From OE-Core rev: 56fa74497393a10f751d01c600c1936761e00294) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-02lib/oe/package_manager: don't try to rm /var/lib/opkgJan Luebbe
As opkglibdir starts with a /, os.path.join will ignore self.target_rootfs, leading to an attempt to remove /var/lib/opkg. This only fails if it exists on the host, explaining why this remained undiscovered for long. (From OE-Core rev: fc974977cea389f54e7fc7de7b1c8fd3d8bafe58) Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-02lib/oe/package_manager: avoid installing provided packages via aptJan Luebbe
If there already is a package providing (and conflicting against) packages what should be installed, apt will try remove the conflicting package (target-sdk-provides-dummy) and any that depend on it (like apt and dpkg). This usually fails because of the protection of essential packages. In that case, no -dev/-dbg packages are installed to the SDK. Avoid this problem by checking which packages are already provided and removing them from the list to be installed. Also sort the list to make it easier to read when debugging. (From OE-Core rev: 3ffb339dd55f8ca7c952fd3390608510f772e19f) Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-02lib/oe/package_manager: collect provided package names when using debsJan Luebbe
This is needed for a later change to avoid installing packages which are already provided by an installed package. (From OE-Core rev: ad72dfaaa2caf2c39d033dc1682f0bbbbe45dbbd) Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-02lib/oe/package_manager: fix handling of last packageJan Luebbe
In commit 7d214b34e11dc57316ed5c1c7747c4601286f6d2, only the code in the for loop was modified to store the pkgarch value. The code used if there was no empty line at the end was not modified. Instead of fixing the duplicated code, remove it and just make sure that a final empty line is processed. (From OE-Core rev: a7b93c695b23d015607b179d98526b9b14c03d45) Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-02lib/oe/package_manager: make sure to not remove packages in apt installJan Luebbe
apt install can decide to remove already installed packages if there are conflicts. Avoid this by explicitly specifying --no-remove. This will then cause a "E: Packages need to be removed but remove is disabled." message. (From OE-Core rev: 9605a488b55042add012e9aeef13ab3f4e70e6e5) Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-22lib/oe/package_manager: Improve locale-archive reproducibilityAlex Kiernan
The generation of locale-archive depends on the order of the input files. Fix the order by sorting the file list. (From OE-Core rev: 3f781ebd9dfbee143907190c6db5b86d501c3e63) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-19classes, conf, lib: Add support for powerpc64leKhem Raj
LE is default for modern powerpc64, power8+ PowerPC64 Little Endian Linux ABI specifies Power8 as the minimum ISA. The basic ABI can run on earlier versions of the 64 bit PowerPC ISA, but it was helpful to define a new, minimum instruction set for Linux distribution releases during the switch to Little Endian. (From OE-Core rev: b9c73fb6d1afb3367d871a3d6bf7d0d6a53968a9) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-10lib/oe/package_manager.py: put the sdk_provides_dummy_target upfrontAlexander Kanavin
Otherwise, the package utilizing this architecure does not get properly prioritized by rpm/dnf. This isn't seen single-lib builds (as the architecture ends up upfront anyway), but is triggered in multulib where the architecture may end up in the middle of the list due to multilib expansion/trimming duplicates. (From OE-Core rev: a807d54655d7377ef8ac49abd5ab428303831663) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-10meta/lib/oe/package_manager.py: Enable sha256 checksums in opkg indexerHaris Okanovic
Pass `--checksum md5` and `--checksum sha256` to opkg-make-index. Sha256 checksum enables more reliable install-time validation of IPKs. This is particularly useful when installing from signed feeds -- I.e. feeds using signed Packages index files that deliver otherwise unsigned IPKs. Such feeds rely on hash validation of enclosed IPKs to thwart tampering. After download, opkg verifies IPK's checksum against the (signed) Packages index file. Weak hashes like md5 are prone to collision and therefore tampering. The md5 checksum is purely for backward compatibility. Sha256 validation was recently added to opkg. Newer builds of opkg will use it. Older builds still look for an md5 checksum. Md5 is deprecated and should be removed once old build are phased out. Testing: I ran `bitbake package-index` after building a few IPKs and verified MD5Sum and SHA256sum attributes are present in Packages. Using opkg-utils 0.4.0. Performance Impact: It takes about 40 seconds to cleanly re-index 8000 IPKs on an Intel Xeon E5-1620 machine. This was previously about 20 seconds. NOTE: It's recommended to delete all Packages* files after applying this patch. Otherwise, some IPKs won't have sha256. (From OE-Core rev: e462f47489f35902b6972f9837d9adfa542fc796) Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-31IMAGE_LINGUAS_COMPLEMENTARY: auto-add language packages other than localesAndreas Müller
This change allows layers adding packages other than locales automatically to images based on languages selected in IMAGE_LINGUAS. E.g if a layer has recipes creating packages as: | ${PN}-foo-en / ${PN}-foo-de / ${PN}-foo-it / .. it would set | IMAGE_LINGUAS_COMPLEMENTARY_append = " *-foo-%s" in its layer.conf to enable auto-adding. (From OE-Core rev: 3a9e9585aeb67234901b2f842113dbe20c3801b3) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23lib/oe/package_manager: Use with to control file handle lifetimeOla x Nilsson
(From OE-Core rev: e3e86d6683e305865c9fd171c6081aec037d9870) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-18package_manager: Ensure the base-feed directory existsAlistair Francis
Ensure that the /etc/opkg directory exists before we try to create a file there. (From OE-Core rev: 30ff50223cd0b79fd3b8aa393ea1e621282773ac) Signed-off-by: Alistair Francis <alistair.francis@wdc.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. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-25lib/oe/package_manager.py: turn nativesdk postinst warnings into notesAlexander Kanavin
The warnings deal with two specific cases of failure: 1) unable to execute nativesdk postinsts for mingw SDKs because they need to be run under wine 2) unable to execute target postinsts when there is no qemu usermode support for the target Neither of these should be a big problem as mingw issue was never found to problematic, and target postinsts deal with things that are needed at runtime and not at build time which is the purpose of SDKs. The specific reason to do this is to reduce the amount of warnings shown by the Yocto autobuilder, to zero eventually. (From OE-Core rev: cbc32fcd9b52e750600cce9dd84b33e3ce612eae) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-08OpkgPM: use --add-ignore-recommends to process BAD_RECOMMENDATIONSAlejandro del Castillo
Currently, BAD_RECOMMENDATIONS on the opkg backed relies on editing the opkg status file (it sets BAD_RECOMMENDATIONS pkg want state to deinstalled and pinned). This is brittle, and not consistent across the different solver backends. Use new --add-ignore-recommends flag instead. (From OE-Core rev: 0d11e813ba9b4e8de9e6e5099ff85f5d914243bc) Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-06package_manager.py: Use data.tar.xz for ipkg tooAngus Lees
Commit b95b6ba1a2959e2294a8848fa35f20163388eb06 changed package_ipk.bbclass to xz when building packages. This updates OpkgDpkgPM.extract() accordingly. (From OE-Core rev: c09a22c421a57701f6b943eb50b9bae1545e5b39) Signed-off-by: Angus Lees <gus@inodes.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-26lib/oe/package_manager: turn postinst_intercept warnings into failures for ↵Alexander Kanavin
nativesdk The few cases where they failed should be now all fixed. The only allowed exception is when building mingw32 SDKs, as there is currently no support for running postinst_intercepts through wine. (From OE-Core rev: 3dd2fea51110950ec3d8c444f599ff855b4b936c) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-16meta: Fix Deprecated warnings from regexsRichard Purdie
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>
2019-01-14rpm: produce sane amount of logging when creating a rootfsAlexander Kanavin
Previously there was lots of irrelevant noise in the logs, because we also wanted to be able to debug postinst issues easily. I have adjusted the logging levels so that postinst info is still written to the logs, but other things are not. [YOCTO #13119] (From OE-Core rev: ffb7b8f70937a7d95814c1a99527d5ea7cbf7cee) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-22package_manager.py: fix the message used to catch failing postinsts from dnfAlexander Kanavin
Latest dnf versions have tweaked it. (From OE-Core rev: 477db7cf4a6a0d06554c9d1539a01fed7c5cb389) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16lib/oe/package_manager: Avoid race problems when calling list_pkgs()Richard Purdie
list_pkgs() for rpm calls RpmPM() which would try and create a copy of the package feed. This can be called for example from buildhistory whilst some other task may be working on an SDK or image construction, causing the package feed to disappear part way through an operation. Avoid the need to copy the package index just to list the installed packages, avoiding the race. (From OE-Core rev: d05fa49e06034913e22c223803c98cb265e2ae58) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14locale: Allow usage of cross-localedef for ARCAlexey Brodkin
With this it's possible to build locale data for ARC and not do it instead on the first boot. (From OE-Core rev: f13c303491dc8850126ea14baedc7b63b7b5ecf4) Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-28package_manager.py: correct the deploydir when packagefeed-stability inheritedMingli Yu
After create_packages_dir added in below commit: 85e72e1 package_manager: Filter to only rpms we depend upon When add below line into conf/local.conf INHERIT += "packagefeed-stability" There comes below error when do_rootfs Exception: FileExistsError: [Errno 17] File exists: '/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm' -> '/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm' def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencies): [snip] bb.utils.remove(subrepo_dir, recurse=True) [snip] In create_packages_dir function, there is a logic as bb.utils.remove(subrepo_dir, recurse=True) to clean subrepo_dir which is actually as example is /$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm. But currently when inherit packagefeed-stability class, the deploydir should be /$Prj/tmp/deploy/rpm-prediff, not the default /$Prj/tmp/deploy/rpm. If use /$Prj/tmp/deploy/rpm, then result in the logic as below: os.link("/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm", "/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm") Update to the actual deploydir to guarantee the logic as below: os.link("/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm", "/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm/i586/initscripts-1.0-r155.i586.rpm") (From OE-Core rev: 3b17052611e640fb3db5d03c06ab87185a12be58) Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-18package_manager: handle remove() with no packagesRoss Burton
If remove() is called with an empty package list, ensure we do nothing instead of calling the underlying package manager with an invalid command line. [ YOCTO #12900 ] (From OE-Core rev: 715ec20c433cb4ed5fde938c33a42b2a296e4e56) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-18package_manager: implement PACKAGE_EXCLUDE for opkgRoss Burton
opkg has supported the --add-exclude option to install since 0.3.0, so use it to implement support for PACKAGE_EXCLUDE. (From OE-Core rev: 6cc99d48c57cb22104980d0d758540e06cb7b80d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-21package_manager: use normalized path when doing the filtered copyMax Krummenacher
The linking/copying of the package files failes if the deploy dir is set in a non normalized way e.g. like this DEPLOY_DIR = "${TOPDIR}/../deploy" Then the simple string replacement which is used to calculated the link destination from the link source fails, as the link source is normalized but the deploydir prefix is not. Normalizing deploydir fixes this. (From OE-Core rev: e0ebfaa92bbfd3158b48e28dfb6435890c73bef3) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-05package_manager.py: add noarch to buildarch_compatKai Kang
It fails to run rpmbuild to build a noarch package on target when it contains 'BuildArch: noarch' in the spec file: | error: No compatible architectures found for build Add 'noarch' to buildarch_compat in configure file rpmrc to fix it. (From OE-Core rev: 2bdddb458bcc779d595e972f60a719aeb1c1b6d5) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-04lib/oe/package_manager: turn postinst failure warnings into bitbake failuresAlexander Kanavin
Sumo release provides a transition period so that deferrals to first boot via 'exit 1' can be converted to pkg_postinst_ontarget(). For the next release however, postinst script failures should be treated as such. [YOCTO #12607] (From OE-Core rev: 42acb0ebde4e88bcdf34a541b700f19d8607abb0) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-16oe.package_manager: support loading intercepts from multiple pathsChristopher Larson
- if POSTINST_INTERCEPTS is set, use the listed intercept files, or - if POSTINST_INTERCEPTS_PATH is set, load from the listed paths, or - if POSTINST_INTERCEPTS_DIR is set, load from it (for compatibility), or - load from ${COREBASE}/meta/postinst-intercepts (From OE-Core rev: 9ba2f2b1df277b2b881f68166d9cd1c19db66e23) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15package_manager: Add definitions for riscv machinesRichard Purdie
Add definitions to the locale table for riscv architecture. (From OE-Core rev: 624f6fd50da764cde71eb24e40742a48fa65d13c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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. (From OE-Core rev: c7c5f4065c102fde4e11d138fb0b6e25bffe0379) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15package_manager: Remove rpm specific pieces of create_packages_dir()Richard Purdie
This function is generic, tweak the variable names and move out the rpm specific directory name to make it truly generic and reusable for deb/ipk. (From OE-Core rev: dba876639b1fb8ea3ccb182c91e19966c4052115) 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. (From OE-Core rev: 8ffd93bdb09b0a4a84b27dafcd684c6abba392ed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-24package/package_manager: multiprocess_exec -> multiprocess_launchRichard Purdie
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>
2018-07-02postinst-intercepts: do not execute any variant of delay_to_first_bootJoe Slater
As of commit 2c5c6e3ff we create multilib variants of intercept hooks but we did not account for delay_to_first_boot variants. This was covered up until commit a335e7867, but will now cause an error. (From OE-Core rev: 77f7c75481dceec36b7373f277c3bac811de9ef2) Signed-off-by: Joe Slater <joe.slater@windriver.com> 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. (From OE-Core rev: a335e78672b1e1ae3ea6427f6a805218e513bb52) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-29package_manager.py: get rid of ROOTFS_RPM_DEBUG in RpmPM()Alexander Kanavin
This was undocumented, and it's better to just always enable full debug output, as this allows immediate generation of logs with full diagnostics when things go not as expected. Also, change the output of dnf from note to debug level; this does not affect what is written to log file, but does reduce the verbosity of bitbake -v. (From OE-Core rev: 9128fd1396729a71b4832a597cf070c2be922d63) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-22package_manager: expand the removal list for RPMRoss Burton
If package management is disabled we remove the state and configuration for the package manager after the rootfs has been populated. This list wasn't complete and the DNF/RPM configuration files were left behind. As we've added files to the list (and not just directories), expand the backup/restore package management state code to handle this. (From OE-Core rev: c8a6422457b4d29e6afd1e193b8b921287472137) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05package_manager.py: do not hardcode the task name when referring to log filesAlexander Kanavin
This can be do_rootfs or do_populate_sdk, or anything else. (From OE-Core rev: e2e05a327e51339d45b53e0276c287ab314e3385) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05package_manager.py: move intercept running logic from rootfs class to ↵Alexander Kanavin
PackageManager class This allows running the intercepts when creating SDKs, which previously wasn't possible, as SDK code does not use the rootfs class, and calls into PackageManager methods directly. (From OE-Core rev: f830388c5e9125f385a42acd7365d1235967b57c) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05package_manager.py: move postinst_intercept dir initialization from RootFS ↵Alexander Kanavin
to PackageManager class This will allow handling postinst_intercepts when populating SDKs (which use PackageManager class directly, and do not utilize RootFS class). (From OE-Core rev: 9454fd328040fd58c981d028a74fcf181bde8e89) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05package_manager.py: move target_rootfs property to common ancestor classAlexander Kanavin
This will be useful when also moving postinst_intercept handling to package manager class from rootfs class. (From OE-Core rev: a4cd69bdd5b9dfa1125887f4d9038d41996e39c7) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05package_manager.py: Skip gpgcheck while using dnf on targetManjukumar Matha
By default, RPM_SIGN_PACKAGES is not defined. Add gpgcheck=0 to oe-remote-repo.repo file, otherwise dnf will complain during install operation on target Note, RPM_SIGN_PACKAGES is set only when you inherit sign_rpm explicitly (From OE-Core rev: 002a71eaa7606828c399972d8fd35e19e7b71929) Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-20package-index: index also subdirectories when using rpmAlexander Kanavin
Previously only the top-level index was created, which did not work if PACKAGE_FEED_ARCHS whitelisting (or explicitly listing architectures in dnf repo files by hand) was in use: https://lists.yoctoproject.org/pipermail/yocto/2018-March/040327.html https://bugzilla.yoctoproject.org/show_bug.cgi?id=12419 [YOCTO #12419] (From OE-Core rev: f2a568ddb22f38114fdbc1d389c7556386ebb1fa) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-20package_manager: format pydoc comments properlyRoss Burton
(From OE-Core rev: b2770ec717d2b3cfc475c0cf7fa372fdb2f691a9) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-15meta/lib/oe/package_manager.py: warn about failing scriptlets for all ↵Alexander Kanavin
package types Previously this was done only for rpm packages; now also ipk/deb scriptlet failures are reported. In the future this will become a hard error, but it can't yet happen due to the legacy 'exit 1' way of deferring scriptlet execution to first boot which needs a deprecation period. (From OE-Core rev: a36671faf6e0b7623185b0e22814a786d5444592) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-08package_manager.py: Explicit complementary failNiko Mauno
When running bitbake -c populate_sdk <image_name>, it is expected that packages matching SDKIMAGE_INSTALL_COMPLEMENTARY name mask (unless declared in PACKAGE_EXCLUDE_COMPLEMENTARY) are installed to resulting SDK. Underlying mechanism issues a package manager install call for set of complementary packages. However the mechanism doesn't seem to inform the user all too obviously in case the package manager command behind install_complementary() method fails -- and since it is combined with attempt_only=True option, user might end up wondering why several *-dev, *-dbg packages are missing from resulting SDK. Improve associated install() method behaviour in affected OpkgPM and DpkgPM classes so that a problematic state of affairs becomes directly obvious for bitbake user, resulting in shell output like: WARNING: someimage-1.0-r0 do_populate_sdk: Unable to install packages. Command '...' returned 1: Collected errors: * Solver encountered 1 problem(s): * Problem 1/1: * - package somepkg-dev-1.0-r0.x86 requires somepkg = 1.0-r0, but none of the providers can be installed * * Solution 1: * - allow deinstallation of someotherpkg-1.1-r1.x86 * - do not ask to install a package providing somepkg-dev * Solution 2: * - do not ask to install a package providing somepkg-dev (From OE-Core rev: 2502bd591c37bf532d02dc6b37fc1e8b5224fb0a) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>