Commit Graph

2406 Commits

Author SHA1 Message Date
Tom Zanussi 936c460ab8 module.bbclass: make sure do_make_scripts() executes after do_patch()
If do_make_scripts() executes before do_unpack()/do_patch(), the build
fails because it can't cd into the workdir of a recipe using this
class, so make sure do_make_scripts() doesn't run before the package
has been unpacked and patched.

Fixes [YOCTO #3589].

(From OE-Core rev: 824cf145bcb55bb99a717a2dfd73e43e6b3feea4)

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 08:56:31 +00:00
Andrei Gherzan 0231336247 chrpath.bbclass: Normalize rpath only of it doesn't contain ORIGIN variable
If we normalize a rpath which contains ORIGIN variable, the binary will end
up without those rpaths at all. So check first if rpath contains ORIGIN variable
and if not, move on and normalize it.

(From OE-Core rev: 46dc514ff5a3d2693546cf95c5481e0539c43580)

Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 08:53:41 +00:00
Saul Wold 8669fec353 chrpath: normalize the paths
By normalizing the paths the path comparing code works correct
to generate the right RPATH even when there is a A/../A in TMPDIR

[YOCTO #3408]

(From OE-Core rev: 50327f2bba9f479dd209cdc54646b9d551e84c59)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-13 16:54:31 +00:00
Mark Hatle 1f476dbb22 rootfs_rpm.bbclass: Revert to default shell logging behavior
Remove the set +x, and revert to the normal logging behavior.

(From OE-Core rev: e799d771c9ed9e41a900e2e96c23d4ae35d5fe08)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-13 15:18:46 +00:00
Darren Hart 722430a488 bootimg: Use FAT 32 for images larger than 512MB
Fixes [YOCTO #2138]

Commit 2175842116 dropped the forced use
of FAT32 for the hddimg generation as it broke with very small images
(< 32MB). Unfortunately, left to its own devices, mkdosfs appears to select
FAT16 even for very large images, resulting in 2.2GB images being
generated as FAT16:

$ ls -lah core-image-lsb-sdk-atom-pc-20121010233936.hddimg
-rw-rw-r-- 1 dvhart dvhart 2.2G 2012-10-17 08:00 core-image-lsb-sdk-atom-pc-20121010233936.hddimg

$ file !$
file core-image-lsb-sdk-atom-pc-20121010233936.hddimg
core-image-lsb-sdk-atom-pc-20121010233936.hddimg: x86 boot sector, code offset 0x58, OEM-ID "SYSLINUX", sectors/cluster 128, root entries 512, Media descriptor 0xf8, sectors/FAT 138, heads 64, sectors 4502496 (volumes > 32 MB) , serial number 0x50761926, label: "boot       ", FAT (16 bit)

The result was a runtime boot error from SYSLINUX and a failure to boot
live images greater than 1GB in size.

While strictly speaking it is the cluster count that determines which
FAT size is used, that calculation requires more information than we
have readily available (such as sectors per cluster). If we let mkdosfs
determine sectors per cluster and just set a sane threshold above which
FAT32 is used, we get correct bootable images. With this patch the 2.2GB
core-image-lsb-sdk uses FAT32 and the 21 MB core-image-minimal uses
FAT16, and both boot in qemu successfully:

$ ls -lah tmp/deploy/images/core-image-lsb-sdk-atom-pc-20121212220835.hddimg
-rw-r--r-- 1 dvhart dvhart 2.2G 2012-12-12 14:18 tmp/deploy/images/core-image-lsb-sdk-atom-pc-20121212220835.hddimg

$ file !$
file tmp/deploy/images/core-image-lsb-sdk-atom-pc-20121212220835.hddimg
tmp/deploy/images/core-image-lsb-sdk-atom-pc-20121212220835.hddimg: x86 boot sector, code offset 0x58, OEM-ID "SYSLINUX", sectors/cluster 8, Media descriptor 0xf8, heads 64, sectors 4470304 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 4357, reserved3 0x800000, serial number 0x50c902b7, label: "boot       "

$ ls -lah tmp/deploy/images/core-image-minimal-atom-pc-20121212220600.hddimg
-rw-r--r-- 1 dvhart dvhart 21M 2012-12-12 14:06 tmp/deploy/images/core-image-minimal-atom-pc-20121212220600.hddimg

$ file !$
file tmp/deploy/images/core-image-minimal-atom-pc-20121212220600.hddimg
tmp/deploy/images/core-image-minimal-atom-pc-20121212220600.hddimg: x86 boot sector, code offset 0x58, OEM-ID "SYSLINUX", sectors/cluster 4, root entries 512, sectors 41408 (volumes <=32 MB) , Media descriptor 0xf8, sectors/FAT 41, heads 64, serial number 0x50c8ffec, label: "boot       ", FAT (16 bit)

I have tested and booted core-image-minimal and core-image-lsb-sdk for
atom-pc with qemu-system-i386 using this patch.

(From OE-Core rev: de808c552d445502bd99f78bb8159d21149f87c1)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Steve Sakoman <steve@sakoman.com>
Cc: Joshua Immanuel <josh@hipro.co.in>
Cc: Przemek Czesnowicz <przemyslawx.czesnowicz@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-13 15:18:46 +00:00
Laurentiu Palcu 0496ba3a9b populate_sdk_(deb|ipk|rpm): export NATIVE_ROOT and INTERCEPT_DIR variables
In order for the postinstall scripts to have access to the recent
improvements when generating the target SDK sysroot, export these
variables in populate_sdk.

(From OE-Core rev: 06151c34f4f4cb669b2f93ebb2f78cfecf698355)

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>
2012-12-13 15:18:43 +00:00
Richard Purdie f823f0a0c0 bitbake.conf/utils: Drop some OVERRIDES from FILESPATH
There are several overrides that don't make sense as part of FILESPATH. This
introduces FILESOVERRIDES and allows us to drop some of the pointless ones,
simplifying the files search path further and improving the user experience.

If needed by specific recipes, other overrides can be added back in for
specific cases.

(From OE-Core rev: b8b1b39961332c99d62ee466f7859bd62a0f806f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-11 15:58:36 +00:00
Constantin Musca 9240695462 package.bbclass: prepend MLPREFIX to LOCALEBASEPN
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>
2012-12-11 15:58:35 +00:00
Constantin Musca 2437aaee8d multilib.bbclass: fix do_package_qa_multilib
The packages which start with "rtld" are ok

[YOCTO #3440]

(From OE-Core rev: 1bb3f44065d0470dd2f6950e267ef991c2ce6fd5)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-11 15:58:35 +00:00
Ross Burton 3488973587 package.bbclass: make do_split_packages handle non-existent root directories
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>
2012-12-11 15:54:36 +00:00
Andy Ross ec17940f72 base/license.bbclass: handle multiple INCOMPATIBLE_LICENSEs
Allow INCOMPATIBLE_LICENSE to be a whitespace-separated list of
incompatible license strings and/or glob patterns.

Also fix wildcarding: the string in INCOMPATIBLE_LICENSE was clearly
intended to match with wildcards (e.g. "*GPLv3" to match both GPLv3
and LGPLv3), but this was broken because of a bug in return_spdx()
which would die with a runtime error when there was no SPDXLICENSEMAP
entry for the string.

(From OE-Core rev: 8a8d00f4c9f7fe5f9f173b43b86cd18a6c75435c)

Signed-off-by: Andy Ross <andy.ross@windriver.com>
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-11 15:54:36 +00:00
Laurentiu Palcu 82d6ef6a7a populate_sdk_deb.bbclass: put back INSTALL_PACKAGES_NORMAL_DEB
This commit (0b0674ebcd) was also changing
the populate_sdk_deb.bbclass but the deb backend does not support
multilib just yet. So, when compiling the standalone toolchain tarball,
we ended up with an empty tarball if the deb package manager was chosen.

Reverting the deb part until the multilib support is added to deb.

[YOCTO #3532]

(From OE-Core rev: 34baee37caccced13fb26f446b865c9f25edf339)

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>
2012-12-11 15:54:36 +00:00
Richard Purdie e3532498df base.bbclass: Remove implicit dependency on license.bbclass
(From OE-Core rev: 28c06a32201351894546b3095f80daa84acf7b39)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 17:35:40 +00:00
Richard Purdie 25bc944d30 rootfs_ipk/package_ipk: Simplify opkg commandline option variables
The current maze of IPKG_ARGS variables is hard to understand and worse,
not even used in some places. This simplifies the code and specifies the
options in one place.

(From OE-Core rev: 5e482b278c3775b0acecc621cf2d3b90ee516f26)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 17:13:12 +00:00
Richard Purdie 0e486c7112 image/populate_sdk: Simplify imagetest inclusion and drop dummy class file
Having to include some dummy class is suboptimal and we no longer need to
do this. Also move this check to populate_sdk_base since we then don't
need to include it in toolchains specifically.

(From OE-Core rev: 2ee979ff71d31e497be856ea1443667c6d799d34)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 17:13:12 +00:00
Richard Purdie e3c2952766 bootimg: Remove now unnecessary dummy inherit usage
bitbake now supports empty expansions for inherit usage so we can simplify
these statements.

(From OE-Core rev: 77cd2ef06bdf701b047c4f8c817b364b8b4b8837)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 17:13:12 +00:00
Elizabeth Flanagan f42e0ae8d7 license.bbclass: Including locale packages
As locale packages are installed on the image, we should
be including them in the package/license manifest.

This ensures that the manifests are accurate and complete.

[ YOCTO #2461 ]

(From OE-Core rev: 4578b708ada1ffb99ab542da793977ffb90a9b50)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 16:13:46 +00:00
Mark Hatle 1d61099065 update-alternatives.bbclass: Add missing runtime dependency
When using update-alternatives, there should be a runtime dependency on
${VIRTUAL-RUNTIME_update-alternatives}.  Without this, it's possible to
get into a situation where the package is not installable.

(If VIRTUAL-RUNTIME_update-alternatives is not defined, no requirement
is added.)

(From OE-Core rev: 8a4c5765fb56d17c3d82ff6db47863e934c9fcbe)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 16:13:46 +00:00
Saul Wold d3154aa9f8 sstate: fix typo
(From OE-Core rev: 17d27fd6e2750e6455f656159da56c3350c4b3cd)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 22:59:10 +00:00
Richard Purdie dd3ad7f7f3 sstate: fix typo
(From OE-Core rev: 10cceb3854acd5c619d81011bac02da11ed580d2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 16:36:08 +00:00
Laurentiu Palcu ade680a28f populate_sdk_base, adt_installer_internal: fix issue on older distributions
This patch addresses an SDK installer issue on older distributions if
the installation takes place in another directory than the default one. In
fact, is all about the 'file' utility version used for determining if a
file is a text file. For example, for a perl script, newer 'file' versions
return:
"...script, ASCII text executable"
while older versions return:
"...script text executable"
Hence the regex pattern didn't match the scripts.

Also the patch contains two unrelated minor fixes:
 * return an exit code of 1 instead of -1 when installation machine is
   not supported. That because on an older distribution we also get this
   error message: "exit: 9: Illegal number: -1";
 * remove unnecessary $SUDO_EXEC prefix to grep;

[YOCTO #3538]

(From OE-Core rev: e7e23a1e5aae4028e21e37ec09e9d431a9adfbcb)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 16:36:07 +00:00
Saul Wold 97a91e81ea sstate: fetch .siginfo files from SSTATE_MIRROR
This would be useful for doing siginfo compares to understand why a build
is not reusing something when using SSTATE_MIRROR. No error will be reported
if it fails to find the .siginfo file

[YOCTO #2898]

[RP: Small tweaks]
(From OE-Core rev: 6d86690330f0d43839b904fced4b4b02cb27b8c6)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 12:31:19 +00:00
Andrei Dinu 6a8677696e Added regex functionality to distrodata.bbclass
In order to make the PRS use regexes for the versioning
of packages who have the distros on sourceforge and
for those who have faulty reports.

(From OE-Core rev: 2fe52b23c643d2125867dc9fcc9c01a184a9e238)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 12:31:18 +00:00
Constantin Musca 59a704679c prs: use the PRServer to replace the BB_URI_LOCALCOUNT functionality
- 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>
2012-12-06 12:31:16 +00:00
Holger Freyther 46eabf3a90 classes/binconfig.bbclass: Allow packages to add sed expressions
packages/apr/apr-util,apr use this, but it not been in the class

patch the config files to be 'installed' and not point to the build
and source-directory.

From OE-Classic:
http://git.openembedded.org/openembedded/commit/?id=030992bdd415c8892cf2925cf6fbe888226be046

[YOCTO #3267]

Orignal Author: Holger Freyther <zecke@selfish.org>
(From OE-Core rev: ab56f1063a666df5faddd97f44758c8ae378e51c)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 12:31:14 +00:00
Laurentiu Palcu fb29d189a2 gconf.bbclass: run postinstalls at rootfs time
(From OE-Core rev: 50b7f625cc2c4b9224726b11b6d4bd192209cc6e)

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>
2012-12-06 12:31:09 +00:00
Laurentiu Palcu dec1e7fdce gtk-icon-cache: run the icon generation at rootfs time
This change will allow for the icon cache generation at rootfs time and
only once, at the end. So, even though there will be many packages
depending on gtk+, the icon cache generation will be done once.
Hopefully, this will lower the target's first boot time significantly
by using the power of the host machine to generate the cache.

(From OE-Core rev: 74e34f6828771095a25d2c2de89f468b33e359f7)

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>
2012-12-06 12:31:09 +00:00
Laurentiu Palcu fd401f292e rootfs generation: export two new variables to postinst scriptlets
In order for the postinst scriptlets to be able to run once we need to
export the location of the intercept scripts and also the location of
native sysrootfs. The gdk-pixbuf binaries will need the latter because
in order to generate the loaders.cache it will need to scan some shared
libraries that must be native. Even though the output is a text file.

(From OE-Core rev: 927fabf549bb79cc179d2cb0a953dcd515acf464)

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>
2012-12-06 12:31:09 +00:00
Laurentiu Palcu 6b76f04195 image.bbclass: run postinst scripts once, at rootfs time
This patch will allow the repeating postinst scriptlets to be run
only once, on host, at do_rootfs time. This will lower the time for
rootfs generation and, also, instead of running some time consuming
scriptlets at target's first boot, we will do on the host.

(From OE-Core rev: 0d239328b1c6b9e4afadad75972d359181fbe1a5)

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>
2012-12-06 12:31:08 +00:00
Mark Hatle dde5e6402a license.bbclass: Avoid grep error message
Touch a file that is later greped to make sure it exists.

(From OE-Core rev: a17bf5d840b5777918f324d26e085498dec86b76)

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>
2012-12-06 12:31:08 +00:00
Mark Hatle ca36d34c2e package_deb: Dependencies with a ( or ) in them are invalid in debs
Replace ( or ) with __.  This allows RPM style dependencies to be satisfied
in deb style packages.

(From OE-Core rev: 12acb6bb00ba665571fcfbdb0ef4668ca0a98d5b)

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>
2012-12-06 12:31:07 +00:00
Mark Hatle 80ad2af71b package_rpm.bbclass: Add the runtime dependencies to the pre/post scriptlets
When the scriptlets are processed in RPM, they have a different dependency
set then the core package.  OE has no way to specify dependencies for the
pre/post scriptlists, so we simply make the runtime dependencies scriptlets
as well.

(From OE-Core rev: c1acac8c46aa75d78634c30de773b28a1466070c)

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>
2012-12-06 12:31:03 +00:00
Martin Jansa 381c4b69c7 sstate.bbclass: fix detection of owners matching sstate files
* without this patch:
  Python 2.7.3
  >>> sstate_search_cmd = "grep -rl /OE/jansa-test/shr-core/tmp-eglibc/pkgdata/armv7a-vfp-neon-oe-linux-gnueabi/runtime-reverse/vim-common /OE/jansa-test/shr-core/tmp-eglibc/sstate-control --exclude=master.list | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'"
  >>> cmd_array = sstate_search_cmd.split(' ')
  >>> search_output = subprocess.Popen(cmd_array, stdout=subprocess.PIPE).communicate()[0]
  grep: |: No such file or directory
  grep: sed: No such file or directory

* Adding shell=True and using cmd string instead of array makes it work:
  >>> search_output = subprocess.Popen(sstate_search_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0]
  >>> print search_output
  manifest-armv7a-vfp-neon-gvim.package
  manifest-armv7a-vfp-neon-vim-tiny.package
  manifest-armv7a-vfp-neon-vim.package

  But still isn't 100% reliable, I guess it's caused by some other package
  being removed from sstate while grep is already running.
  So sometimes grep can show error on STDERR
  >>> search_output = subprocess.Popen(sstate_search_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0]
  grep: /OE/jansa-test/shr-core/tmp-eglibc/sstate-control/manifest-armv7a-vfp-neon-systemtap.package: No such file or directory

(From OE-Core rev: d84f7d7a12b4271f7b2bfde9fb356d750abff15d)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-05 15:34:07 +00:00
Enrico Scholz 306761b026 sstate.bbclass: fixed file-conflict check
The value of subprocess.Popen().communicate()[0] is a string.
Checking for '!= None' will always match causing bogus warnings
regarding already staged files.

(From OE-Core rev: acdd76482efc3caf80e9e0b7359be7ca724ae09a)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-05 15:34:06 +00:00
Martin Jansa 7fb6241350 distutils: remove empty datadir/share after it's content is moved to datadir
* fixes a lot of QA warnings about unpackaged /usr/share/share

(From OE-Core rev: 10457e343b27e63b35e0278b00e9c25106b0cc1b)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-05 15:34:06 +00:00
Laurentiu Palcu 40b4bb068f populate_sdk_base: fix directory creation as normal user
My previous patch removed the mkdir and added it at the end of the
"gaining SUDO rights" block in order to fix directory creation when
installing in a location without proper rights. Unfortunately this
messed up the directory creation as normal user as it will ask for
sudo right in order to create it...

Hopefully, this will fix both cases.

(From OE-Core rev: 86286287d0134ade73f6a282158dde86bf0159e8)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-05 15:26:40 +00:00
Laurentiu Palcu 4bec4e7850 populate_sdk_base: mkdir was missing $SUDO_EXEC prefix
mkdir was in the wrong place and missing sudo rights. Hence, the
installation to default location (or any other for which the user didn't
have rights) would fail. Unless the installer itself is run with sudo.

(From OE-Core rev: 555d03c466490ab12b2b1d049736593da2334e97)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04 18:02:01 +00:00
Bruce Ashfield e2e0942a35 kernel-yocto: checkout known branch before leaving do_validate_branches
We should always leave the tree on a BSP branch or master when
do_validate_branches completes to avoid modifying version tracked
files are part of the build process. Modifying these files will lead
to errors when changing branches, since the contents would be lost.

This is evident in the case that a the meta branch is reset to a
known SRCREV and the tree was left on the meta branch. This branch
tracks the meta/meta-series, and other artifacts of the original
tree construction. When the build process runs, it updates these same
files, which creates a conflict when switching branches.

This has been fixed in the tree construction scripts to not track
these files, but a secondary fix is also required of not leaving
the build on these branches, to allow arbitrary trees to be built.

[YOCTO #3413]

(From OE-Core rev: 57397592ff8ec16922604d398c18d53a589be41f)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 16:38:35 +00:00
Richard Purdie 7b0ad8ec31 populate_sdk_base: Fix typo
(From OE-Core rev: bb3f086fc44749c586b5046309d179fc3435933e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 14:51:52 +00:00
Jason Wessel 40c57a487e populate_sdk_base.bbclass: make failure to find ld-linux.so a hard error
The shell archive that populates the external SDK should fail if it
cannot find the ld-linux.so else it will corrupt all binaries because
a random path will be used from the list of executables when dl_path
is empty.

(From OE-Core rev: 206aa794933d41dfb037e9c654c818cd4d4f956d)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 14:47:59 +00:00
Ming Liu 8880840f36 rootfs_rpm.bbclass: fix a regression introduced by list_installed_packages change
A regression was introduced by commit:190cb591 that it doesn't
consider the situation that some archs contain "_" originally, so it
results in issues when dealing with archs like qemux86_64, x85_64.

Added a conditional statment in to handle that case.

(From OE-Core rev: 8567991639fda8d2a1e88169b86c72e14cc6c82d)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 14:47:55 +00:00
Hongxu Jia 1b98ab72e7 populate_sdk_base:tarball installer:add sudo prompt
1.Adds a sudo passwd prompt during installation if the
  user couldn't install on the dir.
2.Adds option -d <dir> to enter dir without prompt.
3.Adds option -y for automatic yes to all prompts, a non-
  interactive method.

[YOCTO# 3153]
[YOCTO# 3309]

(From OE-Core rev: e85e1aace604626914a06dab4663094d6dd9b035)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 14:47:55 +00:00
Martin Jansa 88a9f6db34 rootfs_ipk, package_ipk: drop --force-overwrite
* it was introduced in 2010 by 8c3a7ebac8
  but doesn't seem needed anymore
* also such do_rootfs failure is good indication that runtime packages
  installed are not sane, ignoring this error in do_rootfs just
  transfers the issue to end user when he does "opkg upgrade" later
  on device
* tested on SHR images with whole feed included and only issue was
  gstreamer/gst-plugins-* locale packages (and there is patch for this
  on oe-core ML)

(From OE-Core rev: 1f7d3a2e9071ff78170c06ebf58c7400a5ee09bf)

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>
2012-12-03 14:32:46 +00:00
Ming Liu 48e657f654 rootfs_rpm.bbclass: normalize arch output of list_installed_packages
list_installed_packages should output uniform formatted archs for all
packaging system(deb, rpm and ipk), for they are used by common code to
grab the package infos. Otherwise, it will lead some -dbg packages to be
missed processing in come cases.

It's introduced by commit: fc985f51, package_rpm.bbclass: fix the arch
(replace "-" with "_").

Fixed by replacing "_" back to "-" in list_installed_packages, make it
output real arch values which can be safely used.

(From OE-Core rev: 554f2436435bf96c6735827f491c1b78b198c016)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 13:52:07 +00:00
Laurentiu Palcu b751ec137d populate_sdk_base: tarball installer: SDK overwrite warning
This patch contains two fixes:
  * if the user wants to install the SDK in a directory that already
    contains a SDK for the same architecture, a warning will be shown;
  * when the symbolic links are relocated use -n option. Otherwise,
    symbolic links to existing directories will be created in the
	directory itself;

[YOCTO #3401]

(From OE-Core rev: cd035f170a2448b9ebcf0cfac5d4c0fa472b7049)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 13:52:06 +00:00
Laurentiu Palcu f931aeb72e rootfs_ipk.bbclass: add missing --force_postinstall option
The force_postinstall option was missing and some packages were
configured on target rather than on host at rootfs time.

(From OE-Core rev: dfadfaa0b38678029ffebe14f15e2dbc148cb1fb)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-28 15:18:46 +00:00
Richard Purdie 13ecfdb331 packagegroup/allarch: Convert to use allarch class
Currently there is some odd behaviour of the packagegroup class in relation
to sstate since it sets PACKAGE_ARCH = "all" but does not use the allarch class
leading to it being undetected by sstate.

Previously it was not possible to use allarch as the recipe couldn't "undo"
settings made by the allarch class. Since this no longer happens when
PACKAGE_ARCH != all, we can use the allarch class.

This patch also fixes up one case we need to preserve TRANSLATED_TARGET_ARCH
and ensures sstate only assumes allarch when PACKAGE_ARCH is "all".

(From OE-Core rev: 591fa7c1ab9e9ff75fdce602c77ecdeda3a255d9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 10:01:24 +00:00
Richard Purdie 668f7e36fe allarch: Allow class to be included but overridden
We have cases where we'd like to inherit this class by default but allow
special cases to override it. This change makes the code of the class
conditional on PACKAGE_ARCH remaining set to "all", allowing it to be
overridden. packagegroup usage is one case this is desirable.

(From OE-Core rev: 7dd91402b719ac62b51088f234354f82bfa9c4b6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 10:01:23 +00:00
Richard Purdie e8be466431 base.bbclass: Drop P and PN from FILESPATH
In the interests of simplifying things, remove P and PN from FILESPATH,
instead relying on the BP and BPN versions which work in 99% of cases.

In any problematic case such as a -native only recipe, either the patch
directory can be renamed or the recipe can set FILESPATH specifically.

(From OE-Core rev: fb359583b659cda643973fa285002aaffb729a51)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 10:01:23 +00:00
Richard Purdie 65145901af bitbake.conf: Simplify FILESPATH
Files are very rarely, if ever placed in ${PF}. If a recipe needs to do this,
it can easily append to FILESPATH so it makes sense to drop this from the
default search path.

Equally, using FILE_DIR as part of the search path leads to 'bad' SRC_URI
entries and/or file layouts which are not preferred. I'm therefore of the
opinion we should also remove this from FILESPATH and encourage people to
cleanup any places this breaks my correcting the layouts to match the standard
or worst case adding to FILESPATH in recipes that need it.

These changes work towards making the system more friendly as users won't be
greeted with huge search paths we rearely use making the "correct" layout
more obvious.

(From OE-Core rev: 3efa13cd76bbd5611805021945fc9def88d9fd93)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 10:01:23 +00:00