aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/package_manager.py
AgeCommit message (Collapse)Author
2015-11-23package_manager.py: fix RPM_PREFER_ELF_ARCH for mipsrbt/elfRobert Yang
We can install 64 bit pkg to 32 bit pkg, so the previous checking is incorrect, it should not only check mips64 or mips64el, the "mips" should work, and 64bit ELF can also use mips as TUNE_ARCH, and there are other mips varieties, so only check whether TUNE_ARCH starts with mips or not. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-10-24package_manager: fail if signed feeds are enabled for ipk or dpkgMarkus Lehtonen
Signed package feeds are not yet implemented for these package formats. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-10-24package_manager: support GPG_PATH variableMarkus Lehtonen
If defined, use GPG_PATH as the gpg home directory when signing package feeds. This setting is only used by package_manager if package feed singning has been enabled, i.e. PACKAGE_FEED_SIGN="1". Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-10-03package_manager.py: sort output of OpkgPkgsList().listAndre McCurdy
Without explicit sorting, the output generated by OpkgPkgsList().list follows the order of packages in /var/lib/opkg/status, which appears to be "random". Add sorting to make OpkgPkgsList().list behaviour consistent with that of RpmPkgsList().list. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01lib/oe/package_manager: Handle empty package list in opkg caseRichard Purdie
If you build buildtools-tarball with opkg as the package manager, it passes in an empty target packages list and fails. This allows the code to cope with an empty package list (in sync with the rpm backend). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-24package_manager.py: make rpm install mutilib pkgs corectlyRobert Yang
When configure multilib, "bitbake <image_bb> -c populate_sdk" should install all arch toolchains (for example, 32 and 64bit), but rpm not handle the multilib requires correctly, for example: lib32-packagegroup-core-standalone-sdk-target requires lib32-libc6, rpm may pull in libc6 rather than lib32-libc6, there are the similar issue when: IMAGE_INSTALL_append += "lib32-packagegroup-foo foo" Use bitbake to expand the RDEPENDS will fix the problem since bitbake knows mlprefix and handle it well, but rpm doesn't. This patch only affects when: IMAGE_INSTALL = "lib32-foo foo" Doesn't affect: IMAGE_INSTALL = "lib32-foo1 lib32-foo2" Or: IMAGE_INSTALL = "foo1 foo2" [YOCTO #8089] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09package_manager.py: search provides when not found by pkgnameRobert Yang
Fixed when: PACKAGE_CLASSES = "package_rpm" IMAGE_INSTALL_append = " perl-module-warnings-register" $ bitbake core-image-minimal [snip] ERROR: perl-module-warnings-register not found in the base feeds [snip] And it works well when PACKAGE_CLASSES = "package_ipk" since perl provides perl-module-warnings-register, the "smart install perl-module-warnings-register" also works well, this was because _search_pkg_name_in_feeds() only searched pkg name, but no provides, this patch fixes the problem. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-03lib/oe/package_manager: Include PACKAGE_FEED_PREFIX instead of hardcode pathsLeonardo Sandoval
Instead of hardcode paths (/rpm/, /ipk/, /deb/), use a user-defined prefix when creating the URI feeds. URIs now will have the following syntax: PACKAGE_FEED_URIS_1/PACKAGE_FEED_PREFIX PACKAGE_FEED_URIS_2/PACKAGE_FEED_PREFIX . where PACKAGE_FEED_URIS = "PACKAGE_FEED_URIS_1 PACKAGE_FEED_URIS_2 ...." [YOCTO #5407] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-01package_manager: support for signed RPM package feedsMarkus Lehtonen
This change makes it possible to create GPG signed RPM package feeds - i.e. package feed with GPG signed metadata (repodata). All deployed RPM repositories will be signed and the GPG public key is copied to the rpm deployment directory. In order to enable the new feature one needs to define four variables in bitbake configuration. 1. 'PACKAGE_FEED_SIGN = "1"' enabling the feature 2. 'PACKAGE_FEED_GPG_NAME = "<key_id>"' defining the GPG key to use for signing 3. 'PACKAGE_FEED_GPG_PASSPHRASE_FILE = "<path_to_file>"' pointing to a file containing the passphrase for the secret signing key 4. 'PACKAGE_FEED_GPG_PUBKEY = "<path_to_pubkey>"' pointing to the corresponding public key (in "armor" format) The user may define "GPG_BIN" in the bitbake configuration in order to specify a specific the gpg binary/wrapper to use for signing. [YOCTO #8134] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-01package_rpm: support signing of rpm packagesMarkus Lehtonen
This patch adds a new bbclass for generating rpm packages that are signed with a user defined key. The packages are signed as part of the "package_write_rpm" task. In order to enable the feature you need to 1. 'INHERIT += " sign_rpm"' in bitbake config (e.g. local or distro) 2. Create a file that contains the passphrase to your gpg secret key 3. 'RPM_GPG_PASSPHRASE_FILE = "<path_to_file>" in bitbake config, pointing to the passphrase file created in 2. 4. Define GPG key name to use by either defining 'RPM_GPG_NAME = "<key_id>" in bitbake config OR by defining %_gpg_name <key_id> in your ~/.oerpmmacros file 5. 'RPM_GPG_PUBKEY = "<path_to_pubkey>" in bitbake config pointing to the public key (in "armor" format) The user may optionally define "GPG_BIN" variable in the bitbake configuration in order to specify a specific gpg binary/wrapper to use. The sign_rpm.bbclass implements a simple scenario of locally signing the packages. It could be replaced by a more advanced class that would utilize a separate signing server for signing the packages, for example. [YOCTO #8134] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-01opkg: upgrade to v0.3.0Alejandro del Castillo
Changes required: - Rename opkg-cl to opkg - Add libarchive dependency - Drop backport patches - Drop obsolete directory options - Add patch to handle empty index files Based on initial work by Paul Barker. Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> CC: Paul Barker <paul@paulbarker.me.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-29Empty image: package list splitting and iterationAlex Franco
A few short fixes to splitting/iteration done over package lists in license.bbclass, package_manager.py and rootfs.py. [YOCTO #7664] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-14lib/oe/package_manager: fix opkg feed generationJoshua Lock
The insert_feed_uris() method of OpkgPM was creating an initial entry in the feeds list which pointed to the root of the ipk directory, however the on-device package manager can't consume this feed resulting in runtime errors - therefore we remove the code to generate that initial feed uri. Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-20lib/oe/package_manager: Use log-level warning instead of quietRichard Purdie
quiet means that no warnings are shown on the console and really is too quiet for our needs. This is more verbose but that is better than too little and does aid debugging things when they go wrong. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
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 *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-19lib/oe/package_manager: avoid traceback with no packagesPaul Eggleton
If you were using deb packaging, had buildhistory enabled and produced an SDK that contained no packages in one of the sysroots (such as with uninative-tarball) then the do_populate_sdk was failing with a python traceback because there were no fields to split in the output line. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-13package_manager: RpmPM: Fix scriptlet for rpm 4Jean-Benoit MARTIN
Path of rpm post install script is different between rpm 4 and 5 Signed-off-by: Jean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-02package_manager: call createrepo with --dbpath pointing inside WORKDIREd Bartosh
Rpm database in staging area is used only by createrepo. createrepo fails with the error "rpmdb: BDB0060 PANIC: fatal region error detected" if rpm database is broken during previous run of createrepo. Made createrepo to create rpm db in $WORKDIR/rpmdb/ from scratch for every build and architecture. This should potentially fix the failure as every run of createrepo will be using separate db. [YOCTO #6571] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-24package_deb: DpkgIndexer use apt-ftparchive that needs a valid configAndreas Oberritter
Since we have support of log checking in deb/ipk [1] rootfs generation in non Debian-based hosts fails because apt-ftparchive generates a Warning when not find /etc/apt/apt.conf.d/ (available in Debian-based hosts). package_manager.py: DpkgPMIndexer add support for generate and export apt configuration. [1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=86aec93902af2e2d7d73ca9a643707fcca45055c Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20package_manager: Create variable for install_dir_nameSaul Wold
This patch creates a variable for the install_dir name so it can be something other than /install, also by doing this we can correctly clean up the empty directories (/install/tmp) during the clean-up phase. The new default is /oe_install so as to not conflict with other possible packages that might use /install to place files. [YOCTO #7353] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-21lib/oe/package_manager: Performance tweak in regex usageRichard Purdie
Profiling a core-image-sato-sdk rootfs, we're spending over 40s compiling the same regex over and over again, roughly around 5 million times. This is suboptimal, fix for a 40s improvement on a 18.5minute task execution time. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17package_manager.py: use 'purge' instead of 'remove' in case of debChen Qi
We need to use 'purge' instead of 'remove' for debian package backend when removing packages at rootfs time. This is because that 'remove' command for 'dpkg' and 'apt-get' does not remove configuration files. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17lib/oe/package_manager: support exclusion from complementary glob process by ↵Paul Eggleton
regex Sometimes you do not want certain packages to be installed when installing complementary packages, e.g. when using dev-pkgs in IMAGE_FEATURES you may not want to install all packages from a particular multilib. This introduces a new PACKAGE_EXCLUDE_COMPLEMENTARY variable to allow specifying regexes to match packages to exclude. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-14oe-pkgdata-util: improve command-line usagePaul Eggleton
* Use argparse instead of optparse for standardised help output, options and a much cleaner code structure * Look up pkgdata directory automatically so the user doesn't have to specify it * Use standard logging NOTE: this does mean a slight change in syntax - if you do want to specify the pkgdata directory (usually only necessary if you're calling it from within the build process) you need to use the parameter -p (or --pkgdata-dir) and specify this before the command, not after it. Examples: oe-pkgdata-util find-path /sbin/mke2fs oe-pkgdata-util lookup-recipe libelf1 oe-pkgdata-util read-value PKGSIZE libc6 oe-pkgdata-util -p /home/user/oe/build/tmp/sysroots/qemux86-64/pkgdata read-value PKGSIZE libc6 Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-02-03package_manager.py: fix rootfs failure with multilib enabledChen Qi
With the current code, if we use debian package backend and enable multilib support, the do_rootfs process would always fail with error messages like below. E: Unable to locate package packagegroup-core-boot This patch fixes the above problem. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05package_manager.py: fix arguments to string formatRoss Burton
Multiple arguments to string formats need to be in a tuple. Reported by Lorenz <lqb.list@gmail.com>. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-03package_manager.py: check the result of create_indexHongxu Jia
While invoking create_index failed, there was no error output and didn't break the build until the package installation. ... |ERROR: run-postinsts not found in the base feeds (qemux86 i586 x86 noarch any all). ... The reason is we used multiprocessing to execute create_index, and did not check its invoking result. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-09package_manager: DpkgPM fix populate_sdkAníbal Limón
DpkgPM change all_arch_list variable set from PACKAGE_ARCHS to passed archs variable because is different when is executed from rootfs.py and sdk.py. Credits to: Ricardo Ribalda <ricardo.ribalda@gmail.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-04package_manager: Fix BAD_RECOMMENDATIONS for opkgPaul Barker
In package_manager.py, when using opkg as the packager, the command 'opkg <args> info <pkg>' is called to get information about each pkg in BAD_RECOMMENDATIONS in a format that can be written to the status file. The 'Status: ...' line is modified and all other lines are passed through. Changing the verbosity level argument for this command will change what it written into the status file. Crucially, with the default verbosity level, no blank lines are being printed by the opkg command and so no blank lines are being written to the status file to separate each package entry. The package parsing code in opkg expects package entries in the status file to be separated by at least one blank line. If no blank line is seen, the next package entry is interpreted as a continuation of the last package entry, but the new values overwrite the old values. So with the default verbosity level, a blank line follows some package entries and these are parsed. The others are dropped due to the lack of blank lines. As the verbosity increases, more debugging messages add blank lines and more packages are parsed. The solution to ensure that this works correctly regardless of the verbosity level is simply add a blank line after the output of 'opkg info' is written to the status file, ensuring that the next package is separated from the current package. [YOCTO #6816] Signed-off-by: Paul Barker <paul@paulbarker.me.uk> Cc: Chris Carr <chris.carr@ge.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-04multilib.bbclass/package_manager.py: fix <multilib>-meta-toolchain build failureHongxu Jia
There is a failure to build lib32-meta-toolchain: ... |ERROR: lib32-packagegroup-core-standalone-sdk-target not found in the base feeds (qemux86_64 x86 noarch any all). ... In package_manager.py, the variable 'DEFAULTTUNE_virtclass-multilib-lib32' is used to process multilib image/toolchain. But for the build of lib32- meta-toolchain, the value of 'DEFAULTTUNE_virtclass-multilib-lib32' is deleted. In 'bitbake lib32-meta-toolchain -e', we got: ... |# $DEFAULTTUNE_virtclass-multilib-lib32 [2 operations] |# set? /home/jiahongxu/yocto/build-20141010-yocto/conf/local.conf:237 |# "x86" |# del data_smart.py:406 [finalize] |# "" |# pre-expansion value: |# "None" ... The commit 899d45b90061eb3cf3e71029072eee42cd80930c in oe-core deleted it at DataSmart.finalize ... Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Tue May 31 23:52:50 2011 +0100 bitbake/data_smart: Change overrides behaviour to remove expanded variables from the datastore ... We add an internal variable 'DEFAULTTUNE_ML_<multilib>', assign it with the value of 'DEFAULTTUNE_virtclass-multilib-lib32' before deleting. For rpm backend in package_manager.py, we use DEFAULTTUNE_virtclass-multilib -lib32 first, if it is not available, and try to use DEFAULTTUNE_ML_<multilib> [YOCTO #6842] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-10-24python-smartpm: Add checking for "rpm-ignoresize" optionChong Lu
The do_rootfs takes a very long time when build host has mounted many NFS devices. syscall lstat() was being called on every filesystem mounted on the build host during building. The reason for the lstat() is that rpm is verifying that enough free disk space is available to do the install. However, since the install is into the target rootfs it should not matter how much free space there is in the host mounts. Add checking for "rpm-ignoresize", by it, smart can make whether RPM skip checking for diskspace when install a rpm package. Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-09-30deb_packaging: Added support for multilibAnibal Limon
The Package Manager implementation for deb didn't take a look about multilib enabled variants. Changes are made for generate apt.conf, sources.list and debian repo index Release and Packages files. [YOCTO #1502] Signed-off-by: Anibal Limon <anibal.ezau.limon.belmares@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10package_manager.py: use RPM_PREFER_ELF_ARCHRobert Yang
Use RPM_PREFER_ELF_ARCH to instead of RPM_PREFER_COLOR as rpm upstream suggested, and use "4" to instead of "3" since it is a bit mask (not enumeration), so we need "4" here. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-10package_manager: RpmPkgsList: determine rpm versionKévin THIERRY
Do not set the rpm_version to 5 if it is not provided, instead determine the real rpm version. (From OE-Core rev: 48beaee2e5b2b4ae35c596c19f8a38e0ff4427e9) Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org> 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>
2014-09-02package_manager: Add rpm v4 supportRichard Purdie
Currently the package manager code only supports rpm v5. To be useful outside of OE or with OE layers using v4, it makes sense to add in rpm v4 support. This takes a patch from "Bartosh, Eduard" <eduard.bartosh@intel.com> and enhances it to also include versions of the workarounds from poky-eurogiciel to allow rpm v4 usage with the class for image construction. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-31package_manager.py: enable smart non-interactive modeEd Bartosh
Added --quiet option to smart command line. Without this option smart 1.4.1 turns into interactive mode, i.e. start asking questions and expecting answers. Internally within smart, this changes the default UI to one which just prints to stderr, the naming of the parameter is a little odd but does what we need. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23lib/oe/utils: Add utils function for multiprocess executionRichard Purdie
Our usage of multitprocessing is problematic. In particular, there is a bug in python 2.7 multiprocessing where signals are not handled until command completion instead of immediately. This factors the multiprocess code into a function which is enhanced with a workaround to ensure immediate signal handling and also better SIGINT handling which should happen in the parent, not the children to ensure clean exits. The workaround for the signals is being added to the core bb.utils function so it can benefit all users. package_manager is then converted to use the new code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-11oe.package_manager: fix use of PACKAGE_EXCLUDE for dpkgChristopher Larson
It was iterating over the variable character-by-character rather than word-by-word. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-02package_manager.py: set preferred ABI for rpmRobert Yang
When using the RPM packaging backend to generate a rootfs there needs to be a way to configure the preferred ABI to resolve ELF file conflicts. Currently RPM resolves ELF file conflicts with the last-installed wins. Using SMART it's difficult to know what the last installed will be. There are three specific policies that can be selected: 1: ELF32 wins 2: ELF64 wins 3: ELF64 N32 wins (mips64 or mips64el only) Another option "0" is uncontrollable, which means that if two are being installed at once Elf64 is preferred, but if they're being installed in two different transactions, last in wins, so we don't document it. Add RPM_PREFER_COLOR to let the user config the preferred ABI. [YOCTO #4073] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-07-03lib/oe/package_manager.py: Fix _pkg_translate_smart_to_oe functionMark Hatle
File: '/home/mhatle/git/oss/oe-core/meta/lib/oe/package_manager.py', lineno: 278, function: _pkg_translate_smart_to_oe 0274: 0275: if found == 1 and fixed_arch == fixed_cmp_arch: 0276: break 0277: #bb.note('%s, %s -> %s, %s' % (pkg, arch, new_pkg, new_arch)) *** 0278: return new_pkg, new_arch 0279: 0280: def _list_pkg_deps(self): 0281: cmd = [bb.utils.which(os.getenv('PATH'), "rpmresolve"), 0282: "-t", self.image_rpmlib] Exception: UnboundLocalError: local variable 'new_arch' referenced before assignment Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25lib/oe/package_manager.py: Add processing for alternative SDK_OSMark Hatle
For the meta-mingw layer, we need to process alternative SDK_OS, since this is not a Linux based OS. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-08package_manager: Fix NoneType Object on do_populate_sdkRicardo Ribalda Delgado
PACKAGE_EXCLUDE can be not defined or empty, leading to a build error. File: '/var/lib/jenkins/jobs/qt5022-cesium/workspace/repo/yocto/meta/lib/oe/package_manager.py', lineno: 1649, function: _create_configs 1645: "Pin-Priority: %d\n\n" % (arch, priority)) 1646: 1647: priority += 5 1648: *** 1649: for pkg in self.d.getVar('PACKAGE_EXCLUDE', True).split(): 1650: prefs_file.write( 1651: "Package: %s\n" 1652: "Pin: release *\n" 1653: "Pin-Priority: -1\n\n" % pkg) Exception: AttributeError: 'NoneType' object has no attribute 'split' ERROR: Function failed: do_populate_sdk ERROR: Logfile of failure stored in: /var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/bobcat_64-poky-linux/meta-toolchain/1.0-r7/temp/log.do_populate_sdk.21363 NOTE: recipe meta-toolchain-1.0-r7: task do_populate_sdk: Failed Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-05-08package_manager: Fix Argument list too longRicardo Ribalda Delgado
Function buildhistory_list_installed_image fails with error "Argument list too long". This patch uses a temporal file to pass the package list to opkg-query-helper.py File: '/var/lib/jenkins/jobs/qt5022-cesium/workspace/repo/yocto/meta/lib/oe/package_manager.py', lineno: 421, function: list 0417: try: 0418: output = subprocess.check_output("echo -e '%s' | %s" % 0419: (output, opkg_query_cmd), 0420: stderr=subprocess.STDOUT, *** 0421: shell=True) 0422: except subprocess.CalledProcessError as e: 0423: bb.fatal("Cannot compute packages dependencies. Command '%s' " 0424: "returned %d:\n%s" % (e.cmd, e.returncode, e.output)) 0425: Exception: OSError: [Errno 7] Argument list too long ERROR: Function failed: buildhistory_list_installed_image ERROR: Logfile of failure stored in: /var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/qt5022-poky-linux/qimage-dev/1.0-r0/temp/log.do_rootfs.16747 NOTE: recipe qimage-dev-1.0-r0: task do_rootfs: Failed ERROR: Task 7 (/var/lib/jenkins/jobs/qt5022-cesium/workspace/repo/yocto/../qtec/meta-qt5022/recipes-core/images/qimage-dev.bb, do_rootfs) failed with exit code '1' NOTE: Tasks Summary: Attempted 4999 tasks of which 30 didn't need to be rerun and 1 failed. NOTE: Writing buildhistory Auto packing the repository for optimum performance. Summary: 1 task failed: /var/lib/jenkins/jobs/qt5022-cesium/workspace/repo/yocto/../qtec/meta-qt5022/recipes-core/images/qimage-dev.bb, do_rootfs Summary: There were 74 WARNING messages shown. Summary: There were 2 ERROR messages shown, returning a non-zero exit code. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-03-28package_manager.py: leave the __db.00* files in placeLaurentiu Palcu
Do not delete the __db.00* files in the PackageManager class. Leave this operation up to the client classes. One side effect of this deletion was the following message appearing in the output of the next rpm command executed: rpmdb: BDB1540 configured environment flags incompatible with existing environment We might also gain some time here by not deleting/creating those files very often. [YOCTO #6049] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-26apt/package_mamager: Ensure WORKDIR is used for lists directoryRichard Purdie
The native sysroot should not be used as a store for the lists files since multiple images running at once would conflict over this. Instead redirect this to WORKDIR. This means some extra directories need to be created. Also create apt.conf.d to silence some warnings. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-26package_manager: Fix apt-ftparchive index creation problemsRichard Purdie
a) There were missing parameters to the release and package commands (".") b) The commands need to be executed as one block since they build upon each other Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-26package_manager: Ensure we don't process directories twiceRichard Purdie
Processing directories twice is both pointless and introduces a race condition. When building the list, ensure duplicates (like "all" and "noarch") are handled correctly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21package_manager.py: create separate class for installed packages listingLaurentiu Palcu
This commit creates a new class that has the only purpose to generate various listings of installed packages in the rootfs. Basically, the methods involved in listing the installed packages, that were part of each backend PM class implementation, were moved to this new class. This change avoids instantiating a new PM object just to get the list of installed packages in a certain rootfs. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-19package_manager: Use apt-ftparchive for deb packagesRicardo Ribalda Delgado
Use apt-ftparchive to create a Release file compatible with SecureApt. apt-ftparchive is also a more efficient replacement of dpkg-scanpackages: root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat _64# time PSEUDO_UNLOAD=1 apt-ftparchive packages . >/tmp/kkk real 0m26.873s user 0m20.968s sys 0m1.212s root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat _64# time PSEUDO_UNLOAD=1 dpkg-scanpackages . >/tmp/kkk dpkg-scanpackages: info: Wrote 6022 entries to output Packages file. real 0m59.721s user 0m16.668s sys 0m11.164s apt-ftparchive is not compatible with libpseudo. The calls to ftw() returns the path in absolute format instead of relative. This produces wrong Packages and Release files. ie: MD5Sum: d20227a958f6870137ce0e41b7b84307 1453 /home/ricardo/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/all/Release This is why it is called with PSEUDO_UNLOAD. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-07do_rootfs: Added PACKAGE_FEED_URIS functionalityDavid Nyström
Adding a common interface to add predefined package manager channels to prebuilt rootfs:es. Adding PACKAGE_FEED_URIS = "http://myre.po/repo/, will assume repo directories named (rpm,ipk,deb) as subdirectories and statically add them to the rootfs, using the same PKG_ARCHs as the build which produced the images. Tested with RPM, IPK and DEB. deb feed functionality seem broken, is anyone using this ? Signed-off-by: David Nyström <david.c.nystrom@gmail.com> Signed-off-by: David Nyström <david.nystrom@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>