Commit Graph

2000 Commits

Author SHA1 Message Date
Robert Yang ea2a85035a rootfs_rpm.bbclass: save rpmlib rather than remove it
The rpmlib was removed when images that add
"remove_packaging_data_files" to ROOTFS_POSTPROCESS_COMMAND, which would
make the increment rpm image generation doesn't work in the second
build, since list_installed_packages would get incorrect value in the
second build, move the rpmlib to ${T} rather than remove it, and move it
back when INC_RPM_IMAGE_GEN =1.

[YOCTO #2440]

(From OE-Core rev: c30e79510c06701f10f659eedaa0fe785538ac17)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 11:43:23 +01:00
Xiaofeng Yan 9a519998f4 archiver.bbclass: Reduce some duplication for function get_licenses
The content to modify this bbclass is as follow:
- Use the existing functions to get license as a directory instead of
  rewriting it for avoiding code duplication.
- Use SPDXLICENSEMAP to map licenses

[YOCTO #2473]

(From OE-Core rev: 31bee6e7b0a23efc1555ab739ef10041803d5bb1)

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 11:43:22 +01:00
Mark Hatle 17207058b2 insane.bbclass: Make ldd exec_prefix error reporting easier to read
Remove the long obtuse sysroot path from the ldd output.

Make the error message significantly easier to read and understand.

Old Style:
WARNING: QA Issue: keyutils: /home/mhatle/git/oss/oe-core/build-i386/tmp-eglibc/work/i586-oe-linux/keyutils-1.5.5-r1/packages-split/keyutils/sbin/request-key links to something under exec_prefix
WARNING: QA Issue: ldd reports:         libkeyutils.so.1 => /home/mhatle/git/oss/oe-core/build-i386/tmp-eglibc/sysroots/qemux86/usr/lib/libkeyutils.so.1 (0xdead1000)
        libc.so.6 => /home/mhatle/git/oss/oe-core/build-i386/tmp-eglibc/sysroots/qemux86/lib/libc.so.6 (0xdead2000)
        /lib/ld-linux.so.2 => /home/mhatle/git/oss/oe-core/build-i386/tmp-eglibc/sysroots/qemux86/lib/ld-linux.so.2 (0xdead3000)

New style:
WARNING: QA Issue: keyutils: /sbin/request-key, installed in the base_prefix, requires a shared library under exec_prefix (/usr): libkeyutils.so.1 => /usr/lib/libkeyutils.so.1 (0xdead1000)

(From OE-Core rev: 1583a8e2db6dd4843ff45acee458d4924f7d6ced)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 11:43:21 +01:00
Elizabeth Flanagan 885e1f7e68 license.bbclass: optimize pkg runtime data
This fixes an ugly way I was trying to find pkg runtime
data for package and license manifest creation.

rootfs generation times for core-image-minimal:

Prior to patch
real	0m41.570s
user	1m40.466s
sys	0m6.768s

With patch
real	0m27.527s
user	0m9.833s
sys	0m3.496s

(From OE-Core rev: 664bbf3207c229eef5ef94a08713a652f33a8466)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>

Conflicts:

	meta/classes/license.bbclass
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-05 23:04:59 +01:00
Elizabeth Flanagan f25a6c09da license.bbclass: Adding PV to package.manifest
Per request, adding the package version to the package manifest
file.

(From OE-Core rev: bf216369f3131ad38c0b2b92620e4805ca9eecb9)

Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-05 23:04:59 +01:00
Xiaofeng Yan 34f819e22e archiver.bbclass: Improve the usability for the archiver classes
The usability of the archiver classes can be improved, beyond the
simple addition of default values for the variables. A user could
well inherit just archiver rather than the individual useful classes,
and not realize it will do nothing.

[YOCTO #2472]

(From OE-Core rev: ce91f495e0c4ef3bf53ee8b2ea570061da38e14f)

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-05 22:56:32 +01:00
Xin Ouyang d0fac332cf cpan.bbclass: Fix config error while patches to Makefile.PL
If there is a patch to Makefile.PL, a Makefile.PL but no Makefile
will be placed in ${B}/.pc/xxx.patch/ after do_patch.
And no Makefile will be generated for *this* Makefile.PL.
While do_configure, the original code tries to sed Makefiles
matching with each Makefile.PL in {B}, so this would fail.

(From OE-Core rev: 7c99105d70a16aa9e42429224abed28743e627b2)

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-05 22:56:30 +01:00
Richard Purdie 0b8d5dad9c update-alternatives: Fix absolute symlink handling
After the class changes, absolute symlinks are not being handled correctly
by the class file. This adds handling for absolute symlinks to account for the
pkgdest directory, removing dangling symlink messages from recipes like bzip2.

(From OE-Core rev: ecea2fab2063a3c478a63e62ba0e80305674c5e0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:32:31 +01:00
Richard Purdie b3e76b33f3 package.bbclass: Add warning about FILES containing '//'
'//' in a FILES variable causes hard to track down issues with
packaging. This adds a warning and attempts to auto-correct the issue to
try and make the problem more user friendly.

[YOCTO #2448]

(From OE-Core rev: 0e33e314b1d2d3779658696f13a274b20d698667)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:32:31 +01:00
Richard Purdie 0d9e893711 Revert "meta: replace os.popen with subprocess.Popen"
This reverts commit e83d8e58a6b107eea87df0ec233a1bc932b2c6e as the conversion
is not correct. Its replacing readlines() calls which generate an array with
what are effectively strings. There are split("\n") calls missing in many
cases so this needs to be reverted until it gets fixed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 14:21:29 +01:00
Paul Eggleton bc386b8934 classes/sanity: fix a couple of grammatical errors in messages
(From OE-Core rev: 004ba67298e3e6e618df29597e9166c971a1941c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 14:21:29 +01:00
Richard Purdie 0299499770 ccache: Separate out into its own class
Currently, ccache is used if it is present. When building from scratch it gives
no performance improvement and creates a ton of empty directories even when its
not in use.

This change moves ccache support to a bbclass file which the user can choose to
enable. This should make builds more determinstic and make it easier/clearer
to the end user when its being used and when it is not.

(From OE-Core rev: 2acf8da4f13c175ea818b9514677b7059de1e3e2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:49 +01:00
Richard Purdie a92ff3ad42 scripts/cp-noerror: Add a special copy function to fix autotools issues
Currently we copy the aclocal directory to the build so that autotools
doesn't see .m4 files disappear when its processing them. This can happen
if for example, package X is being rebuilt at the same time as Y and it
gets uninstalled from sstate (assuming there are no dependencies between
X and Y). This code making the copy was added to avoid races but introduces
a race of its own, namely that the files can disappear during the copy.

This patch adds a cp-noerror script which silently ignores such errors
and gives the behaviour we need in this case. It hence fixes issues which
crop up for users and the autobuilder occasionally.

[YOCTO #2485]

(From OE-Core rev: 0f81fbc0df73675aeb79c724858799a3b6a02f85)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:49 +01:00
Paul Eggleton 7a619c235f classes/sanity: send sanity check failure as a separate event for Hob
In order to show a friendlier error message within Hob that does not
bury the actual sanity error in our typical preamble about disabling
sanity checks, use a separate event to indicate that sanity checks
failed.

This change is intended to work together with the related change to
BitBake, however it has a check to ensure that it does not fail with
older versions that do not include that change.

Fixes [YOCTO #2336].

(From OE-Core rev: 49d8b7b8c3b18da64583637db207f1f064a5bdb2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:48 +01:00
Paul Eggleton a8010cd5d7 classes/sanity: remove broken TARGET_ARCH check
The variable name has been typo'd as TARGE_ARCH since it was introduced
some time ago, so the check has never worked. Fixing the typo shows that
the test is not quite functional, so let's just remove it:

http://lists.linuxtogo.org/pipermail/openembedded-core/2011-October/010613.html

(From OE-Core rev: 897a9b1dddef385253b16ea7c193483e0ea679b6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:47 +01:00
Robert Yang 5996b2b58e meta: replace os.popen with subprocess.Popen
Replace os.popen with subprocess.Popen since the older function would
fail (more or less) silently if the executed program cannot be found

There are both bb.process.run() and bb.process.Popen() which wraps the
subprocess module, use it for simplifying the code.

Note: We don't need the "2>/dev/null" or "2>&1" since bb.process.run()
can handle it, it will raise exception when error occurs, we should
handle the exception ourselves if we want to ignore the error.

More info:
http://docs.python.org/library/subprocess.html#subprocess-replacements

[YOCTO #2454]

(From OE-Core rev: e83d8e58a6b107eea87df0ec233a1bc932b2c6ea)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:45 +01:00
Robert Yang e40995e569 meta: replace os.system with subprocess.call
Replace os.system with subprocess.call since the older function would
fail (more or less) silently if the executed program cannot be found

More info:
http://docs.python.org/library/subprocess.html#subprocess-replacements

[YOCTO #2454]

(From OE-Core rev: a07d03cc6f67c88feb9813ae7deb6e4a93552dfe)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:45 +01:00
Mark Hatle e4449c91fb update-alternatives.bbclass: Change from using PN to BPN
In order to better support multilib processing, switch from PN
to BPN.

(From OE-Core rev: 75f70ab534f6dfef961906fb5c252f9e5310d38f)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:37 +01:00
Mark Hatle 6ac7e9b598 update-alternatives.bbclass: Refactor the implementation
Refactor in order to:
  * Deprecate the old interfaces, but keep them for compatibility
  * Provide a new, interface -- capable of working with split packages
  * Each update-alternative will now set proper "per-file" provides

Note: this adds a warning message when the older deprecated behavior is
used.  The older behavior has been fully tested using oe-core.

(From OE-Core rev: 309117d26de6a87b16406a44a0cefcbaaf7b5d7a)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:37 +01:00
Richard Purdie fcd8021409 image.bbclass: Ensure ${S} is cleaned at the start of rootfs generation
Some image classes such as bootimg save files into ${S} as part of rootfs
generation. For correctness we should therefore clean this at the start of
image generation to ensure reproducibility.

I found this issue when some files I thought should disappear from my rootfs
would not disappear.

(From OE-Core rev: 363424cdc78cafa278008f973c2b4288297ebf8c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:28:49 +01:00
Mark Hatle d03e29fec2 package.bbclass: Add additional debugging for dependencies
When trying to understand why a QA wanring such as:

ERROR: QA Issue: foo rdepends on bar-dev

it is very difficult to figure out where the bar-dev dependency
comes from, since many of them are added dynamically.

This adds a debug statement that says which dependency adds an
rdepends to the system.

Also, while doing this work, it was noted that the same dependencies
were being scanned for over and over.  Instead we shorten the list
by only added to the dep list if the dependency was not already there.

(From OE-Core rev: 257b9e371143421b78a6991ef5401e564918c164)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:18:03 +01:00
Robert Yang 70caf1e1bc utils.bbclass: remove the unused oe_system
The following functions in meta/classes/utils.bbclass were not
used by anyone, and they didn't work when I tried to use them:

def oe_popen_env(d):
def oe_run(d, cmd, **kwargs):
def oe_popen(d, cmd, **kwargs):
def oe_system(d, cmd, **kwargs):

There error was:
AttributeError: type object 'str' has no attribute 'getVar'

We have bitbake/lib/bb/process.py to instead, so remove them.

[YOCTO #2489]

(From OE-Core rev: 15ad62ab1be060d8a7cdc2d28167ea3af4cfd5d5)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:17:53 +01:00
Joshua Lock 9ab9c52cfc sanity.bbclass: check sanity at BuildStarted rather than ConfigParsed
This enables a user to use bitbake -e even when the sanity checks are
failing.

(From OE-Core rev: be317df78535120137ecaadf797e3f4dfe04119e)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24 08:51:42 +01:00
Joshua Lock 9509ed472a sanity.bbclass: catch an extra exception in check_create_long_filename
The call to bb.mkdirhier() in check_create_long_filename() can fail with an
OSError, explicitly catch this and report something useful to the user.

(From OE-Core rev: b066906477eb0496a2babb3d8e87682a1b7df0de)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24 08:51:41 +01:00
Joshua Lock 3898d081ab sanity.bbclass: add extra information when SSTATE_CACHE unusable
If the user does not have write permissions to SSTATE_CACHE, detected by
the check_create_long_filename() test failing with a "Permission denied"
value in strerror, then suggest they might want to use the location as
an entry in SSTATE_MIRRORS.

(From OE-Core rev: 719d44305508c75a9f2decacdff6558ca14277bb)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24 08:51:41 +01:00
Joshua Lock 13a86cb33d sanity.bbclass: add newline to check_create_long_filename failure message
Each failure in the sanity message should be reported on a new line.

(From OE-Core rev: 9362702aa9dd82fed7e6d6e3cb1289521b802075)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24 08:51:41 +01:00
Joshua Lock 2e12fcf3a1 sanity.bbclass: data.getVar(VAR, obj, exp) -> obj.getVar(VAR, exp)
Replace calls to data.getVar(VARIABLE, data_object, expand) to
direct calls to the getVar method the the data_object.

(From OE-Core rev: 41ee978b62a9c40f36f8ad0acef147e36edffa17)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24 08:51:41 +01:00
Joshua Lock 1983045391 sanity.bbclass: copy the data store and finalise before running checks
At the ConfigParsed event the datastore has yet to be finalised and thus
appends and overrides have not been set.
To ensure the sanity check is being run against the configuration values
the user has set call finalize() on a copy of the datastore and pass that
for all sanity checks.

(From OE-Core rev: 71142172efc0f44a50216550c2b6cc3094fdc21d)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24 08:51:40 +01:00
Joshua Lock 6a4c55df3c Revert "sanity.bbclass: check user can read and write to SSTATE_DIR"
This has caused problems for several users, including the Yocto Project
autobuilder. Since the message was added in order to be more user friendly
revert the change.

This reverts commit 0c0c4efbf92bcf0f8942f17c18525a4b4ed1798c.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24 08:51:40 +01:00
Andreas Oberritter dc290d16eb distutils.bbclass: don't delete .pyo files
* Deleting .pyo files causes them to get compiled on the target.
* First boot gets *really* slow for python based projects.
* No space gets saved on the target.
* The package manager doesn't know about the files and
  therefore fails to uninstall them, occupying space and causing
  uninstalled python scripts to remain executable.
* It's inconsistent, because python itself and autotools based
  projects already ship .pyo files.
* Probably .pyo files were deleted because .pyc files were
  available earlier, but this has changed and OE-Core's python
  now only generates optimized .pyo files. Deletion of .pyo was
  introduced in 2008, python/04-default-is-optimized.patch
  was introduced in 2009.

(From OE-Core rev: 25e186ad5b75bd2f93435857580bd16698e18e21)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24 08:51:40 +01:00
Robert Yang 73538f548c package_rpm.bbclass: Fix incremental rpm image generation
Fix the incremental rpm image generation, it didn't work since the code
has been changed.

The btmanifest should have a ".manifest" suffix, so that it can be moved
to ${T} by rootfs_rpm.bbclass:
mv ${IMAGE_ROOTFS}/install/*.manifest ${T}/

Note: The locale pkgs would always be re-installed.

[YOCTO #2440]

(From OE-Core rev: 5149630746626c6d416f26ab9dd1c7213fcd8c50)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24 08:51:37 +01:00
Paul Eggleton 66b0eceeca classes/base: add checksum file list at parse time
Connect the new fetcher file checksum code so that we get a list of the
files to be checksummed at parse time.

The file-checksums flag will not be read unless we are using a version
of BitBake that supports the function we call within it, so it is safe
to include this change even when the metadata will still be used with
older versions of BitBake.

Implements [YOCTO #2044].

(From OE-Core rev: f26065629b6397d129db930268b72164f8e5d3e4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24 08:51:37 +01:00
Khem Raj 4cbc27c3e3 libc-package: Add sh4 and mips64 to arch options
needed for new architecture support

(From OE-Core rev: 75167eb890d8e4683f1e3852e3b77c67d160bea7)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-21 09:59:03 +01:00
Khem Raj 8bc899a1b8 kernel-arch.bbclass: Map mips64{el} to mips KARCH
(From OE-Core rev: 22ce249a814f750bc47ead9ce281fcbd63c775c8)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-21 09:59:02 +01:00
Khem Raj 8262a6717f insane.bbclass: Add mips64{el} to known machines
(From OE-Core rev: 77dc886107e1b9cdaf6803141dc97c3ebfc22910)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-21 09:59:01 +01:00
Mark Hatle f24d8df3af sstate.bbclass: Make sure we don't have an empty fixmepath file
Jason Wessel noticed that a package without any fixmepath entries would
generate a sed warning about no input files.  This patch resolves that
by ensuring that an empty fixmepath file never gets written into the
sstate archive.  Also we avoid a second message by only doing xargs if
we got input.

(From OE-Core rev: 326563d5a897ae2dba7cfd8d73579d3d979d72c8)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-18 15:25:13 +01:00
Lianhao Lu f3c07ace4b multilib.bbclass: Added multilib specific package QA.
Added a new PACKAGEFUNCS function to check the multilib packages'
dependency.

(From OE-Core rev: f193729cdf0f3eccf96a8ce7bf5f599eca89a0d0)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-18 15:25:11 +01:00
Lianhao Lu 8de572f95a (libc-)package.bbclass: Added MLPREFIX to locale packages.
Added multilib prefix to the locale related package names/dependencies.

(From OE-Core rev: a52f7cf2cc90d918e3250c410995dcc1f3bfd5ee)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-18 15:25:10 +01:00
Joshua Lock c2df43b5db sanity.bbclass: check user can read and write to SSTATE_DIR
The user needs read and write permissions to SSTATE_DIR, check
whether they have sufficient permissions and if not recommend
use of SSTATE_MIRRORS.

(From OE-Core rev: 0c0c4efbf92bcf0f8942f17c18525a4b4ed1798c)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-17 21:13:10 +01:00
Xiaofeng Yan 9477419d52 archiver.bbclass: Add two default set for avoiding error when missing assignment
Add two default set(SOURCE_ARCHIVE_LOG_WITH_SCRIPTS, \
SOURCE_ARCHIVE_PACKAGE_TYPE) to archiver.bbclass for avoiding \
building error when forgetting to assign to them.

(From OE-Core rev: 5bda8f33b6763fb519543d0f9e35c970a31d39b8)

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-17 21:13:09 +01:00
Joshua Lock 441c1f8faa meta/classes/sstate.bbclass: ensure sstate files have group R/W
In order to make sharing sstate files easier chmod them with 0664 permissions	so that they are readable and writable by the user and any other members of 	their group.

(From OE-Core rev: dae9ad8a0ba0343e3083694cdcb20f0d02927ad0)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-17 21:13:08 +01:00
Christopher Larson 6c0c7bb0dc kernel.bbclass: add deploy link to KERNEL_IMAGETYPE
It's common to provide a non-machine-suffixed link in DEPLOY_DIR_IMAGE, so
let's be consistent and do so here as well.

(From OE-Core rev: c1c8d2f3cffc540380c0a5fcdda48d64cbec333a)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-17 21:13:08 +01:00
Khem Raj 961db45af2 classes/mirrors.bbclass: Point snapshot.debian.org mirror to working location
If you point to snapshot.debian.net/archive/pool then it will fetch
you a html page which will end up in corrupt download. The locations
have changed for archives and here we point the mirror to right
location.

(From OE-Core rev: 15e8aa4cd773022b36a66f70e4f6436289f3d1bc)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-16 07:34:27 +01:00
Mark Hatle 75fcc7c806 sstate.bbclass: Optimize the generation and install path fixups
The fixmepath file that is generated contains a list of all of the files
that need their paths fixed.  In the previous version the fixmepath was
generated to include all of the files that sed may have changed.  In the
new version, we first grep the files to see if they contain a path that
needs to be changed, only then do we perform the sed operation on those files.

This results in a modest performance increate in the creation of the sstate
file.  The following numbers include the do_package and do_populate_sysroot
tasks on the perl recipe.

Before the change:
real    4m23.018s
user    1m57.067s
sys     1m33.327s

After the change:
real    4m13.083s
user    1m54.062s
sys     1m26.064s

However, a more significnt performance gain is felt during the
extraction/install of sstate cache files, as the fixmepaths file now has a
significantly smaller list of files to modify.

Before the change:
real    0m39.798s
user    0m11.158s
sys     0m12.642s

After the change:
real    0m25.511s
user    0m8.408s
sys     0m5.077s

(All numbers above were recorded with a cold filesystem cache on a machine
with 12 GB of ram.)

(From OE-Core rev: 46067264bedeff8248a2b2441733420fe6651f84)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-15 19:06:06 +01:00
Paul Eggleton 12b4543ac9 classes/rootfs_*: fix splitting package dependency strings
If a + character appears in a version specification within the list of
package dependencies, the version will not be removed from the list in
list_package_depends/recommends leading to garbage appearing in the
dependency graphs generated by buildhistory. To avoid any future
problems due to unusual characters appearing in versions, change the
regex to match almost any character.

Fixes [YOCTO #2451].

(From OE-Core rev: 36d1717e2ad4ca1620ee9f01b524b5ff2f499b26)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-13 20:09:56 +01:00
Richard Purdie c73779d150 package.bbclass: Drop dubious use of packages[0] from do_split_packages and do_split_locales
As the comment says, using packages[0] is rather broken and can be incorrect,
as demonstrated by the recent gdk-pixbuf change. Replacing it with PN is
a bit more correct and more likely to do what was originally intended
by this function.

(From OE-Core rev: 5d0144fe6bd1febc2d1e651bbcff891c80f20b88)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-12 11:23:35 +01:00
Bruce Ashfield c08ee52519 kernel-yocto: export GUILT_BASE to devshell
One of the patch backends to linux-yocto is guilt, which normally
tracks patches under .git. But .git isn't something that can be
checked into a SCM and repeated. So it has been moved under meta/patches
and committed to the meta branch.

If devshell is used, GUILT_BASE isn't set, so patch manipulations will
fail. We export GUILT_BASE and point it at the meta directory when
devshell is invoked for linux-yocto.

(From OE-Core rev: 10546e42a0db6a9585488536e29759239ef6e73b)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11 23:23:31 +01:00
Richard Purdie a246af9bf7 package.bbclass: Drop EXPORT_FUNCTIONS use against mapping_rename_hook
The usage of this function renaming and it being called using
bb.build.exec_func() causes needless indirection loops, confusing log
files and seems generally pointless.

This simplification makes the process much simpler and faster. I can't
come up with a good reason why the export_functions functionality is
needed for this function.

(From OE-Core rev: 74daad03ca29a03b0005f7d2b90a0347d5b583a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11 18:03:31 +01:00
Mark Hatle b85bbc52d3 sstate.bbclass: Improve sstate_installpkg performance
In a pathological case, lots of files to process, the sstate_installpkg
performance was very poor.  It interated over each file and ran 3
individual sed commands per file.  Changing this to keep iterating
but running only a single command took about 1/3 time time.

However, when looking at the corresponding sstate_hardcode_path
function, it was clear we could optimize this further.

Using the same encoding logic to specify only the minimumal sed
operation necessary, and using xargs to avoid the os.system call the
install step was able to be performed in 13% of the original time.

Example timing numbers for perl:

3m7s original code
1m20s single sed, but interating
0m26s using xargs and limited sed

(From OE-Core rev: d9f655753fbdc8cbd8e705577430fed4f23732b3)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11 18:00:27 +01:00
Christopher Larson 49afb622c9 typecheck.bbclass: update per current variable typing code
(From OE-Core rev: 13fcda4b158ce944d64b22bd5b63ce0f51faad67)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11 17:50:50 +01:00