Commit Graph

127 Commits

Author SHA1 Message Date
Andreas Oberritter 470995c3c6 package_deb.bbclass: Avoid writing empty custom fields
Avoids parser errors if PACKAGE_ADD_METADATA_DEB is set to an
empty value.

(From OE-Core rev: f0959c0908dfb386d29f13fcd3e57b2b004c6c14)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-29 11:17:23 +01:00
Andreas Oberritter a428745d15 package_deb.bbclass: Fix multi-line package descriptions
In deb control files, each line of a long description starts with
a single space. Empty lines are represented by a single space
followed by a single full stop character.

(From OE-Core rev: f66278f471c0bf9421ce2c55a56a144a0f9332bf)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-29 11:17:23 +01:00
Amarnath Valluri f377eaa011 package_deb.bbclass: Ignore file paths in RPROVIDES
Unlike rpm, debian packaging does not allow file paths in 'Provides:' field.
When 'usrmerge' distro feature enabled bash/busybox packages adds '/bin/sh' to
it's RPROVIDES to satisfy build dependencies, this entry should be filtered out.

(From OE-Core rev: a36165ea8bf8c7a061a0173076c83ae6806d65b6)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:40 -08:00
Richard Purdie bfd0a39bdf classes: Drop now unneeded update_data calls
Now that the datastore works dynamically we don't need the update_data calls
so we can just remove them. They're not actually done anything at all for
a while.

(From OE-Core rev: 8de0c5d3bd01919e2bf0394f9c485936d6098cec)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 09:29:55 -08:00
Ross Burton e286829fcc package_deb: handle allarch when mapping tune to dpkg architectures
It was discovered that buildtools-tarball can't be built with Debian packaging:

E: Unable to locate package nativesdk-buildtools-perl-dummy

The package exists but dpkg doesn't see it because the Architecture field isn't
valid: for this package the Architecture field is 'allarch' which isn't in the
list of valid architectures we define.

package_deb already has a mapping of OE architectures (PACKAGE_ARCH) to dpkg
architectures (DPKG_ARCH), for example our x86_64 is amd64 in dpkg.  However
allarch.bbclass sets an invalid TARGET_ARCH of 'allarch' (to break anything
which attempts to use the target architecture) and package_deb relied on the
PACKAGE_ARCH check later turning the Architecture field into 'all'.

This usually works, but nativesdk-buildtools-perl-dummy inherits allarch but
then changes PACKAGE_ARCH to buildtools-dummy-nativesdk to isolate the packages
in a separate feed.  We can handle this by explictly checking for allarch in the
TARGET_ARCH check, as that everything that inherits allarch will want to have
Architecture: all in their packages.

