summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* package.bbclass: drop unnecessary and broken packages.remove()Christopher Larson2013-01-211-1/+0
| | | | | | | (From OE-Core rev: 5480371d0473482437ce4350e6593f006101ef40) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Fix shlibs cross package-arch contaminationRichard Purdie2013-01-201-2/+4
| | | | | | | | | | | | | | | I found that if I had two packages architectures built (say core2 and i586), that the shlibs data from i586 was being used in the core2 build. This lead to odd dependency issues if the i586 build was out of date and core2 was being targetted. When loading shlibs files, the last loaded wins so we need to iterate the lists from least to strongest weighting, not the other way around. With this patch applied, the contamination issue is resolved. (From OE-Core rev: acd7b1c2ee9f3ff84c45a723dba5e0bc5f6a100c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: replace AUTOINC directly in PKGVEnrico Scholz2013-01-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b27b438221e16ac3df6ac66d761b77e3bd43db67 introduced a regression when PKGV is modified by the recipe. E.g. when having something like | PV = "1.7.33+gitr${SRCPV}" | PKGV = "1.7.33+gitr${GITPKGV}" | RDEPENDS_${PN}-subpkg += "${PN} (= ${EXTENDPKGV})" | inherit gitpkgv The resulting core package has | Version: 1.7.33+git234+cd01e8c-r11 and because the subpackage has | Depends: vdr (= 1.7.33+git0+cd01e8c18d494150730214f033f84e5282ce7639-r11) image build fails with | * satisfy_dependencies_for: Cannot satisfy the following dependencies ... | * vdr (= 1.7.33+git0+cd01e8c18d494150730214f033f84e5282ce7639-r11) Patch avoids the 'PKGV = "cleanup(${PV})"' operation and replaces AUTOINC directly within PKGV. This might introduce a regression too when 'AUTOINC' is added to PKGV intentionally but impact is small and can be fixed trivially by using another string. (From OE-Core rev: 6e46664085fa49bc204fc944ca23ed6383e2ec51) Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> Cc: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Skip testing "packages" a second time.Robert P. J. Day2013-01-071-1/+1
| | | | | | | | | | | | | | | | | | Since the "packages" variable is already tested a few lines above in the same routine: if len(packages) < 1: bb.debug(1, "No packages to build, skipping do_package") return there is no point testing it again, and the error message doesn't even refer to "packages", anyway. (From OE-Core rev: 371fbacff47828cfff99f1152f9e269e27c474da) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: don't prepend MLPREFIX to LOCALEBASEPNConstantin Musca2013-01-071-1/+1
| | | | | | | | | | | | | - all the recipes that overwrite LOCALEBASEPN must consider also the MLPREFIX - if the LOCALEBASEPN variable is not overwritten then it will have the correct prefix (LOCALEBASEPN ??= "${PN}") (From OE-Core rev: 855d64a3091c5358e2e1a7f4247929515b068708) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib: fix allarch/kernel/module-base multilib issuesConstantin Musca2012-12-311-0/+30
| | | | | | | | | | | | | | | | | | | | | | | - skip the non-packagegroup allarch recipes in multilib_virtclass_handler - extend PROVIDES/RPROVIDES for allarch recipes which are not packagegroups - use variants from MULTILIB_GLOBAL_VARIANTS (lib32 lib64 libx32) to create additional pkgdata files for multilib allarch: ${pkgdatadir}/${variant}-${PN} and ${pkgdatadir}/runtime/${variant}-${pkg} - use variants from MULTILIB_VARIANTS to create additional pkgdata files for multilib kernel/module-base recipes - add a sanity check to determine if the current multilib is in MULTILIB_GLOBAL_VARIANTS [YOCTO #2918] [YOCTO #3440] [YOCTO #3565] [YOCTO #3568] (From OE-Core rev: bc4da2573dfb59ea2fc4af359701818df20f7663) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: prepend MLPREFIX to LOCALEBASEPNConstantin Musca2012-12-111-1/+1
| | | | | | | | | | | | We need to prepend MLPREFIX to LOCALEBASEPN in order to fully enable multilib [YOCTO #3440] (From OE-Core rev: 91fe09a9a8b317d27145efff4201f1138d6a45d4) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: make do_split_packages handle non-existent root directoriesRoss Burton2012-12-111-1/+7
| | | | | | | | | | | | | | | | | | This function has different behaviour if the split directory doesn't exist depending on the recursive argument: non-recursive uses os.listdirs which throws an exception, recursive uses os.walk which doesn't. do_split_packages should silently handle non-existent directories because it's mainly used for plugin directories, which may end up being empty though changing the distro configuration (for example, connman without wifi distro feature). So, add an early exit if the split root doesn't exist. (From OE-Core rev: 937101e3fdd6afd00f6f8a8be411a67110c4ae78) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* prs: use the PRServer to replace the BB_URI_LOCALCOUNT functionalityConstantin Musca2012-12-061-0/+4
| | | | | | | | | | | | | | | | | | | | | - adapt the PRServer to generate an incremental number for every revision set associated with a (PN, PV) - use one incrementing value rather than several - PV becomes 0.1+gitAUTOINC+deadbeefdecafbad_decafbaddeadbeef - if PV contains 'AUTOINC' set PKGV to the same thing with AUTOINC replaced with the "auto PR" value - if the PRServer isn't running replace AUTOINC with 0 (no package feeds, but usual image creation would work) - use the PR table with "AUTOINC-${PV-without-SRCREVs}" as key - modify prexport/primport to address the generated srcrev entries - this patch addresses the following proposal: http://lists.linuxtogo.org/pipermail/bitbake-devel/2012-November/003878.html (From OE-Core rev: b27b438221e16ac3df6ac66d761b77e3bd43db67) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Adapt debugsrc code to workdir layout changesRichard Purdie2012-11-211-3/+3
| | | | | | | | | | | | With the change to WORKDIR layout, splutting PN and PV into two directories, the debugsrc splutting code layout became suboptimal. This changes things to include the information as it was before. Ideally this code would be written to more generically support other layouts buts it not clear that the tools would even support that right now so this is the best immediate fix. (From OE-Core rev: 432cfbb403f0e864d1fad383c2bbb6f9bdb80770) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Hardlink debug source to improve performanceRichard Purdie2012-10-231-1/+1
| | | | | | | | | | When copying the source files needed for the -dbg package, use hardlinks where possible. This saves some disk space and hence helps performance of the builds. (From OE-Core rev: 6775feb9fe935ab01fd9cae2b2d3fce5824a9a72) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Exclude the PKGTRIPLETS variableRichard Purdie2012-10-221-0/+1
| | | | | | | | | Without this, we'd rerun packaging for every machine since this variable contains a machine specific component. (From OE-Core rev: 61131828c59178c923b3d5b5fcacf0dbcba275a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Switch shlibs to pkgdata directory and make package ↵Richard Purdie2012-10-221-9/+16
| | | | | | | | | | | | | | | | | non-machine specific Currently, do_package is machine specific since the shlibs data is installed into each machine specific sysroot. This change moves the shlibs data to the pkgdata structure, at the expense of having to iterate over a set of shlibs directories instead of a single one. It turns out this isn't any particular hardship for the code and as a result, do_package stops being machine specific leading to optimisations for builds that use a common PACKAGE_ARCH. (From OE-Core rev: cc088489d70fb27d460c3dbe35d6ea382123c134) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Recommend virtual-locale-*, don't depend on itRichard Purdie2012-10-181-1/+1
| | | | | | | | | | | | | | | | | | | The virtual-locale-* packages are provided by libc which may or may not have a matching locale for any given recipes's provided locales. Certainly, we shouldn't get a failure if the locale package isn't available. This patch therefore makes the dependency optional rather than required, allowing the locale packages in question to install. This resolves errors like: virtual-locale-eo is needed by bash-locale-eo-4.2-r5.i586 virtual-locale-en+boldquot is needed by bash-locale-en+boldquot-4.2-r5.i586 virtual-locale-en+quot is needed by bash-locale-en+quot-4.2-r5.i586 (From OE-Core rev: 2be67f95abaa7e8655a1ca8f4ffe66b3e099a650) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Fix regression in -dbg packages introduced by ↵Richard Purdie2012-10-031-1/+4
| | | | | | | | | | | | explode_dep_versions change We need to iterate over the dictionary pulling out the values, not take the top level keys. If we don't do this, we end up with dependencies on the values of PACKAGES, not library dependencies. (From OE-Core rev: 7219bca11f554fbe2ed30f1537491987d65e9316) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Update to use corrected bb.utils.explode_dep_versions2 APIRichard Purdie2012-10-021-23/+25
| | | | | | | | | | | | | | | | | The bb.utils.explode_dep_versions function has issues where dependency information can be lost. The API doesn't support maintaining the correct information so this changes to use a new function which correctly handles the data. This patch also fixes various points in the code to ensure that we do not have any duplicates in things that use explode_dep_versions. A new sanity test to test the contents of the R* variables is also added. [Some changes from Mark Hatle <mark.hatle@windriver.com>] (From OE-Core rev: 16a892431d0c0d03f8b561b92909cf2f11af4918) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Rename task to packagegroupPaul Eggleton2012-09-041-1/+1
| | | | | | | | | | | | "Package group" is a much more appropriate name for these than task, since we use the word task to describe units of work executed by BitBake. (From OE-Core rev: 424dcf7046e4ad09dcc664eb1992201195247fcf) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: fix stripping for kernel modulesTomas Frydrych2012-09-021-1/+1
| | | | | | | | | | | | runstrip(path, elftype, d) does bitwise & on the elftype parameter, so it has to be passed an integer. Passing None fails with: TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'. (From OE-Core rev: 67f21c6c698464959c27c7e65ee537ab4c378944) Signed-off-by: Tomas Frydrych <tomas@sleepfive.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package: document do_packages_split argumentsPaul Eggleton2012-08-221-0/+41
| | | | | | | | | | | This function takes quite a number of arguments and can be tricky to use properly; this is not made easier if it is undocumented, so document all of the arguments. (No functional changes, comments only.) (From OE-Core rev: 324fbcc047819b6948d13eda627ec898cb1f1eb8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/classes: Various python whitespace fixesRichard Purdie2012-08-211-37/+37
| | | | | | | | | | | It was pointed out we have a number of weird indentations in the python functions. This patch cleans up 3, 7 and other weird indentations for the core bbclass files. It also fixes some wierd (odd) shell function indentation which my searches picked up. (From OE-Core rev: 8385d6d74624000d68814f4e3266d47bc8885942) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: change RPATHs for cross-canadian binariesLaurentiu Palcu2012-08-171-1/+1
| | | | | | | | | | | | | | | When building the meta-toolchain, the binaries didn't get relocatable RPATHs. They were hardcoded to the default path. Hence, if one had already installed one SDK in the default path and one in another location, the later toolchain's binaries would search and load libraries from the first location, ending in a "Segmentation Fault". [YOCTO #2927] (From OE-Core rev: b40a03c43d5d9d738a9aa5b43b2ecfe74fc95018) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package: don't make locale pkgs depend on PN pkg if not in PACKAGESPaul Eggleton2012-08-061-1/+2
| | | | | | | | | | | If ${PN} is not in PACKAGES then don't add it as an RDEPENDS for each locale package. This fixes the installation of gcc-runtime locale packages, for example. (From OE-Core rev: d36c3235b3022c07f064929f55114f808a7634f6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: change RPATHs for nativesdk packagesLaurentiu Palcu2012-08-021-0/+5
| | | | | | | | | Change binaries RPATHs, to include $ORIGIN, to make them relocatable. (From OE-Core rev: f6362c5248914485fc8bf3c3f0ca6cc962bf753e) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: fix TypeError in runstripMartin Jansa2012-07-311-6/+10
| | | | | | | | | | | | * some packages have .ko files which are not elf, without this change it fails with TypeError, with this change only runstip fails and reports where: ERROR: runstrip: ''arm-oe-linux-gnueabi-strip' '/OE/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/emacs-23.4-r0/package/usr/share/emacs/23.4/etc/tutorials/TUTORIAL.ko'' strip command failed (From OE-Core rev: a834ab8a6d53cae504fa112a89bab93d726539ec) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package: ensure pkgdata is cleaned out firstPaul Eggleton2012-07-291-0/+1
| | | | | | | | | | | | | | If do_package needs to be re-run and packages are removed/renamed as a result, we want the corresponding stale pkgdata files to no longer be present; for that we need to ensure all of the old pkgdata files are cleaned out prior to creating the new ones. This is particularly important now we rely on pkgdata more heavily (for complementary packages, license manifest, etc.). (From OE-Core rev: 5dee47b476a6f715ab02af5e758441a2a934eea3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass/eglibc-locale: Ensure the correct PN is used for locale packagesRichard Purdie2012-07-281-1/+3
| | | | | | (From OE-Core rev: fc4b138948656d482603b80f8c8e86fdbb185df4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package: reduce dbg package dependenciesPaul Eggleton2012-07-281-5/+27
| | | | | | | | | | | | | | | | | | | | | | | Make dbg package dependencies added via DEPCHAIN_POST less aggressive - only add dependencies on dbg packages for shared library dependencies. This avoids dragging in extraneous packages (such as eglibc-dbg forcing bash-dbg to be installed) whilst preserving the ability to easily debug into shared libraries in use by an application by just requesting the installation of the single dbg package for that application. For task recipes however we preserve the previous behaviour, since when you install task-xxx-dbg you expect the dbg packages for every package in the task to be installed. Unfortunately not all of our tasks inherit from task.bbclass so we just use a name match - this should be tidied up later. Fixes [YOCTO #2599]. (From OE-Core rev: 352522d474cb75992d7865545b6fbe4e157a5f99) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/package: do not add self-dependencies to dev/dbg packagesPaul Eggleton2012-07-261-2/+2
| | | | | | | | | | | Avoid adding dependencies to dev and dbg packages on themselves via the DEPCHAIN_* handling code. These don't actually cause any problems, but they do complicate dependency graphs. (From OE-Core rev: ecdf7874470cff24cb23b7fd2723096b15aead31) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Create symlinks for packages with different packaged nameAndrei Gherzan2012-07-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | While generating license.manifest package information is searched in: filename=`ls ${TMPDIR}/pkgdata/*/runtime/${pkg}| head -1` This is ok as long as package name is the same as the package name after packaging. For example dbus is packaged as dbus-1. So, searching ls ${TMPDIR}/pkgdata/*/runtime/dbus-1 will fail because there is no file with this package name. Create a symlink to the pkgdata file in a runtime-reverse directory so that these reverse lookups are possible. Fixes [YOCTO #2638]. (From OE-Core rev: 76ef414b8a017557cf5f3ad7b3ca8a324f7aad29) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Remove a number of unneeded import os/bb callsRichard Purdie2012-07-191-1/+1
| | | | | | | | | | The bb and os modules are always imported so having these extra import calls are a waste of space/execution time. They also set a bad example for people copy and pasting code so clean them up. (From OE-Core rev: 7d674820958be3a7051ea619effe1a6061d9cbe2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert tab indentation in python functions into four-spaceRichard Purdie2012-07-191-1465/+1465
| | | | | | (From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Allow overriding of debugedit starting pathPeter Seebach2012-07-171-1/+1
| | | | | | | | | | | | | | | In the usual case, the computed path used for debugedit to fix up path references for the target filesystem is correct. However, prebuilt binary components, such as prebuilt toolchains, can have debug paths that do not reflect paths within the local build directory. Providing an override lets us continue to use the standard debugedit logic in package.bbclass. (From OE-Core rev: 32b1fde106bf423873a4a56e1111f230494e2d4a) Signed-off-by: Peter Seebach <peter.seebach@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package install failure on systems without /sbin/ldconfigAmy Fong2012-07-171-2/+2
| | | | | | | | | | | | | | | | | | Package install failures due to issues in post install rules. package_do_shlibs only looks for libraries in a directory "lib", this should be modified to the variable baselib. ldconfig_postinst_fragment failure observed on systems without /sbin/ldconfig [ -x /sbin/ldconfig ] && /sbin/ldconfig results in the post install rule returning a failure. Modify to if [ -x /sbin/ldconfig ]; then /sbin/ldconfig; fi (From OE-Core rev: 3f85ab6d0d05a4e34fe73fa343d2b3b942fc69b7) Signed-off-by: Amy Fong <amy.fong@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: enable the use of package_qa_handle_errorSaul Wold2012-07-041-3/+7
| | | | | | | | | | | | | | | This will allow the reporting of these errors as either WARNINGs (default) or ERRORs if installed_vs_shipped is added to the ERROR_QA of the policy file (such as a <distro_name>.conf file. V2: found the code I had intended to send instead of that other junk, was just not watching what I pushed on that one, sorry. (this is edit in no in the actual commit message) (From OE-Core rev: 20d4205a4e408b6a99db392d4df458156113106a) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Allow a package to skip per file dependency generationMark Hatle2012-07-031-0/+3
| | | | | | | | | | | | | Most of the time skipping per file dependency generation is a bad idea, but when building a nativesdk or similar you may be required to pickup host dependencies. These host dependencies can not always be reconciled within the scope of other nativesdk components, so if we skip them we can facilitate this unique situation. (From OE-Core rev: a1ca125de55a8e7cab402e2ba5737a56d4e890c2) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Add missing PKGR, PKGV, PKGE and ALTERNATIVE variables from ↵Richard Purdie2012-07-021-1/+1
| | | | | | | | | | | | | | | PACKAGEVARS These variables all take package name extensions and should be considered in sstate dependency processing. This may also fix some multilib alternatives issues (unconfirmed). [YOCTO #2056] (From OE-Core rev: 64422f7c5da160050a5454817c8fa9d070104b34) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Add warning about FILES containing '//'Richard Purdie2012-05-301-0/+3
| | | | | | | | | | | | '//' in a FILES variable causes hard to track down issues with packaging. This adds a warning and attempts to auto-correct the issue to try and make the problem more user friendly. [YOCTO #2448] (From OE-Core rev: 0e33e314b1d2d3779658696f13a274b20d698667) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "meta: replace os.popen with subprocess.Popen"Richard Purdie2012-05-301-10/+6
| | | | | | | | | This reverts commit e83d8e58a6b107eea87df0ec233a1bc932b2c6e as the conversion is not correct. Its replacing readlines() calls which generate an array with what are effectively strings. There are split("\n") calls missing in many cases so this needs to be reverted until it gets fixed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: replace os.popen with subprocess.PopenRobert Yang2012-05-301-6/+10
| | | | | | | | | | | | | | | | | | | | | | Replace os.popen with subprocess.Popen since the older function would fail (more or less) silently if the executed program cannot be found There are both bb.process.run() and bb.process.Popen() which wraps the subprocess module, use it for simplifying the code. Note: We don't need the "2>/dev/null" or "2>&1" since bb.process.run() can handle it, it will raise exception when error occurs, we should handle the exception ourselves if we want to ignore the error. More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2454] (From OE-Core rev: e83d8e58a6b107eea87df0ec233a1bc932b2c6ea) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: replace os.system with subprocess.callRobert Yang2012-05-301-16/+17
| | | | | | | | | | | | | | | Replace os.system with subprocess.call since the older function would fail (more or less) silently if the executed program cannot be found More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2454] (From OE-Core rev: a07d03cc6f67c88feb9813ae7deb6e4a93552dfe) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-alternatives.bbclass: Refactor the implementationMark Hatle2012-05-301-6/+10
| | | | | | | | | | | | | | | Refactor in order to: * Deprecate the old interfaces, but keep them for compatibility * Provide a new, interface -- capable of working with split packages * Each update-alternative will now set proper "per-file" provides Note: this adds a warning message when the older deprecated behavior is used. The older behavior has been fully tested using oe-core. (From OE-Core rev: 309117d26de6a87b16406a44a0cefcbaaf7b5d7a) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Add additional debugging for dependenciesMark Hatle2012-05-251-2/+5
| | | | | | | | | | | | | | | | | | | | | When trying to understand why a QA wanring such as: ERROR: QA Issue: foo rdepends on bar-dev it is very difficult to figure out where the bar-dev dependency comes from, since many of them are added dynamically. This adds a debug statement that says which dependency adds an rdepends to the system. Also, while doing this work, it was noted that the same dependencies were being scanned for over and over. Instead we shorten the list by only added to the dep list if the dependency was not already there. (From OE-Core rev: 257b9e371143421b78a6991ef5401e564918c164) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* (libc-)package.bbclass: Added MLPREFIX to locale packages.Lianhao Lu2012-05-181-2/+3
| | | | | | | | | Added multilib prefix to the locale related package names/dependencies. (From OE-Core rev: a52f7cf2cc90d918e3250c410995dcc1f3bfd5ee) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Drop dubious use of packages[0] from do_split_packages and ↵Richard Purdie2012-05-121-19/+4
| | | | | | | | | | | | | do_split_locales As the comment says, using packages[0] is rather broken and can be incorrect, as demonstrated by the recent gdk-pixbuf change. Replacing it with PN is a bit more correct and more likely to do what was originally intended by this function. (From OE-Core rev: 5d0144fe6bd1febc2d1e651bbcff891c80f20b88) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Drop EXPORT_FUNCTIONS use against mapping_rename_hookRichard Purdie2012-05-111-3/+1
| | | | | | | | | | | | | | The usage of this function renaming and it being called using bb.build.exec_func() causes needless indirection loops, confusing log files and seems generally pointless. This simplification makes the process much simpler and faster. I can't come up with a good reason why the export_functions functionality is needed for this function. (From OE-Core rev: 74daad03ca29a03b0005f7d2b90a0347d5b583a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Ensure kernel modules get strippedRichard Purdie2012-04-221-0/+8
| | | | | | | | | | Kernel modules are not marked as executable but we do expect to strip them. This patch adds in missing code to ensure we do this. Without this images are getting sigificantly bloated in size. (From OE-Core rev: 00b0a5f2f51bb3f88bbb9ae558c2859e3c1c406c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* "The suite of statements in a function definition executes with a local ↵Andrei Gherzan2012-04-111-1/+4
| | | | | | | | | | | | | | | | namespace that is different from the global namespace. This means that all variables created within a function are local to that function. When the suite finishes, these working variables are discarded." In this way the needs_ldconfig variable in linux_so never gets True in the statements below this function. As global statement is generally discouraged, a return value would be a clean and fast way to solve this issue. [YOCTO #2205] RP: Added logic to ensure the value doesn't get overwritten once set (From OE-Core rev: 6d39af4f85220f20bad09b0fdd3ee0a7ec19c12d) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>--- Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Various typoes fixed, all comments or output strings.Robert P. J. Day2012-03-261-1/+1
| | | | | | | | | Typoes fixed: "enviroment", "editted", "spliting", "scheulder". (From OE-Core rev: 17e981a857a51b0bec08c929e8539d36d83874b6) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* INCOMPATIBLE_LICENSE: support for spdx and pkg licensesElizabeth Flanagan2012-03-251-6/+11
| | | | | | | | | | | | | | | | | | This adds a few things to the incompatible license functionality 1. INCOMPATIBLE_LICENSE was unable to distinguish any variation within LICENSE (e.g. GPLv3 v. GPLv3.0). This now utilizes the SPDXLICENSEMAP of the license indicated as INCOMPATIBLE_LICENSE 2. Given a recipe where the main LICENSE was incompatible but a package of the recipe was compatible, the entire recipe would be excluded. This allows us some finer grained control over what exactly gets excluded. (From OE-Core rev: a8d7246f7b13ef2636c325263c8bfa22552d7a57) Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: do not split debug pkg when no debugsources.listRobert Yang2012-03-141-9/+9
| | | | | | | | | | | | | | | | | We don't have to split the debug pkg if it is null (No debugsources.list since the find-debuginfo.sh would not generate it for the null pkg). Serval pkg's debug pkg is null, and there were a few errors: (53 pkgs had such errors in a core-image-sato build): log.do_package:sort: open failed: debugsources.list: No such file or directory [YOCTO #2076] (From OE-Core rev: f88e3f420b4e95ab5ba4a075df8ed65b817f8b45) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>