aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
AgeCommit message (Collapse)Author
2012-08-22classes/package: document do_packages_split argumentsPaul Eggleton
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.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-21meta/classes: Various python whitespace fixesRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17package.bbclass: change RPATHs for cross-canadian binariesLaurentiu Palcu
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] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06classes/package: don't make locale pkgs depend on PN pkg if not in PACKAGESPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02package.bbclass: change RPATHs for nativesdk packagesLaurentiu Palcu
Change binaries RPATHs, to include $ORIGIN, to make them relocatable. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-31package.bbclass: fix TypeError in runstripMartin Jansa
* 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 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-29classes/package: ensure pkgdata is cleaned out firstPaul Eggleton
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.). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-27package.bbclass/eglibc-locale: Ensure the correct PN is used for locale packagesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-27classes/package: reduce dbg package dependenciesPaul Eggleton
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-26classes/package: do not add self-dependencies to dev/dbg packagesPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26package.bbclass: Create symlinks for packages with different packaged nameAndrei Gherzan
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]. 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>
2012-07-19Remove a number of unneeded import os/bb callsRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19Convert tab indentation in python functions into four-spaceRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-16package.bbclass: Allow overriding of debugedit starting pathPeter Seebach
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. Signed-off-by: Peter Seebach <peter.seebach@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-16package install failure on systems without /sbin/ldconfigAmy Fong
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 Signed-off-by: Amy Fong <amy.fong@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-04package.bbclass: enable the use of package_qa_handle_errorSaul Wold
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) Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-03package.bbclass: Allow a package to skip per file dependency generationMark Hatle
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. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-07-02package.bbclass: Add missing PKGR, PKGV, PKGE and ALTERNATIVE variables from ↵Richard Purdie
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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30package.bbclass: Add warning about FILES containing '//'Richard Purdie
'//' 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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30Revert "meta: replace os.popen with subprocess.Popen"Richard Purdie
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.
2012-05-30meta: replace os.popen with subprocess.PopenRobert Yang
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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30meta: replace os.system with subprocess.callRobert Yang
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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30update-alternatives.bbclass: Refactor the implementationMark Hatle
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. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-05-25package.bbclass: Add additional debugging for dependenciesMark Hatle
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. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-05-18(libc-)package.bbclass: Added MLPREFIX to locale packages.Lianhao Lu
Added multilib prefix to the locale related package names/dependencies. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-12package.bbclass: Drop dubious use of packages[0] from do_split_packages and ↵Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11package.bbclass: Drop EXPORT_FUNCTIONS use against mapping_rename_hookRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-22package.bbclass: Ensure kernel modules get strippedRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11"The suite of statements in a function definition executes with a local ↵Andrei Gherzan
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 Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>--- Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-26Various typoes fixed, all comments or output strings.Robert P. J. Day
Typoes fixed: "enviroment", "editted", "spliting", "scheulder". Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-25INCOMPATIBLE_LICENSE: support for spdx and pkg licensesElizabeth Flanagan
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. Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-14package.bbclass: do not split debug pkg when no debugsources.listRobert Yang
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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-13package.bbclass: sort dynamically generated packagesAndreas Oberritter
* do_split_packages and package_do_split_locales dynamically add packages in order of appearance of os.walk() or os.listdir(). This order varies between multiple build hosts (and probably also between successive builds). * Sort the list of dynamically added packages, to get a consistent and reproducible order. * This reduces the diffs in buildhistory and improves comparability between builds. Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
2012-03-11package.bbclass: Drop python depends from rpmdepsRichard Purdie
This python depends is added by rpmdeps every time it finds a python script. This is not necessary since we handle this in otherways. It also breaks things like nativesdk since the dependency is not renamed. The easiest solution is just to ignore this dependency. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)Richard Purdie
sed \ -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data.expand *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie
Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta/classes: Convert to use appendVar and appendVarFlagsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24package.bbclass: Add a sanity check to the debugsrcdir removal codeRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24package.bbclass: set package size into pkgdata for hob2's useShane Wang
Write the size of a package into its pkgdata for hob2 to get the size and show on the UI for image making. Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24package.bbclass: Remove empty directories created as part of srcdebug handlingRichard Purdie
We can create directories like /usr/src/debug as part of the debug file manipulations. If these are going to end up empty, remove them to avoid QA warnings like: WARNING: For recipe task-core-x11, the following files/directories were installed but not shipped in any package: WARNING: /usr WARNING: /usr/src WARNING: /usr/src/debug WARNING: For recipe task-core-console, the following files/directories were installed but not shipped in any package: WARNING: /usr WARNING: /usr/src WARNING: /usr/src/debug Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-10package.bbclass: Optimise the per file rpm handlingRichard Purdie
Currently a process was being forked off for each individual file this class wanted to inspect with rpmdeps. This converts it to use rpmdeps-oecore which allows batch processing of these dependencies. For do_package for perl, this reduced the time by about 1 minute (33%). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-01package bbclass: allow per package PRIVATE_LIBSKoen Kooi
If a recipe packages multiple versions of shlib (e.g. powervr drivers) we only want the shlib code to pickup $PN, not $PN-foo subpackages. This keeps backward compatibility with the global PRIVATE_LIBS usage if no per package PRIVATE_LIBS are set for a given package. In other words: this doesn't break the firefox recipe. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-01classes: replace 'Poky' with 'OE-core'Koen Kooi
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
2012-01-17classes/package: remove out-of-date notice referring to the OE bugtrackerPaul Eggleton
OpenEmbedded doesn't officially use a bug tracker anymore, and a message asking the user to fix the metadata could be applied to almost any error that occurs, so just remove the whole message. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2012-01-17package.bbclass: quote pathname given to objdumpEnrico Scholz
Packaging will fail with executable files containing spaces in their names. Patch quotes the parameter passed to 'objdump'. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
2012-01-11package.bbclass: per recipe PRSERV_HOST supportLianhao Lu
[YOCTO #1126] Added per recipe PRSERV_HOST PRSERV_PORT support. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2012-01-11meta/PRService: Added export/import fuctions.Lianhao Lu
[YOCTO #1556] - Modified meta/class/package.bbclass and prserv.bbclass according to the change in PR service by adding PACKAGE_ARCH into the query tuple. - Added prexport.bbclass, primport.bbclass to export/import AUTOPR values from/to PRService. - Move PR service related common code to lib/oe/prservice.py. - Supported reading the AUTOPR values from the exported .inc file instead of reading it from remote PR service. - Created a new script bitbake-prserv-tool to export/import the AUTOPR values from/to the PR service. Typical usage scenario of the export/import is: 1. bitbake-prserv-tool export <file> to export the AUTOPR values from the current PR service into an exported .inc file. 2. Others may use that exported .inc file(to be included in the local.conf) to lockdown and reproduce the same AUTOPR when generating package feeds. 3. Others may "bitbake-prserv-tool import <file>" to import the AUTOPR values into their own PR service and the AUTOPR values will be incremented from there. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-12-23package.bbclass: Adjust RPM call to use dynamic location for magic filesMark Hatle
The magic file could be installed somewhere else if the system native prefix settings are changed. Adjust the packaging files to compensate for this. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08package.bbclass: Adding license collectionElizabeth Flanagan
emite_package_data needs to have LICENSE, as pkgdata is as an audit of licenses collected during do_populate_license. Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
2011-11-26getVar/setVar cleanupsRichard Purdie
Complete the bb.data.getVar/setVar replacements with accesses directly to the data store object. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>