[ YOCTO #10700 ]

(From OE-Core rev: 58a5771f20f7851816b5f39df0ada8f16438065c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:43:00 +00:00
Richard Purdie fdb52ade90 package_deb: Clean up pointless exception handling
The exception handling in this function seemed mildly crazy. Python will
given perfectly good or in several cases better information if we let its
standard traceback/exception handling happen. Remove the pointless code
along with the duplicated key checking which was broken in the inner loop
by usage of the wrong variable.

(From OE-Core rev: f755b07b528e828618141eda402399d791efba4a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-22 09:05:39 +00:00
Richard Purdie 53a3c58774 package_deb: Improve failure debug output
Currently if the dpkg-deb command fails you see an error message like this:

ERROR: nss-3.27.1-r0 do_package_write_deb: dpkg-deb execution failed
ERROR: nss-3.27.1-r0 do_package_write_deb: Function failed: do_package_deb

which is pretty much useless. If we use subprocess.check_output, we see a
traceback and then:

Exception: subprocess.CalledProcessError: Command '<cmd>' returned non-zero exit status 1

Subprocess output:
<output>

which is much easier to debug from.

(From OE-Core rev: 18160442869f56ee71538bc2dc60d7cb6c08c8a2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-22 09:05:39 +00:00
Richard Purdie bc7162a46c classes/package*: Add support for PACKAGE_WRITE_DEPS
Add a new variable to allow markup of postinstall (and preinst)
script dependnecies on native/cross tools.

If your postinstall can execute at rootfs creation time rather than on
target but depends on a native tool in order to execute, you need to
list that tool in PACKAGE_WRITE_DEPENDS.

(From OE-Core rev: aff8ca95b8303a4a2a5600c0d8ec0a50ad677258)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-20 11:53:49 +00:00
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Ulf Magnusson c7d522c717 package_deb.bbclass: Use bb.fatal() instead of raising FuncFailed
This sets a good example and avoids unnecessarily contributing to
perceived complexity and cargo culting.

Motivating quote below:

< kergoth> the *original* intent was for the function/task to error via
           whatever appropriate means, bb.fatal, whatever, and
           funcfailed was what you'd catch if you were calling
           exec_func/exec_task. that is, it's what those functions
           raise, not what metadata functions should be raising
< kergoth> it didn't end up being used that way
< kergoth> but there's really never a reason to raise it yourself

FuncFailed.__init__ takes a 'name' argument rather than a 'msg'
argument, which also shows that the original purpose got lost.

(From OE-Core rev: 5a074e8a26d27ea9c4f31e2b75b2b14f6e0641d3)

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-04 16:29:04 +01:00
Robert Yang cbf7902030 package_deb.bbclass/package_ipk.bbclass: sort RPROVIDES
The dict.fromkeys() creates a dict without order, there might be a
problem when build the same recipe again, for example:

- First build of make:
  Provides: es-translation, make-locale
- Second build of acl:
  Provides: make-locale, es-translation

They are exactly the same Provides, but tools like "diff" doesn't think
so. Sort RPROVIDES will fix the problem.

(From OE-Core rev: 3506172d7d9f8d92362b6ebb75582b7c3e662dae)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-26 08:56:28 +01:00
Matt Madison 2ab49268fd package_deb.bbclass: fix Python 3 error
Don't modify an OrderedDict while walking its keys.

(From OE-Core rev: eb7f08c4c01313afc8350200eeb63daefde8a6f6)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-26 08:56:28 +01:00
Richard Purdie 9b32dd5a00 package_deb: Avoid chdir warnings and restore cwd after packaging
dpkg-build needs to be executed in the root of the package, so save and restore
the current directory so this task doesn't modify the state.

(From OE-Core rev: c294f4ed5a02b055916cfc26a2fca672edee1208)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-16 22:44:03 +01:00
Richard Purdie a7309d5790 classes/lib: Update to use python3 command pipeline decoding
In python3, strings are unicode by default. We need to encode/decode
from command pipelines and other places where we interface with the
real world using the correct locales. This patch updates various
call sites to use the correct encoding/decodings.

(From OE-Core rev: bb4685af1bffe17b3aa92a6d21398f38a44ea874)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:00 +01:00
Richard Purdie 297438e965 classes/lib: Convert to use python3 octal syntax
The syntax for octal values changed in python3, adapt to it.

(From OE-Core rev: 737a095fcde773a36e0fee1f27b74aaa88062386)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:00 +01:00
Ricardo Ribalda Delgado cbb4c5b0f1 package-deb: Ignore circular dependencies
If a package depends on itself apt-get fails to install it with the
error attached to this patch.

This patch checks for this conditions and notifies the user so the
recipe maintainer can fix his RDEPENDS variable.

root@qt5022:~# apt-get install perl-module-cpan
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  perl-module-cpan
0 upgraded, 640 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/5964 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
E: Internal error: MaxLoopCount reached in SmartUnPack (2) for
perl-module-cpan:amd64, aborting
E: Internal error, packages left unconfigured. perl-module-cpan:amd64
root@qt5022:~# apt-get install perl-modules

(From OE-Core rev: d8bf148c3b740254ed23d52cf244f0f6e9c7a4ab)

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12 22:11:47 +00:00
Ricardo Ribalda Delgado fcc7ff072a package_deb: Fix python runtime error
The dictionary cannot be used for iteration if its size may change
during the loop.

ERROR: Error executing a python function in
/home/ricardo/curro/qt5022/build-qt5022/repo/yocto/meta/recipes-devtools/perl/perl_5.22.0.bb:
Exception: RuntimeError: dictionary changed size during iteration

Acked-by: Aníbal Limón <anibal.limon@linux.intel.com>
(From OE-Core rev: 04aa40be126e00e2eb97311510e4d3ea90bfe7eb)

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12 22:11:47 +00:00
Richard Purdie 26f26e5cbd package_deb: Ensure allarch deb packages aren't target specific
The use of TUNE_FEATURES was making do_package_write_deb of allarch
packages target specific.

To avoid this, only use the end value of DPKG_ARCH for its checksum,
not intermediate values or variables.

(From OE-Core rev: 65955cf1c7d5c59f29d769a8244ae7c156a43f38)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10 16:06:24 +00:00
Matt Madison e265fbba3c package_deb.bbclass: add 'Multi-Arch: foreign' tag to allarch packages
This tells APT that it can use such packages to resolve dependencies
from packages of any architecture in a multilib build.

(From OE-Core rev: 7158c79a70e3d820c9701dacfa7206d13f95845a)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11 23:26:31 +00:00
Matt Madison 9ea7428e67 package_deb.bbclass, cross-canadian.bbclass: DPKG_ARCH mapping function
Have DPKG_ARCH set by directly invoking a mapping function, rather
than using an anonymous Python function modify the variable under
the hood, so we can have proper handling of overrides.

Also bring in some additional mappings to Debian architecture names
that weren't being handled.

(From OE-Core rev: 8d042ea4e755cb0bb28b88333e10e04ec4e86a36)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11 23:26:31 +00:00
Maxin B. John a205c4ce1d bbclass: fix spelling mistakes
Fix some spelling mistakes in bbclass files

(From OE-Core rev: ed484c06f436eea62c5d0b1a2964f219f3e5cb61)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-24 15:50:27 +00:00
Richard Purdie 66b7dfb73d package_*.bbclass: Ensure OVERRIDES doesn't change sstate signature
Changes to OVERRIDES (e.g. from changing MACHINE) should not change
the sstate signatures of do_package_write_*. Exclude the variable
explicitly in the package classes to avoid this.

(From OE-Core rev: 5826a9260138c437f87ba1a9f84d5c08442b997d)

(From OE-Core rev: 59ccabdfb59a3e0917585dafab7a1e7c71330996)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30 12:36:01 +01:00
Leonardo Sandoval 1019d8c802 package_deb.bbclass: Allow UTF-8 characters on control files
Allow UTF-8 characters on control files. Also handle an expection
in case of invalid characters (non UTF-8).

[YOCTO #6693]

(From OE-Core rev: 4096f3c5d309161999adc996fdfa7526e5504366)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:38 +01:00
Richard Purdie 00765258a2 package_ipk/deb: Drop version information from RPROVIDES
In some scenarios rpm needs version information from RPROVIDES. We can
add this to the metadata where needed however we need to stop it entering
the ipk/deb packages. This data is not needed due to the way opkg/dpkg
handle the data.

This patch ensures that data isn't used.

(From OE-Core rev: c68b975693c10899ce50b4d8c2aa3985ca890ce3)

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>
2015-07-20 10:40:41 +01:00
Richard Purdie 86d30d756a meta: Add explict getVar param for (non) expansion
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 *`

(From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:57:25 +01:00
Richard Purdie af377d6e0c package_ipk/deb/rpm: Improve OVERRIDES handling
(From OE-Core rev: 59ca90114fb0b770d9d79e548b7e52aa0c089e48)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-16 14:21:29 +01:00
Chen Qi 0aa5ea1251 packaging: allow globs in CONFFILES
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]

(From OE-Core rev: 0d446ef0e5bbca7058eec7259e34f2a1637dfab1)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-19 07:51:38 +00:00
Andreas Oberritter c0b0f695f5 package_deb: skip pre/postrm scripts on upgrade, write only one shebang
Trying to upgrade busybox removing symlinks but update-alternatives
need these links (sed, cut, tail, etc) in order to work.

Adding test to avoid this scripts on upgrade fix the problem, same
solution are found in package_rpm class.

[YOCTO #6768]

(From OE-Core rev: 7b9161dd0c475cca6ea7eb507f7c3c51869eb493)

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>
2014-10-11 08:11:03 +01:00
Richard Purdie 0f757af31f package_*.bbclass: Simplify addtask
The package_write task was previously removed. Remove a remaining superfluous
reference to it.

(From OE-Core rev: 76bbf9e8f07f3e6f20c890dd4c82c72641e2ca88)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:33 +01:00
Ricardo Ribalda Delgado 3beb482112 package_deb: Map TARGET_ARCH x86_64 to DPKG_ARCH amd64
Without this patch packages are generated as x86_64. Which cannot be
installed by default.

root@qt5022:~# dpkg -i alsa-utils_1.0.27.2-r0_x86-64.deb
dpkg: error processing alsa-utils_1.0.27.2-r0_x86-64.deb (--install):
 package architecture (x86-64) does not match system (amd64)
Errors were encountered while processing:
 alsa-utils_1.0.27.2-r0_x86-64.deb

(From OE-Core rev: a08eacc6d821d6946b23a99bca5abf785875b1cf)

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-11 08:11:40 -07:00
Richard Purdie 458496829b package: Drop do_package_write task
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).

(From OE-Core rev: cf70e15f063716f3227d467ab1f4bfc0018286f6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-25 08:01:09 +00:00
Laurentiu Palcu 4cc0a43449 package_*.bbclass: remove references to the old bash indexing routines
Package indexing is done in python and package-index.bb uses the new
routines.

(From OE-Core rev: 2ab1a2bccfbb4ed90fe3b877d1be80817ba32099)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-14 12:30:20 +00:00
Paul Eggleton f9623968f0 conf/bitbake.conf: default HOMEPAGE to blank instead of unknown
The default value for HOMEPAGE of "unknown" has been in place since the
early OE-Classic days, but it doesn't really make sense - "unknown" is
not a valid URL and it just means we have to explicitly check for this
hardcoded string if we're displaying the value in some form of UI, such
as Toaster.

This has required some changes to the packaging classes as they
previously did not expect the value to be blank.

(From OE-Core rev: 244e1d73ef58e92d73c098044c66bd784644b933)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:56:56 +00:00
Laurentiu Palcu ab14336a25 package_(deb|ipk).bbclass: remove the stamp when creating package from cache
If the packages are created from cache, we need to remove the stamp so
that we re-generate the index files at do_rootfs time.

(From OE-Core rev: dc06a91144b79a152eb481f6d36f6c328321b7c4)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:38 +00:00
Laurentiu Palcu 7fc9bdaeed Activate the new python rootfs/image creation routines
This commit will:
 * remove old bash code common to all backends;
 * create a new do_rootfs() python function that will use the new
   rootfs/image creation routines;
 * allow creation of dpkg based images;
 * fail for rpm/opkg (not implemented yet);

(From OE-Core rev: a83144bac8d67704ff66f5dc0fc56f5b63979694)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:38 +00:00
Leonid Borisenko 66055fbedd package_{ipk, deb, rpm}.bbclass: support additional user-defined metadata
Additional metadata from user-defined variable is written into
control/spec file of binary package.

Three variables are searched for adiitional package metadata:

  * PACKAGE_ADD_METADATA_<PKGTYPE>_<PN>
  * PACKAGE_ADD_METADATA_<PKGTYPE>
  * PACKAGE_ADD_METADATA

First found variable with defined value wins.

<PN> is a package name. <PKGTYPE> is a distinct name of specific
package type:

  * IPK for .ipk packages
  * DEB for .deb packages
  * RPM for .rpm packages

Variable can contain multiple [one-line] metadata fields separated by
literal sequence '\n'. Separator can be redefined through variable flag
'separator'. In package control/spec file separator is replaced by
newline character.

(From OE-Core rev: 773d7352309241e15ef5acadcbe416bdd7d45c18)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 00:52:32 +00:00
Richard Purdie 480bf037ae sstate: Get rid of crazy name mapping
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.

(From OE-Core rev: 5afe86a6854b21692fd97c5fc7fab50dbc068acb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-18 17:08:05 +00:00
Richard Purdie 0331fc2805 package_deb/package_ipk: Cleanup control file handling/races
If you Ctrl+C ppackage_write_{deb/ipk} control files can get left lying around
and make it into another packaging format. This ensures we cleanup all known
control files before starting packaging. We can simplify some of the globbing
as a result.

(From OE-Core rev: 7f8c728c82a17621461be2114c1afab3713a808e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-06 11:02:27 +00:00
Laurentiu Palcu cbc12aac86 package_deb, apt.conf: fix apt failure in do_rootfs()
The changes in this commit, dc5f6c3898,
moved apt config directory from native SYSROOT to WORKDIR.
Unfortunately, Dir::Etc in apt.conf was not changed accordingly and
sources.list file could not be found during do_rootfs().

This commit fixes this issue.

[YOCTO #5241]

(From OE-Core rev: 65a2a1e1d0b0e3dcc34d47f46185f24d753b53dd)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-24 17:24:14 +01:00
Richard Purdie 554c892ccf meta: Don't use deprecated bitbake API
These have been deprecated for a long time, convert the remaining
references to the correct modules and prepare for removal of the
compatibility support from bitbake.

(From OE-Core rev: 6a39835af2b2b3c7797fe05479341d71a3f3aaf6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-01 15:51:42 +01:00
Mark Hatle 388278818d package_deb: Add support for NO_RECOMMENDATIONS and PACKAGE_EXCLUDE
Add support for NO_RECOMMENDATIONS and PACKAGE_EXCLUDE.  Also add a
warning that ensures users know that BAD_RECOMMENDATIONS support is
not implemented in the debian package/rootfs classes.

(From OE-Core rev: 42b115b6d65c8205acb77b96db481f3e5172266b)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22 18:30:00 +01:00
Mark Hatle dc5f6c3898 package_deb.bbclass: Use the WORKDIR not SYSROOT for temp files
Previous debian APT configuration was using the sysroot directory.
This not only polluted the sysroot, but violates the expectation that
the sysroot is not modified by the rootfs installation.

(From OE-Core rev: 2db14eaa0fcc080bc20fa9da985ffc05c3b21e2a)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22 18:30:00 +01:00
Robert Yang 258b8a2cb4 package_deb.bbclass: make DESCRIPTION support newline
The recipe's DESCRIPTION is wrapped automatically by textwrap, make it
support newline ("\n") to let the user can wrap it manually, e.g.:

DESCRIPTION = "Foo1\nFoo2"

In the past, it would be:
Foo1\nFoo2

Now:
Foo1
Foo2

[YOCTO #4348]

(From OE-Core rev: 568e303ef4447a9ddb7fb6370166d012a4375dab)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-10 09:42:03 +01:00
Richard Purdie 950b505ca1 package_*.bbclass: Drop fakeroot from setscene calls
Back in 2010, I added these in commit: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=36f1ae42fe13dae174b7fb5eb85dc49d7d7b516b
however the package_write tasks sstate only consists of package files and no
fakeroot privileges are needed to write these out, only originally create them.

We can therefore drop these for some small performance gains and a less
convoluted depenency chain.

(From OE-Core rev: 3c760ce4dc15d85be07aafbfea896e7276e0c2c4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:31 +01:00
Richard Purdie 566628d8cd class/lib: Fix up various file access methods
There are various bits of cruft that have built up around our file accesses. This patch
cleans some of them up, specifically:

 * Remove pointless "from __builtin__ import file"
 * Use open(), not file()
 * Wrap file usage in a with container to ensure files are closed
 * Add missing .close() calls in some cases

(From OE-Core rev: a43e0a8ecd0441131e929daf998c3cd454d9c8f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Bogdan Marinescu 8866aeefb7 package_deb.bbclass: fix 'armel' override
The 'armel' override for DKPG_ARCH was causing the meta-toolchain
build to fail. The assignment was moved to an anonymous fragment
of Python code, so it doesn't affect the assignments in
cross-canadian.bbclass anymore, thus fixing the issue.

[YOCTO #4080]

(From OE-Core rev: 6f86fe5d66e401377bccd9f635270033b99a9f4b)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-03 17:01:13 +01:00
Richard Purdie 554e3d2540 package/populate_sdk: Move functions from package_* to populate_sdk_*
This fixes build failures introduced with "classes/buildhistory: implement history
collection for SDK" by moving the functions to files where only the specific image
type which is enabled is inherited. The failures occured when multiple PACKAGE_CLASSES
were enabled.

(From OE-Core rev: 9a414a57ad69a426a8d8a2970c42ca7427240615)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23 17:40:27 +00:00
Paul Eggleton 59e4815387 classes/buildhistory: implement history collection for SDKs
SDKs are constructed in a similar manner to images, and the contents can
be influenced by a number of different factors, thus tracking the
contents of produced SDKs when buildhistory is enabled can help detect
the same kinds of issues as with images.

This required adding POPULATE_SDK_POST_HOST_COMMAND and
SDK_POSTPROCESS_COMMAND variables so that data collection functions can
be injected at the appropriate points in the SDK construction process,
as well as moving the list_installed_packages and
rootfs_list_installed_depends functions from the rootfs_{rpm,ipk,deb} to
the package_{rpm,ipk,deb} classes so they can also be called during
do_populate_sdk as well as do_rootfs.

Implements [YOCTO #3964].

(From OE-Core rev: c3736064483d4840e38cb1b8c13d2dd3a26b36aa)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23 11:41:13 +00:00
Christopher Larson b10f2a74e4 package_{ipk, deb, rpm}: drop the TARGET_OS conditional
The tclibc file for uclibc already empties IMAGE_LINGUAS, so there's no point
to this conditional as far as I can tell, and it can cause issues for certain
values of TARGET_OS.

(From OE-Core rev: 0fdda5840452c7715ed775d5d18d9f850396f483)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:38 +00:00
Christopher Larson 331c1f1fe5 package_deb: don't install glibc-localedata-i18n separately
This was removed from package_rpm and package_ipk years ago, and shouldn't be
needed, installing the packages from package_linguas should be sufficient.

(From OE-Core rev: e9485c7077e5a9508371bbbbebdaaf1e9685da61)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:38 +00:00