Age | Commit message (Collapse) | Author | Files |
|
When using package_qa_handle_error(), we need to check QA_SANE and
give a fatal error if issues were raised. The main insane checks do
this, the anonymous python in insane does not, nor does the code in
package.bbclass. This was likely missed when the function was
introduced to package.bbclass.
The impact is that errors can be shown but don't stop the build
(do_package succeeds), the initial build fails due to the errors
shown but subsequent builds succeed. This is clearly broken.
The solution is to check QA_SANE in places we use the handle_error
function.
[YOCTO #8907]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Creating FILES_${PN}-dbg is tedious and also pretty pointless. We might as well
assume ".debug" is a special directory name and split into -dbg automatically.
This change does so without changing the rest of the splitting logic too much.
It can be disabled for the cases where we really do want manual control of
the -dbg packages (e.g. qt4) with NOAUTOPACKAGEDEBUG = "1".
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fix some spelling mistakes in bbclass files
Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
* there is PN at the beginning, then possibly long list of files and
at the end we don't see which recipe has this issue, add another
line which says which PN and how many files
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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>
|
|
PACKAGEVARS appended on this commit:
LICENSE SECTION
pkg_preinst
pkg_prerm
RREPLACES
GROUPMEMS_PARAM
SYSTEMD_AUTO_ENABLE
[Yocto #7754]
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Currently the license exclusion code removes packages from PACKAGES
pre population of the package directories. This means that the FILES
entries for some packages are not seen and invariably results in
packaging errors.
Instead, remove the packages from PACKAGES post population of the packages
so the usual FILES entries work as expected but the file are not placed
into any packages and no packages containing embargoed licenses are generated.
This avoids errors from gcc-runtime with GPLv3 exclusion like:
ERROR: QA Issue: gcc-runtime: Files/directories were installed but not shipped in any package:
/usr/share
/usr/src
/usr/share/gcc-4.9.2
/usr/share/gcc-4.9.2/python
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. [installed-vs-shipped]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Reverted 7c0fd561bad0250a00cef63e3d787573112a59cf
Created separate group of hardlinks for the files inside
the same package. This should prevent stripped files to be
populated outside of package directories.
This turns out not to be straightforward and has overlap with the
other hardlink handling code in this area. The code is condensed
into a more concise and documented form.
[Original patch from Ed with tweaks from RP]
[YOCTO #7586]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Based on the number of times I've had to explain it over the years it
seems that a lot of new users don't immediately realise what is meant
by "shipped" here (nor should we expect them to) so let's at least
mention packaging and briefly tell the user what they need to do. (I was
going to go into more detail in the message, but there is really more
detail than can be covered succinctly here.)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Changes to SYSTEMD_SERVICE should change the sstate checksum. To make that
happen, it needs to be listed in the list of package specific variables,
therefore add it.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Allow globs in CONFFILES.
This patch changes the way of CONFFILES handling. After this change,
the CONFFILES can take the same form as FILES. That means, we don't
have to list a bunch of files for CONFFILES. It will just be expanded
like the FILES variable.
We don't assume default value for CONFFILES in OE. But distro vendors could
provide a default value for CONFFILES in their distro configuration file
like below.
CONFFILES = "${sysconfdir}"
In this way, files under /etc are treated as configuration files by
default. Of course, setting CONFFILES in recipes take precedence over
the CONFFILES. For example, if the recipe author decides that package A
should only treat files under ${sysconfdir}/default/ as config files,
he/she can write like this.
CONFFILES_A = "${sysconfdir}/default"
[YOCTO #5200]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
PV is the package version as we need it to be during the build. PKGV is the
final version as it ends up in the package, and defaults to PV.
The packager handled builds without PR-server by replacing the AUTOINC string
in PKGV, but when the PR-server is being used, the script replaces the contents
of PKGV with the PV if the PV contains "AUTOINC". Thus the packager overrides
any change to PKGV the recipe might have made.
This breaks classes like gitpkgv that provide a correctly numbered PKGV, the
number as calculated by that class will simply be replaced with a 0-based index
from the PR-server.
This patch makes the packager look at the PKGV version instead of the PV, and
update the PKGV only based on the PKGV contents as set by the recipe.
See also the discussion here:
http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100329.html
From investigating the history of the code and changes in the past year, the
use of "pv" instead of "pkgv" appears to be just an oversight, introduced in:
commit b27b438221e16ac3df6ac66d761b77e3bd43db67 "prs: use the PRServer to replace the BB_URI_LOCALCOUNT functionality"
A later commit 865d001de168915a5796e5c760f96bdd04cebd61 "package/prserv: Merge two similar functions into one"
silently fixed this only for the case without PR-server by using pkgv there.
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
* n is a tuple since this commit:
commit d3aa7668a9f001044d0a0f1ba2de425a36056102
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Mon Jul 7 18:41:23 2014 +0100
Subject package.bbclass: Improve shlibs needed data structure
since then 'n in private_libs' was always false and private libs
were always processed
* this is bad when we have libfoo in private libs, but also some package
providing libfoo, that way we ship own libfoo.so, but together with
runtime dependency on package providing libfoo
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
This allows us to use this function elsewhere in the code.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
A number of settings (DESCRIPTION, SUMMARY, postinst, postrm,
and appends to RDEPENDS) were made only if FILES_foo was not
set for a given package. If you had a modified glibc packaging
setup that was defining FILES_glibc-gconv-somelocale, this would
prevent the automatic append of glibc-gconv as a dependency,
because extra_depends was ignored.
I think the assumption may have been that if FILES_foo was set,
DESCRIPTION_foo and SUMMARY_foo would also be set, but it seems
to me that the right answer is probably to set them if they aren't
already set, and leave them alone if they are.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
When we use ASSUME_SHLIBS,e.g.
ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"
then we end up with errors like below when using shlibs2 (dizzy+)
File: 'package_do_shlibs', lineno: 216, function: package_do_shlibs
0212: dep_pkg = dep_pkg.rsplit("_", 1)
0213: if len(dep_pkg) == 2:
0214: lib_ver = dep_pkg[1]
0215: dep_pkg = dep_pkg[0]
*** 0216: shlib_provider[l][libdir] = (dep_pkg, lib_ver)
0217:
0218: libsearchpath = [d.getVar('libdir', True),
d.getVar('base_libdir', True)]
0219:
0220: for pkg in packages.split():
Exception: KeyError: 'libEGL.so.1'
This is because the entry which is being populated does not exist
so lets create it if its not already there.
Change-Id: I9e292c5439e5d1e01ea48341334507aacc3784ae
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Having these two separate functions handling PR values seems pointless,
and worse, there are impossible code branches mixed within them.
Merge them into one function and tweak comments so at least you
don't have to read both functions to figure out what is going on.
This does restructure the conditionals to try and aid readability.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
dictionary
shlib2 code puts the information about path where a provider
will be found. e.g.
{'/usr/lib/llvm3.3': ('libllvm3.3-llvm-3.3', '3.3')}
This is obtained from new shlib2 pkgdata from
llvm3.3/3.3-r0/pkgdata/shlibs2/libllvm3.3-llvm-3.3.list
However when we search for NEEDED libraries we ignore the
key above which is the path where the provider library is installed
and instead just seach in libdir and base_libdir and hence
libraries which are not in above standard search paths gets
ignored even if they appear in DT_NEEDED sections
and a note is emitted
NOTE: Couldn't find shared library provider for libLLVM-3.3.so, used by
files: ....
IMO this note should actually become an error since if we do
not have all DT_NEEDED libraries in image the system is dysfunctional.
This patch extracts this libpath from key and add it to seach paths
when looing for a provider of a shared library
[YOCTO #6798]
Change-Id: Ie5f08632e37ba8d3439c8aaae33bc68b8996792f
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In case a package is not generated (is empty and does not has allow
empty flag set) the package data regarding reverse runtime dependency
shouldn't be done.
This were causing a false-positive in the meta-fsl-arm layer, when
building mesa, as:
,----[ Error during build of MX53 in meta-fsl-arm ]
| ERROR: The recipe mesa is trying to install files into a shared area
| when those files already exist. Those files and their manifest
| location are:
| /.../build/build/tmp/sysroots/imx53qsb/pkgdata/runtime-reverse/libopenvg-dev
| Matched in manifest-imx53qsb-amd-gpu-x11-bin-mx51.packagedata
| Please verify which recipe should provide the above files.
`----
Fixes [YOCTO: #6795]
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This quite coincidentally invalidates the sstate for do_package which
is needed due to the correction of oe.utils.multiprocess_exec().
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
It doesn't really make sense to run the remapping code on these
variables. If specific renaming is needed, it should be applied
manually. This means that the debian RPROVIDES of the original package
name can be preserved. There was also a bug report about this on the
OE-Core mailing list recently where someone else ran into this problem
too.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
For package groups, use the original package names and don't use the
remapped (e.g. debian) naming.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We may as well use the common function for this rather than
duplicating the code.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We need to scan binaries as well as libraries for dependencies.
Also ensure if its not an object file (as found by otool), we handle
this case.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Currently, the darwin shlibs detection is done by parsing the .la file
dependency fields. This is very old code and is incomplete in some
cases so convert to using otool -l and otool -L to correctly load
the rpath and dependency information.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
When the code was rewritten we forgot to strip the pkg that is present
in the pkgdest path. This was fixed in the linux version of the code
but not the darwin one, this matches the fix.
Without this, the provider paths are broken.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
do_package() calls package_name_hook so that e.g. debian-style renaming through
debian.bbclass can happen. If there is no class providing a package_name_hook
then this causes "WARNING: Function package_name_hook doesn't exist" every time
do_package() is executed.
Silence this warning by providing an empty package_name_hook in package.bbclass.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Currently, given a list of rdepends its near impossible to figure out
which ones are potentially invalid and which might be an RPROVIDES of a
package.
This problem is simple to solve, we can write lookup data into the
pkgdata. This patch does that, accounting for the fact that multiple
packages can RPROVIDE the same thing (particularly with locales). Its
done with symlinks so the performance overhead is minimal.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Change the do_package shlibs code to account for RPATHS. This means that
for library dependency purposes, only libraries in system paths or in
any declared RPATH will be seen. This is important to resolve problems
people have been having where similarly named libraries in "private"
paths were conflicting, e.g. with gstreamer.
For now this code assumes the default search path is libdir and
base_libdir and places ASSUME_SHLIBS in libdir so they are searched by
default.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Instead of having a .list file and a .ver file, place the version
information into the .list file in a ":" delimited string.
Also place the path to the library here, this can then be used to
evaluate RPATHs in the shlib dependency code.
Since the disk format has changed, the easiest way to avoid build
failures in the same TMPDIR is to change the shlibs directory to
shlibs2. sstate dependency code with ensure everything rebuilds.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In order to do more advanced processing of the shared libraries, we need
to know where a given library is located on disk so we can know whether
its a system path or a private directory for example.
This patch adds this information into the 'sonames' data structure.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Improve the shlibs 'needed' data structure to include the file and
any rpath information. This allows various cleanups to the data structure
and moves us closer to being able to resolve shlibs providers issues
based on path in due course.
This commit doesn't change any stored data, just cleans up internal data
structures (for example dropping the needed_from dict).
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Changes to CONFFILES should change the sstate checksum. To make that happen,
it needs to be listed in the list of package specific variables, therefore
add it.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The reasons this task was introduced are lost in the mists of time. It
allowed for the a single "package_write" task instead of spelling out
the explicit package backends, however in all but one case we do that
anyway.
As such as might as well give in and delete the task, converting that
single reference into explicit dependencies.
This gives bitbake a bit less work to to when processing the runqueue
since there are less tasks (but more dependencies in some cases).
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
So far, when do_split_packages is passed a non-existing folder, it will return nothing.
While building Mesa with PACKAGECONFIG="egl gles" for qemux86, do_package threw a nice exception on a line reading "pkgs += do_split_packages":
"Exception: TypeError: 'NoneType' object is not iterable"
I think a function should always return something, and in this specific case, returning an empty list should be right.
This patch simply fixes the return statement to do just that.
Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Currently, if you bitbake xxxx, it will restore the package_write_,
packagedata, populate_sysroot *and* the package data from sstate.
We generally care about the packagedata and the actual packages, we
no longer need/care about the do_package data itself unless something
is going to repackage.
By relaxing this constraint (and relying on the packagedata target), we
can save things being installed from sstate and hence speedup build times.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Marks original commit message and variable documentation state that stripping and splitting are independent of eachother, but package.bbclass ANDs the two INHIBIT flags to see which files can be stripped and/or split.
Original behaviour:
INHIBIT_PACKAGE_STRIP: no strip, no debug split
INHIBIT_PACAKGE_DEBUG_SPLIT: no strip, no debug split
Behaviour after this patch:
INHIBIT_PACKAGE_STRIP: no strip, no debug split
INHIBIT_PACKAGE_DEBUG_SPLIT: strip, no split
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* when log.do_package shows some unexpected dependency, people usually
need to grep package directory to find which binary was creating that
dependency, show it directly in the debug output
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* split PRIVATE_LIBS and don't use find(), so that libfoo cannot be
found in PRIVATE_LIBS = "libfoobar"
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Two variables are searched for value of additional package metadata:
* PACKAGE_ADD_METADATA_<PKGTYPE>
* PACKAGE_ADD_METADATA
First found variable with defined value wins.
<PKGTYPE> is a parameter of getter and expected to be a distinct name
of specific package type. For example: 'DEB' or 'RPM'.
Variable can contain multiple [one-line] metadata fields, separated by
literal sequence '\n'. Separator can be redefined through variable flag
'separator'. Getter returns found value with separator replaced with
newline character.
As side-effect, searched variables acquired flags 'type' (equals to
'list') and 'separator'.
Signed-off-by: Leonid Borisenko <ive.found@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
* move read_shlib_providers before registering package as provider
and show warning when different package tries to provide something
already provided.
[YOCTO #4628]
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* prepare for reading shlibs providers only from dependency tree of
current recipe
[YOCTO #4628]
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Since ca86603607a69a17cc5540d69de0e242b33382d3 we are now calling stat() on
all the pkgfiles[] during emit_pkgdata(). If symlink snapping has removed
some of the files then we will blow up trying to stat a path that no longer
exists. Fix that by ensuring that pkgfiles[] is updated when we process the
list of library renames.
Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
do_split_packages() is commonly used to split out plugin/module packages
dynamically within recipes. If it doesn't set SUMMARY for each of these
packages then they get a generic SUMMARY from the recipe, which isn't
particularly useful; so add a parameter to set this and default it from
the current description parameter (it ought to have been the other way
around, but the description parameter is what we currently have in use
by all recipes that use this function.)
Fixes [YOCTO #5406].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
|
When originally developed, it was thought a task may have more than one associated
sstate archive. The way the code has grown that idea is now not possible or needed.
We can therefore assume one sstate archive per task and drop the crazy name
mapping code. Simpler is better in this case.
The downside is that various sstate archives will change name so this forces a cache
rebuild. Given the other sstate changes going in at this time, this isn't really
a bad thing as things would rebuild anyway.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
These are important parts of the version for every package, so we should
include them in PKGDATA just as we include PV/PR/PKGV/PKGR.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We were using "du -sk" to collect the total size of all files in each
package for writing out to PKGSIZE in each pkgdata file; however this
reports the total space used on disk not the total size of all files,
which means it is dependent on the block size and filesystem being used
for TMPDIR on the build host. Instead, take the total of the size
reported by lstat() for each packaged file, which we are already
collecting for FILES_INFO in any case.
Note: this changes PKGSIZE to be reported in bytes instead of kilobytes
since this is what lstat reports, but this is really what we should be
storing anyway so that we have the precision if we need it.
Fixes [YOCTO #5334]
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The FILES_INFO entry in each pkgdata file stores the list of files for
each package. Make the following improvements to how this is stored:
* Store paths as they would be seen on the target rather than
erroneously including the full path to PKGDEST (which is specific to
the build host the package was built on)
* For simplicity when loading the data, store complete paths for each
entry instead of trying to break off the first part and use it as the
dict key
* Record sizes for each file (as needed by Toaster)
* Serialise the value explicitly using json rather than just passing it
through str().
Fixes [YOCTO #5443].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fix false error report when a file that has a single quote by escaping
the single quote. Some packages might install files with quotes, such
as music files and other types, that will cause the problem.
Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|