* [PATCH 01/17] alsa-tools: upgrade to 1.0.26.1
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
@ 2013-01-30 14:00 ` Richard Purdie
2013-01-30 14:00 ` [PATCH 02/17] multilib.conf: Use BASELIB to set baselib, not hardcode the value Richard Purdie
` (15 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:00 UTC (permalink / raw)
To: openembedded-core
From: Cristian Iorga <cristian.iorga@intel.com>
Removed the following tools:
- all related to hdsp (required gtk+ and fltk-config)
- ld10k1, qlo10k1 (required QT)
- hdajackretask
Fixed the automake issue for cross-compilation
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
.../{alsa-tools-1.0.25 => alsa-tools}/autotools.patch | 13 +++++++------
.../alsa/{alsa-tools_1.0.25.bb => alsa-tools_1.0.26.1.bb} | 11 +++++++----
2 files changed, 14 insertions(+), 10 deletions(-)
rename meta/recipes-multimedia/alsa/{alsa-tools-1.0.25 => alsa-tools}/autotools.patch (81%)
rename meta/recipes-multimedia/alsa/{alsa-tools_1.0.25.bb => alsa-tools_1.0.26.1.bb} (71%)
diff --git a/meta/recipes-multimedia/alsa/alsa-tools-1.0.25/autotools.patch b/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
similarity index 81%
rename from meta/recipes-multimedia/alsa/alsa-tools-1.0.25/autotools.patch
rename to meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
index c7bc2d6..294e970 100644
--- a/meta/recipes-multimedia/alsa/alsa-tools-1.0.25/autotools.patch
+++ b/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
@@ -19,16 +19,17 @@ diff -ruN alsa-tools-1.0.24.1-orig//ld10k1/gitcompile alsa-tools-1.0.24.1/ld10k1
diff -ruN alsa-tools-1.0.24.1-orig//Makefile alsa-tools-1.0.24.1/Makefile
--- alsa-tools-1.0.24.1-orig//Makefile 2011-07-06 11:27:40.207665000 +0800
+++ alsa-tools-1.0.24.1/Makefile 2011-07-14 15:08:08.877665009 +0800
-@@ -1,9 +1,8 @@
- VERSION = 1.0.24.1
+@@ -1,9 +1,9 @@
+ VERSION = 1.0.26.1
TOP = .
-SUBDIRS = ac3dec as10k1 envy24control hdsploader hdspconf hdspmixer \
- mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
- us428control usx2yloader vxloader echomixer ld10k1 qlo10k1 \
-- hwmixvolume
-+SUBDIRS = ac3dec as10k1 hdsploader mixartloader pcxhrloader sb16_csp \
-+ seq sscape_ctl us428control usx2yloader vxloader ld10k1 \
-+ hwmixvolume
+- hwmixvolume hdajackretask hda-verb
++SUBDIRS = ac3dec as10k1 envy24control \
++ mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
++ us428control usx2yloader vxloader echomixer \
++ hwmixvolume hda-verb
all:
@for i in $(SUBDIRS); do \
diff --git a/meta/recipes-multimedia/alsa/alsa-tools_1.0.25.bb b/meta/recipes-multimedia/alsa/alsa-tools_1.0.26.1.bb
similarity index 71%
rename from meta/recipes-multimedia/alsa/alsa-tools_1.0.25.bb
rename to meta/recipes-multimedia/alsa/alsa-tools_1.0.26.1.bb
index 7d96b85..0fe4bee 100644
--- a/meta/recipes-multimedia/alsa/alsa-tools_1.0.25.bb
+++ b/meta/recipes-multimedia/alsa/alsa-tools_1.0.26.1.bb
@@ -1,5 +1,3 @@
-BROKEN = "1"
-
DESCRIPTION = "Alsa Tools package contains advanced tools for certain sound cards."
HOMEPAGE = "http://www.alsa-project.org"
BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
@@ -15,11 +13,16 @@ LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae1
SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/alsa-tools-${PV}.tar.bz2 \
file://autotools.patch"
-SRC_URI[md5sum] = "57bfec98a814d12e0f7ab379aaeccd87"
-SRC_URI[sha256sum] = "a974d0f3e837796f67d04df88c783aebcf4ac3c5f9ac31e2b65c10e8cb4b1dca"
+SRC_URI[md5sum] = "805526ea5d6c40e1f2c94cee86141230"
+SRC_URI[sha256sum] = "553338693707fe6ddfc430b9edc4cd2677390e200c9e38de82ede3394e733841"
inherit autotools
EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}' ACLOCAL_FLAGS='-I ${STAGING_DATADIR}/aclocal'"
+do_compile_prepend () {
+ #Automake dir is not correctly detected in cross compilation case
+ export AUTOMAKE_DIR=${STAGING_DATADIR_NATIVE}/$(ls ${STAGING_DATADIR_NATIVE} | grep automake)
+}
+
FILES_${PN} += "${datadir}/ld10k1"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 02/17] multilib.conf: Use BASELIB to set baselib, not hardcode the value
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
2013-01-30 14:00 ` [PATCH 01/17] alsa-tools: upgrade to 1.0.26.1 Richard Purdie
@ 2013-01-30 14:00 ` Richard Purdie
2013-01-30 14:00 ` [PATCH 03/17] sstate: Move debug comment to more logical place Richard Purdie
` (14 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:00 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/conf/multilib.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index 97b53ec..f86cff0 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -1,5 +1,5 @@
-baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) or 'INVALID'), True) or 'lib'}"
+baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) or 'INVALID'), True) or d.getVar('BASELIB', True)}"
MULTILIB_VARIANTS = "${@extend_variants(d,'MULTILIBS','multilib')}"
MULTILIB_SAVE_VARNAME = "DEFAULTTUNE"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 03/17] sstate: Move debug comment to more logical place
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
2013-01-30 14:00 ` [PATCH 01/17] alsa-tools: upgrade to 1.0.26.1 Richard Purdie
2013-01-30 14:00 ` [PATCH 02/17] multilib.conf: Use BASELIB to set baselib, not hardcode the value Richard Purdie
@ 2013-01-30 14:00 ` Richard Purdie
2013-01-30 14:00 ` [PATCH 04/17] insane.bbclass: Fix incorrect getVar call Richard Purdie
` (13 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:00 UTC (permalink / raw)
To: openembedded-core
The same log message gets output multiple times in the log which look
confusing and is rather pointless. Move the log message to the correct
level.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/sstate.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index edddd2f..a79d2b5 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -146,8 +146,8 @@ def sstate_install(ss, d):
locks.append(bb.utils.lockfile(lock))
for state in ss['dirs']:
+ bb.debug(2, "Staging files from %s to %s" % (state[1], state[2]))
for walkroot, dirs, files in os.walk(state[1]):
- bb.debug(2, "Staging files from %s to %s" % (state[1], state[2]))
for file in files:
srcpath = os.path.join(walkroot, file)
dstpath = srcpath.replace(state[1], state[2])
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 04/17] insane.bbclass: Fix incorrect getVar call
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (2 preceding siblings ...)
2013-01-30 14:00 ` [PATCH 03/17] sstate: Move debug comment to more logical place Richard Purdie
@ 2013-01-30 14:00 ` Richard Purdie
2013-01-30 14:00 ` [PATCH 05/17] package: Rename splitfile functions to something more descriptive Richard Purdie
` (12 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:00 UTC (permalink / raw)
To: openembedded-core
On a trace I was a bit puzzled why getVar was making 180 calls to len(d).
This is an expensive operation that should be very rarely called and
certainly not by getVar. In perl's do_package it was resulting in
~1.5 million function calls from those 180 cases.
Ultimately this typo was why. Lets fix it and save the CPU cyles.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/insane.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index c5c84b8..015abd5 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -404,7 +404,7 @@ def package_qa_check_arch(path,name,d, elf, messages):
target_os = d.getVar('TARGET_OS', True)
target_arch = d.getVar('TARGET_ARCH', True)
- provides = d.getVar('PROVIDES', d, True)
+ provides = d.getVar('PROVIDES', True)
bpn = d.getVar('BPN', True)
# FIXME: Cross package confuse this check, so just skip them
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 05/17] package: Rename splitfile functions to something more descriptive
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (3 preceding siblings ...)
2013-01-30 14:00 ` [PATCH 04/17] insane.bbclass: Fix incorrect getVar call Richard Purdie
@ 2013-01-30 14:00 ` Richard Purdie
2013-01-30 14:00 ` [PATCH 06/17] package.bbclass: Improve kernel module handling Richard Purdie
` (11 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:00 UTC (permalink / raw)
To: openembedded-core
The splitfile and splitfile2 function names are confusing and the comments
are also misleading, hard to understand or plain incorrect. This tries to
improve things.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/package.bbclass | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 71c6179..0be84ed 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -223,13 +223,12 @@ python () {
d.setVar("PACKAGERDEPTASK", "")
}
-def splitfile(file, debugfile, debugsrcdir, d):
- # Function to split a single file, called from split_and_strip_files below
- # A working 'file' (one which works on the target architecture)
- # is split and the split off portions go to debugfile.
+def splitdebuginfo(file, debugfile, debugsrcdir, d):
+ # Function to split a single file into two components, one is the stripped
+ # target system binary, the other contains any debugging information. The
+ # two files are linked to reference each other.
#
- # The debug information is then processed for src references. These
- # references are copied to debugsrcdir, if defined.
+ # sourcefile is also generated containing a list of debugsources
import commands, stat, subprocess
@@ -267,10 +266,8 @@ def splitfile(file, debugfile, debugsrcdir, d):
return 0
-def splitfile2(debugsrcdir, d):
- # Function to split a single file, called from split_and_strip_files below
- #
- # The debug src information processed in the splitfile2 is further procecessed
+def copydebugsources(debugsrcdir, d):
+ # The debug src information written out to sourcefile is further procecessed
# and copied to the destination here.
import commands, stat, subprocess
@@ -875,7 +872,7 @@ python split_and_strip_files () {
bb.mkdirhier(os.path.dirname(fpath))
#bb.note("Split %s -> %s" % (file, fpath))
# Only store off the hard link reference if we successfully split!
- if splitfile(file, fpath, debugsrcdir, d) == 0 and file_reference != "":
+ if splitdebuginfo(file, fpath, debugsrcdir, d) == 0 and file_reference != "":
file_links[file_reference] = file
# The above may have generated dangling symlinks, remove them!
@@ -899,7 +896,7 @@ python split_and_strip_files () {
# Process the debugsrcdir if requested...
# This copies and places the referenced sources for later debugging...
- splitfile2(debugsrcdir, d)
+ copydebugsources(debugsrcdir, d)
#
# End of debug splitting
#
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 06/17] package.bbclass: Improve kernel module handling
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (4 preceding siblings ...)
2013-01-30 14:00 ` [PATCH 05/17] package: Rename splitfile functions to something more descriptive Richard Purdie
@ 2013-01-30 14:00 ` Richard Purdie
2013-01-30 14:01 ` [PATCH 07/17] package.bbclass: Add a shortcut exit from the mkdir function Richard Purdie
` (10 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:00 UTC (permalink / raw)
To: openembedded-core
Currently the kernel module handling consists of several special cases
and has its own path walking. This refactors the code to handle them in
a more standardised way which is also a bit more efficient.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/package.bbclass | 37 ++++++++++++++++---------------------
1 file changed, 16 insertions(+), 21 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 0be84ed..0f11ba9 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -325,10 +325,6 @@ def runstrip(file, elftype, d):
pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
strip = d.getVar("STRIP", True)
- # Handle kernel modules specifically - .debug directories here are pointless
- if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
- return subprocess.call("%s'%s' --strip-debug --remove-section=.comment --remove-section=.note --preserve-dates '%s'" % (pathprefix, strip, file), shell=True)
-
newmode = None
if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
origmode = os.stat(file)[stat.ST_MODE]
@@ -337,15 +333,14 @@ def runstrip(file, elftype, d):
extraflags = ""
- # split_and_strip_files is calling this with elf_type None, causing:
- # TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'
- if elftype:
- # .so and shared library
- if ".so" in file and elftype & 8:
- extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
- # shared or executable:
- elif elftype & 8 or elftype & 4:
- extraflags = "--remove-section=.comment --remove-section=.note"
+ # .so and shared library
+ if elftype & 16:
+ extraflags = "--strip-debug --remove-section=.comment --remove-section=.note --preserve-dates"
+ elif ".so" in file and elftype & 8:
+ extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
+ # shared or executable:
+ elif elftype & 8 or elftype & 4:
+ extraflags = "--remove-section=.comment --remove-section=.note"
stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
bb.debug(1, "runstrip: %s" % stripcmd)
@@ -749,6 +744,7 @@ python split_and_strip_files () {
# 2 - stripped
# 4 - executable
# 8 - shared library
+ # 16 - kernel module
def isELF(path):
type = 0
pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
@@ -775,11 +771,16 @@ python split_and_strip_files () {
#
file_list = {}
file_links = {}
+ kernmods = []
if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1') and \
(d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
for root, dirs, files in os.walk(dvar):
for f in files:
file = os.path.join(root, f)
+ if file.endswith(".ko") and file.find("/lib/modules/") != -1:
+ kernmods.append(file)
+ continue
+
# Only process files (and symlinks)... Skip files that are obviously debug files
if not (debugappend != "" and file.endswith(debugappend)) and \
not (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])) and \
@@ -910,14 +911,8 @@ python split_and_strip_files () {
elf_file = int(file_list[file][5:])
#bb.note("Strip %s" % file)
runstrip(file, elf_file, d)
-
-
- if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
- for root, dirs, files in os.walk(dvar):
- for f in files:
- if not f.endswith(".ko"):
- continue
- runstrip(os.path.join(root, f), 0, d)
+ for f in kernmods:
+ runstrip(f, 16, d)
#
# End of strip
#
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 07/17] package.bbclass: Add a shortcut exit from the mkdir function
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (5 preceding siblings ...)
2013-01-30 14:00 ` [PATCH 06/17] package.bbclass: Improve kernel module handling Richard Purdie
@ 2013-01-30 14:01 ` Richard Purdie
2013-01-30 14:01 ` [PATCH 08/17] package.bbclass: Check FILES once, not once per loop iteration Richard Purdie
` (9 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:01 UTC (permalink / raw)
To: openembedded-core
The mkdir function iterates over strings with many different operations,
even if ultimately the target already exists. This adds a check to the start
of the function so we don't waste time when the target already exists.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/package.bbclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 0f11ba9..8b256cf 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -997,6 +997,8 @@ python populate_packages () {
seen.append(p)
def mkdir_recurse(src, dest, paths):
+ if os.path.exists(dest + '/' + paths):
+ return
while paths.startswith("./"):
paths = paths[2:]
p = "."
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 08/17] package.bbclass: Check FILES once, not once per loop iteration
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (6 preceding siblings ...)
2013-01-30 14:01 ` [PATCH 07/17] package.bbclass: Add a shortcut exit from the mkdir function Richard Purdie
@ 2013-01-30 14:01 ` Richard Purdie
2013-01-30 14:01 ` [PATCH 09/17] package.bbclass: Avoid copying the datastore for FILES handling Richard Purdie
` (8 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:01 UTC (permalink / raw)
To: openembedded-core
There is no need to check FILES in each loop iteration, we can just check it once
at the start when we read the variable.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/package.bbclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 8b256cf..51ab009 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -961,12 +961,12 @@ python populate_packages () {
bb.data.update_data(localdata)
filesvar = localdata.getVar('FILES', True) or ""
+ if "//" in filesvar:
+ bb.warn("FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg)
+ filesvar.replace("//", "/")
files = filesvar.split()
file_links = {}
for file in files:
- if file.find("//") != -1:
- bb.warn("FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg)
- file.replace("//", "/")
if os.path.isabs(file):
file = '.' + file
if not os.path.islink(file):
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 09/17] package.bbclass: Avoid copying the datastore for FILES handling
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (7 preceding siblings ...)
2013-01-30 14:01 ` [PATCH 08/17] package.bbclass: Check FILES once, not once per loop iteration Richard Purdie
@ 2013-01-30 14:01 ` Richard Purdie
2013-01-30 14:01 ` [PATCH 10/17] package.bbclass: Move PKG handling code to emit_pkgdata Richard Purdie
` (7 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:01 UTC (permalink / raw)
To: openembedded-core
There is no real point in adjusting overrides and creating a copy of the datastore,
just to access a single variable. We can do this just as easily with a slightly
more complicated getVar call. This improves performance.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/package.bbclass | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 51ab009..4e7db9a 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -949,18 +949,10 @@ python populate_packages () {
seen = []
for pkg in package_list:
- localdata = bb.data.createCopy(d)
root = os.path.join(pkgdest, pkg)
bb.mkdirhier(root)
- localdata.setVar('PKG', pkg)
- overrides = localdata.getVar('OVERRIDES', True)
- if not overrides:
- raise bb.build.FuncFailed('OVERRIDES not defined')
- localdata.setVar('OVERRIDES', overrides + ':' + pkg)
- bb.data.update_data(localdata)
-
- filesvar = localdata.getVar('FILES', True) or ""
+ filesvar = d.getVar('FILES_%s' % pkg, True) or d.getVar('FILES', True) or ""
if "//" in filesvar:
bb.warn("FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg)
filesvar.replace("//", "/")
@@ -1023,7 +1015,6 @@ python populate_packages () {
if ret is False or ret == 0:
raise bb.build.FuncFailed("File population failed")
- del localdata
os.chdir(workdir)
unshipped = []
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 10/17] package.bbclass: Move PKG handling code to emit_pkgdata
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (8 preceding siblings ...)
2013-01-30 14:01 ` [PATCH 09/17] package.bbclass: Avoid copying the datastore for FILES handling Richard Purdie
@ 2013-01-30 14:01 ` Richard Purdie
2013-01-30 14:01 ` [PATCH 11/17] package.bbclass: Split out package_fixsymlinks function Richard Purdie
` (6 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:01 UTC (permalink / raw)
To: openembedded-core
We only use the PKG variable in emit_pkgdata so we might as well move the
fallback code there, allowing restructuring of other parts of the metadata.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/package.bbclass | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 4e7db9a..858afbd 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1038,11 +1038,6 @@ python populate_packages () {
bb.build.exec_func("package_name_hook", d)
- for pkg in package_list:
- pkgname = d.getVar('PKG_%s' % pkg, True)
- if pkgname is None:
- d.setVar('PKG_%s' % pkg, pkg)
-
dangling_links = {}
pkg_files = {}
for pkg in package_list:
@@ -1154,6 +1149,11 @@ python emit_pkgdata() {
for pkg in packages.split():
subdata_file = pkgdatadir + "/runtime/%s" % pkg
+ pkgval = d.getVar('PKG_%s' % pkg, True)
+ if pkgval is None:
+ pkgval = pkg
+ d.setVar('PKG_%s' % pkg, pkg)
+
sf = open(subdata_file, 'w')
write_if_exists(sf, pkg, 'PN')
write_if_exists(sf, pkg, 'PV')
@@ -1189,7 +1189,6 @@ python emit_pkgdata() {
sf.close()
# Symlinks needed for reverse lookups (from the final package name)
- pkgval = d.getVar('PKG_%s' % (pkg), True)
subdata_sym = pkgdatadir + "/runtime-reverse/%s" % pkgval
oe.path.symlink("../runtime/%s" % pkg, subdata_sym, True)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 00/17] Packaging performance improvements
@ 2013-01-30 14:01 Richard Purdie
2013-01-30 14:00 ` [PATCH 01/17] alsa-tools: upgrade to 1.0.26.1 Richard Purdie
` (16 more replies)
0 siblings, 17 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:01 UTC (permalink / raw)
To: openembedded-core
The following patch series contains a number of packaging improvements along
with a couple of bugfixes (one multilib, one directfb).
The following changes since commit cf05c4578c99c0cb885cf2706f7f2b39b100aeb8:
module.bbclass: Don't add pkg_postinst/pkg_prerm to all packages in recipe (2013-01-29 23:51:59 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core master-next
http://cgit.openembedded.org/cgit.cgi/openembedded-core/log/?h=master-next
Richard Purdie (16):
multilib.conf: Use BASELIB to set baselib, not hardcode the value
sstate: Move debug comment to more logical place
insane.bbclass: Fix incorrect getVar call
package: Rename splitfile functions to something more descriptive
package.bbclass: Improve kernel module handling
package.bbclass: Add a shortcut exit from the mkdir function
package.bbclass: Check FILES once, not once per loop iteration
package.bbclass: Avoid copying the datastore for FILES handling
package.bbclass: Move PKG handling code to emit_pkgdata
package.bbclass: Split out package_fixsymlinks function
package.bbclass: Tweak PACKAGEFUNCS
package.bbclass: Improve package_fixsymlinks
package: Create global package file list and use throughout
PACKAGEFUNCS
package.bbclass: Use expanded RDEPENDS in read_shlibdeps
package_ipk/deb/rpm: Ensure deploy staging directory is empty before
rerunning task
directfb: Explictly disable mesa
meta/classes/buildhistory.bbclass | 11 +-
meta/classes/debian.bbclass | 28 ++-
meta/classes/insane.bbclass | 6 +-
meta/classes/package.bbclass | 202 ++++++++++----------
meta/classes/package_deb.bbclass | 1 +
meta/classes/package_ipk.bbclass | 1 +
meta/classes/package_rpm.bbclass | 1 +
meta/classes/sstate.bbclass | 2 +-
meta/conf/multilib.conf | 2 +-
meta/recipes-graphics/directfb/directfb.inc | 1 +
12 files changed, 141 insertions(+), 138 deletions(-)
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 11/17] package.bbclass: Split out package_fixsymlinks function
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (9 preceding siblings ...)
2013-01-30 14:01 ` [PATCH 10/17] package.bbclass: Move PKG handling code to emit_pkgdata Richard Purdie
@ 2013-01-30 14:01 ` Richard Purdie
2013-01-31 18:57 ` Saul Wold
2013-01-30 14:01 ` [PATCH 12/17] package.bbclass: Tweak PACKAGEFUNCS Richard Purdie
` (5 subsequent siblings)
16 siblings, 1 reply; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:01 UTC (permalink / raw)
To: openembedded-core
The symlink handling code doesn't need to being part of populate_packages
and is logically separate so split it out into a separate function,
package_fixsymlinks.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/package.bbclass | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 858afbd..8bf80f5 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -919,7 +919,7 @@ python split_and_strip_files () {
}
python populate_packages () {
- import glob, stat, errno, re, subprocess
+ import glob, re, subprocess
workdir = d.getVar('WORKDIR', True)
outdir = d.getVar('DEPLOY_DIR', True)
@@ -1037,10 +1037,17 @@ python populate_packages () {
package_qa_handle_error("installed_vs_shipped", msg, d)
bb.build.exec_func("package_name_hook", d)
+}
+populate_packages[dirs] = "${D}"
+
+python package_fixsymlinks () {
+ import errno
+ pkgdest = d.getVar('PKGDEST', True)
+ packages = d.getVar("PACKAGES").split()
dangling_links = {}
pkg_files = {}
- for pkg in package_list:
+ for pkg in packages:
dangling_links[pkg] = []
pkg_files[pkg] = []
inst_root = os.path.join(pkgdest, pkg)
@@ -1059,13 +1066,13 @@ python populate_packages () {
target = os.path.join(root[len(inst_root):], target)
dangling_links[pkg].append(os.path.normpath(target))
- for pkg in package_list:
+ for pkg in packages:
rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
for l in dangling_links[pkg]:
found = False
bb.debug(1, "%s contains dangling link %s" % (pkg, l))
- for p in package_list:
+ for p in packages:
for f in pkg_files[p]:
if f == l:
found = True
@@ -1079,7 +1086,6 @@ python populate_packages () {
bb.note("%s contains dangling symlink to %s" % (pkg, l))
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
}
-populate_packages[dirs] = "${D}"
PKGDESTWORK = "${WORKDIR}/pkgdata"
@@ -1842,6 +1848,7 @@ PACKAGEFUNCS ?= "package_get_auto_pr \
split_and_strip_files \
fixup_perms \
populate_packages \
+ package_fixsymlinks \
package_do_filedeps \
package_do_shlibs \
package_do_pkgconfig \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 12/17] package.bbclass: Tweak PACKAGEFUNCS
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (10 preceding siblings ...)
2013-01-30 14:01 ` [PATCH 11/17] package.bbclass: Split out package_fixsymlinks function Richard Purdie
@ 2013-01-30 14:01 ` Richard Purdie
2013-01-30 14:01 ` [PATCH 13/17] package.bbclass: Improve package_fixsymlinks Richard Purdie
` (4 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:01 UTC (permalink / raw)
To: openembedded-core
Move package_rename_hook call into PACKAGEFUNCS and also move package_get_auto_pr
to a more appropriate execution point, grouping package metadata handling
functions together.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/package.bbclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 8bf80f5..2f1695b 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1035,8 +1035,6 @@ python populate_packages () {
for f in unshipped:
msg = msg + "\n " + f
package_qa_handle_error("installed_vs_shipped", msg, d)
-
- bb.build.exec_func("package_name_hook", d)
}
populate_packages[dirs] = "${D}"
@@ -1841,13 +1839,15 @@ def gen_packagevar(d):
return " ".join(ret)
PACKAGE_PREPROCESS_FUNCS ?= ""
-PACKAGEFUNCS ?= "package_get_auto_pr \
+PACKAGEFUNCS ?= " \
perform_packagecopy \
${PACKAGE_PREPROCESS_FUNCS} \
package_do_split_locales \
split_and_strip_files \
fixup_perms \
populate_packages \
+ package_name_hook \
+ package_get_auto_pr \
package_fixsymlinks \
package_do_filedeps \
package_do_shlibs \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 13/17] package.bbclass: Improve package_fixsymlinks
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (11 preceding siblings ...)
2013-01-30 14:01 ` [PATCH 12/17] package.bbclass: Tweak PACKAGEFUNCS Richard Purdie
@ 2013-01-30 14:01 ` Richard Purdie
2013-01-30 14:01 ` [PATCH 14/17] package: Create global package file list and use throughout PACKAGEFUNCS Richard Purdie
` (3 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:01 UTC (permalink / raw)
To: openembedded-core
Improve package_fixsymlinks so we don't handle RDEPENDS for every single package
in PACKAGES.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/package.bbclass | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 2f1695b..1ccac9c 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1064,24 +1064,29 @@ python package_fixsymlinks () {
target = os.path.join(root[len(inst_root):], target)
dangling_links[pkg].append(os.path.normpath(target))
- for pkg in packages:
- rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
-
+ newrdepends = {}
+ for pkg in dangling_links:
for l in dangling_links[pkg]:
found = False
bb.debug(1, "%s contains dangling link %s" % (pkg, l))
for p in packages:
- for f in pkg_files[p]:
- if f == l:
+ if l in pkg_files[p]:
found = True
bb.debug(1, "target found in %s" % p)
if p == pkg:
break
- if p not in rdepends:
- rdepends[p] = []
+ if pkg not in newrdepends:
+ newrdepends[pkg] = []
+ newrdepends[pkg].append(p)
break
if found == False:
bb.note("%s contains dangling symlink to %s" % (pkg, l))
+
+ for pkg in newrdepends:
+ rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
+ for p in newrdepends[pkg]:
+ if p not in rdepends:
+ rdepends[p] = []
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 14/17] package: Create global package file list and use throughout PACKAGEFUNCS
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (12 preceding siblings ...)
2013-01-30 14:01 ` [PATCH 13/17] package.bbclass: Improve package_fixsymlinks Richard Purdie
@ 2013-01-30 14:01 ` Richard Purdie
2013-01-30 14:01 ` [PATCH 15/17] package.bbclass: Use expanded RDEPENDS in read_shlibdeps Richard Purdie
` (2 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:01 UTC (permalink / raw)
To: openembedded-core
Currently we do a signficant amount of tree traversal in many different places
which in inefficient. We can assume that the files don't change and cache the
file list which gives an efficiency improvement which this patch does using
a global variable.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/buildhistory.bbclass | 11 +++---
meta/classes/debian.bbclass | 28 +++++++------
meta/classes/insane.bbclass | 4 +-
meta/classes/package.bbclass | 78 +++++++++++++++++++------------------
4 files changed, 60 insertions(+), 61 deletions(-)
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 4b80f07..a6fbd68 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -199,12 +199,11 @@ python buildhistory_emit_pkghistory() {
pkgdestpkg = os.path.join(pkgdest, pkg)
filelist = []
pkginfo.size = 0
- for root, dirs, files in os.walk(pkgdestpkg):
- relpth = os.path.relpath(root, pkgdestpkg)
- for f in files:
- fstat = os.lstat(os.path.join(root, f))
- pkginfo.size += fstat.st_size
- filelist.append(os.sep + os.path.join(relpth, f))
+ for f in pkgfiles[pkg]:
+ relpth = os.path.relpath(f, pkgdestpkg)
+ fstat = os.lstat(f)
+ pkginfo.size += fstat.st_size
+ filelist.append(os.sep + relpth)
filelist.sort()
pkginfo.filelist = " ".join(filelist)
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass
index 45f01e4..d7ea151 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -51,23 +51,21 @@ python debian_package_name_hook () {
sonames = []
has_bins = 0
has_libs = 0
- pkg_dir = os.path.join(pkgdest, orig_pkg)
- for root, dirs, files in os.walk(pkg_dir):
- if bin_re.match(root) and files:
+ for file in pkgfiles[orig_pkg]:
+ root = os.path.dirname(file)
+ if bin_re.match(root):
has_bins = 1
- if lib_re.match(root) and files:
+ if lib_re.match(root):
has_libs = 1
- for f in files:
- if so_re.match(f):
- fp = os.path.join(root, f)
- cmd = (d.getVar('TARGET_PREFIX', True) or "") + "objdump -p " + fp + " 2>/dev/null"
- fd = os.popen(cmd)
- lines = fd.readlines()
- fd.close()
- for l in lines:
- m = re.match("\s+SONAME\s+([^\s]*)", l)
- if m and not m.group(1) in sonames:
- sonames.append(m.group(1))
+ if so_re.match(os.path.basename(file)):
+ cmd = (d.getVar('TARGET_PREFIX', True) or "") + "objdump -p " + file + " 2>/dev/null"
+ fd = os.popen(cmd)
+ lines = fd.readlines()
+ fd.close()
+ for l in lines:
+ m = re.match("\s+SONAME\s+([^\s]*)", l)
+ if m and not m.group(1) in sonames:
+ sonames.append(m.group(1))
bb.debug(1, 'LIBNAMES: pkg %s libs %d bins %d sonames %s' % (orig_pkg, has_libs, has_bins, sonames))
soname = None
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 015abd5..f532a53 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -660,9 +660,7 @@ def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d):
warnings = []
errors = []
- for root, dirs, files in os.walk(path):
- for file in files:
- path = os.path.join(root,file)
+ for path in pkgfiles[package]:
elf = oe.qa.ELFFile(path)
try:
elf.open()
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 1ccac9c..5f6cf80 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1049,9 +1049,7 @@ python package_fixsymlinks () {
dangling_links[pkg] = []
pkg_files[pkg] = []
inst_root = os.path.join(pkgdest, pkg)
- for root, dirs, files in os.walk(inst_root):
- for f in files:
- path = os.path.join(root, f)
+ for path in pkgfiles[pkg]:
rpath = path[len(inst_root):]
pkg_files[pkg].append(rpath)
try:
@@ -1061,7 +1059,7 @@ python package_fixsymlinks () {
raise
target = os.readlink(path)
if target[0] != '/':
- target = os.path.join(root[len(inst_root):], target)
+ target = os.path.join(os.path.dirname(path)[len(inst_root):], target)
dangling_links[pkg].append(os.path.normpath(target))
newrdepends = {}
@@ -1307,12 +1305,8 @@ python package_do_filedeps() {
provides_files = []
requires_files = []
- rpfiles = []
- for root, dirs, files in os.walk(pkgdest + "/" + pkg):
- for file in files:
- rpfiles.append(os.path.join(root, file))
- for files in chunks(rpfiles, 100):
+ for files in chunks(pkgfiles[pkg], 100):
dep_pipe = os.popen(rpmdeps + " " + " ".join(files))
process_deps(dep_pipe, pkg, provides_files, requires_files)
@@ -1362,9 +1356,9 @@ python package_do_shlibs() {
# Take shared lock since we're only reading, not writing
lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
- def linux_so(root, path, file):
+ def linux_so(file):
needs_ldconfig = False
- cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file)) + " 2>/dev/null"
+ cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(file) + " 2>/dev/null"
cmd = "PATH=\"%s\" %s" % (d.getVar('PATH', True), cmd)
fd = os.popen(cmd)
lines = fd.readlines()
@@ -1381,15 +1375,14 @@ python package_do_shlibs() {
# if library is private (only used by package) then do not build shlib for it
if not private_libs or -1 == private_libs.find(this_soname):
sonames.append(this_soname)
- if libdir_re.match(root):
+ if libdir_re.match(os.path.dirname(file)):
needs_ldconfig = True
- if snap_symlinks and (file != this_soname):
- renames.append((os.path.join(root, file), os.path.join(root, this_soname)))
+ if snap_symlinks and (os.path.basename(file) != this_soname):
+ renames.append((file, os.path.join(os.path.dirname(file), this_soname)))
return needs_ldconfig
- def darwin_so(root, path, file):
- fullpath = os.path.join(root, file)
- if not os.path.exists(fullpath):
+ def darwin_so(file):
+ if not os.path.exists(file):
return
def get_combinations(base):
@@ -1414,7 +1407,7 @@ python package_do_shlibs() {
if not combo in sonames:
sonames.append(combo)
if file.endswith('.dylib') or file.endswith('.so'):
- lafile = fullpath.replace(os.path.join(pkgdest, pkg), d.getVar('PKGD', True))
+ lafile = file.replace(os.path.join(pkgdest, pkg), d.getVar('PKGD', True))
# Drop suffix
lafile = lafile.rsplit(".",1)[0]
lapath = os.path.dirname(lafile)
@@ -1427,7 +1420,7 @@ python package_do_shlibs() {
lafile = lapath + '/' + combo + '.la'
#bb.note("Foo2: %s" % lafile)
- #bb.note("Foo %s %s" % (file, fullpath))
+ #bb.note("Foo %s" % file)
if os.path.exists(lafile):
fd = open(lafile, 'r')
lines = fd.readlines()
@@ -1475,17 +1468,14 @@ python package_do_shlibs() {
needed[pkg] = []
sonames = list()
renames = list()
- top = os.path.join(pkgdest, pkg)
- for root, dirs, files in os.walk(top):
- for file in files:
+ for file in pkgfiles[pkg]:
soname = None
- path = os.path.join(root, file)
- if os.path.islink(path):
+ if os.path.islink(file):
continue
if targetos == "darwin" or targetos == "darwin8":
- darwin_so(root, dirs, file)
- elif os.access(path, os.X_OK) or lib_re.match(file):
- ldconfig = linux_so(root, dirs, file)
+ darwin_so(file)
+ elif os.access(file, os.X_OK) or lib_re.match(file):
+ ldconfig = linux_so(file)
needs_ldconfig = needs_ldconfig or ldconfig
for (old, new) in renames:
bb.note("Renaming %s to %s" % (old, new))
@@ -1594,18 +1584,15 @@ python package_do_pkgconfig () {
for pkg in packages.split():
pkgconfig_provided[pkg] = []
pkgconfig_needed[pkg] = []
- top = os.path.join(pkgdest, pkg)
- for root, dirs, files in os.walk(top):
- for file in files:
+ for file in pkgfiles[pkg]:
m = pc_re.match(file)
if m:
pd = bb.data.init()
name = m.group(1)
pkgconfig_provided[pkg].append(name)
- path = os.path.join(root, file)
- if not os.access(path, os.R_OK):
+ if not os.access(file, os.R_OK):
continue
- f = open(path, 'r')
+ f = open(file, 'r')
lines = f.readlines()
f.close()
for l in lines:
@@ -1844,16 +1831,19 @@ def gen_packagevar(d):
return " ".join(ret)
PACKAGE_PREPROCESS_FUNCS ?= ""
-PACKAGEFUNCS ?= " \
+# Functions for setting up PKGD
+PACKAGEBUILDPKGD ?= " \
perform_packagecopy \
${PACKAGE_PREPROCESS_FUNCS} \
- package_do_split_locales \
split_and_strip_files \
fixup_perms \
- populate_packages \
+ package_do_split_locales \
+ populate_packages"
+# Functions which process metadata based on split packages
+PACKAGEFUNCS ?= " \
+ package_fixsymlinks \
package_name_hook \
package_get_auto_pr \
- package_fixsymlinks \
package_do_filedeps \
package_do_shlibs \
package_do_pkgconfig \
@@ -1883,6 +1873,20 @@ python do_package () {
bb.error("WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package")
return
+ for f in (d.getVar('PACKAGEBUILDPKGD', True) or '').split():
+ bb.build.exec_func(f, d)
+
+ # Build global list of files in each split package
+ global pkgfiles
+ pkgfiles = {}
+ packages = d.getVar('PACKAGES', True).split()
+ pkgdest = d.getVar('PKGDEST', True)
+ for pkg in packages:
+ pkgfiles[pkg] = []
+ for walkroot, dirs, files in os.walk(pkgdest + "/" + pkg):
+ for file in files:
+ pkgfiles[pkg].append(walkroot + os.sep + file)
+
for f in (d.getVar('PACKAGEFUNCS', True) or '').split():
bb.build.exec_func(f, d)
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 15/17] package.bbclass: Use expanded RDEPENDS in read_shlibdeps
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (13 preceding siblings ...)
2013-01-30 14:01 ` [PATCH 14/17] package: Create global package file list and use throughout PACKAGEFUNCS Richard Purdie
@ 2013-01-30 14:01 ` Richard Purdie
2013-01-30 14:01 ` [PATCH 16/17] package_ipk/deb/rpm: Ensure deploy staging directory is empty before rerunning task Richard Purdie
2013-01-30 14:01 ` [PATCH 17/17] directfb: Explictly disable mesa Richard Purdie
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:01 UTC (permalink / raw)
To: openembedded-core
We may as well expand the RDEPENDS when reading and writing as this function does.
if we don't do this, we could accidentally duplicate data and it also turns out
to be much less efficient.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/package.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 5f6cf80..fec3db6 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1680,7 +1680,7 @@ python read_shlibdeps () {
packages = d.getVar('PACKAGES', True).split()
for pkg in packages:
- rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "")
+ rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
for dep in pkglibdeps[pkg]:
# Add the dep if it's not already there, or if no comparison is set
if dep not in rdepends:
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 16/17] package_ipk/deb/rpm: Ensure deploy staging directory is empty before rerunning task
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (14 preceding siblings ...)
2013-01-30 14:01 ` [PATCH 15/17] package.bbclass: Use expanded RDEPENDS in read_shlibdeps Richard Purdie
@ 2013-01-30 14:01 ` Richard Purdie
2013-01-30 14:01 ` [PATCH 17/17] directfb: Explictly disable mesa Richard Purdie
16 siblings, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:01 UTC (permalink / raw)
To: openembedded-core
If we don't do this, stale files can build up, particularly with the PR
server.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/package_deb.bbclass | 1 +
meta/classes/package_ipk.bbclass | 1 +
meta/classes/package_rpm.bbclass | 1 +
3 files changed, 3 insertions(+)
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index ac8c9f3..5740948 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -452,6 +452,7 @@ python do_package_write_deb () {
bb.build.exec_func("do_package_deb", d)
}
do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}"
+do_package_write_deb[cleandirs] = "${PKGWRITEDIRDEB}"
do_package_write_deb[umask] = "022"
addtask package_write_deb before do_package_write after do_packagedata do_package
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index ad4ea53..433d0bb 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -476,6 +476,7 @@ python do_package_write_ipk () {
bb.build.exec_func("do_package_ipk", d)
}
do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}"
+do_package_write_ipk[cleandirs] = "${PKGWRITEDIRIPK}"
do_package_write_ipk[umask] = "022"
addtask package_write_ipk before do_package_write after do_packagedata do_package
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index af51d80..8ea2bbe 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -1125,6 +1125,7 @@ python do_package_write_rpm () {
}
do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}"
+do_package_write_rpm[cleandirs] = "${PKGWRITEDIRRPM}"
do_package_write_rpm[umask] = "022"
addtask package_write_rpm before do_package_write after do_packagedata do_package
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 17/17] directfb: Explictly disable mesa
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
` (15 preceding siblings ...)
2013-01-30 14:01 ` [PATCH 16/17] package_ipk/deb/rpm: Ensure deploy staging directory is empty before rerunning task Richard Purdie
@ 2013-01-30 14:01 ` Richard Purdie
2013-01-30 14:43 ` Ian Geiser
16 siblings, 1 reply; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:01 UTC (permalink / raw)
To: openembedded-core
Without this, directfb might build with mesa enabled if present.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/recipes-graphics/directfb/directfb.inc | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-graphics/directfb/directfb.inc b/meta/recipes-graphics/directfb/directfb.inc
index c9b8ff8..aecc834 100644
--- a/meta/recipes-graphics/directfb/directfb.inc
+++ b/meta/recipes-graphics/directfb/directfb.inc
@@ -31,6 +31,7 @@ EXTRA_OECONF = "\
--enable-sdl=no \
--enable-vnc=no \
--disable-x11 \
+ --disable-mesa \
"
#PACKAGES_DYNAMIC += "^directfb-inputdrivers-.*"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PATCH 17/17] directfb: Explictly disable mesa
2013-01-30 14:01 ` [PATCH 17/17] directfb: Explictly disable mesa Richard Purdie
@ 2013-01-30 14:43 ` Ian Geiser
2013-01-30 14:52 ` Burton, Ross
2013-01-30 14:52 ` Richard Purdie
0 siblings, 2 replies; 23+ messages in thread
From: Ian Geiser @ 2013-01-30 14:43 UTC (permalink / raw)
To: openembedded-core@lists.openembedded.org
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Richard Purdie
> Sent: Wednesday, January 30, 2013 9:01 AM
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 17/17] directfb: Explictly disable mesa
>
> Without this, directfb might build with mesa enabled if present.
>
Is it possible to make this tunable? We use directfb with the mesa dri drivers for opengl. Maybe enable it only if the distro features contains opengl?
Thanks!
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 17/17] directfb: Explictly disable mesa
2013-01-30 14:43 ` Ian Geiser
2013-01-30 14:52 ` Burton, Ross
@ 2013-01-30 14:52 ` Richard Purdie
1 sibling, 0 replies; 23+ messages in thread
From: Richard Purdie @ 2013-01-30 14:52 UTC (permalink / raw)
To: Ian Geiser; +Cc: openembedded-core@lists.openembedded.org
On Wed, 2013-01-30 at 09:43 -0500, Ian Geiser wrote:
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org
> > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> > Richard Purdie
> > Sent: Wednesday, January 30, 2013 9:01 AM
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH 17/17] directfb: Explictly disable mesa
> >
> > Without this, directfb might build with mesa enabled if present.
> >
> Is it possible to make this tunable? We use directfb with the mesa
> dri drivers for opengl. Maybe enable it only if the distro features
> contains opengl?
I'll take patches to make it controlled by PACKAGECONFIG, probably with
the default of mesa disabled for now.
For the immediate build failures it was causing I pushed a patch to make
the configure options match DEPENDS.
Cheers,
Richard
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 17/17] directfb: Explictly disable mesa
2013-01-30 14:43 ` Ian Geiser
@ 2013-01-30 14:52 ` Burton, Ross
2013-01-30 14:57 ` Ian Geiser
2013-01-30 14:52 ` Richard Purdie
1 sibling, 1 reply; 23+ messages in thread
From: Burton, Ross @ 2013-01-30 14:52 UTC (permalink / raw)
To: Ian Geiser; +Cc: openembedded-core@lists.openembedded.org
On 30 January 2013 14:43, Ian Geiser <igeiser@devonit.com> wrote:
>> Without this, directfb might build with mesa enabled if present.
>>
> Is it possible to make this tunable? We use directfb with the mesa dri drivers for opengl. Maybe enable it only if the distro features contains opengl?
I was just saying to Richard that if someone wants it, we can enable it.
Basing on the "opengl" distro feature makes some sense, as long as
people are aware of the interaction between directfb and opengl,
especially on platforms where Mesa may not be the GL implementation.
An alternative would be to make it a non-default PACKAGECONFIG option,
so you can enable it because you know that you have Mesa as your GL
provider.
Ross
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 17/17] directfb: Explictly disable mesa
2013-01-30 14:52 ` Burton, Ross
@ 2013-01-30 14:57 ` Ian Geiser
0 siblings, 0 replies; 23+ messages in thread
From: Ian Geiser @ 2013-01-30 14:57 UTC (permalink / raw)
To: openembedded-core@lists.openembedded.org
> -----Original Message-----
> From: Burton, Ross [mailto:ross.burton@intel.com]
> Sent: Wednesday, January 30, 2013 9:53 AM
> To: Ian Geiser
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH 17/17] directfb: Explictly disable mesa
>
> On 30 January 2013 14:43, Ian Geiser <igeiser@devonit.com> wrote:
> >> Without this, directfb might build with mesa enabled if present.
> >>
> > Is it possible to make this tunable? We use directfb with the mesa
> dri drivers for opengl. Maybe enable it only if the distro features
> contains opengl?
>
> I was just saying to Richard that if someone wants it, we can enable
> it.
>
> Basing on the "opengl" distro feature makes some sense, as long as
> people are aware of the interaction between directfb and opengl,
> especially on platforms where Mesa may not be the GL implementation.
>
> An alternative would be to make it a non-default PACKAGECONFIG option,
> so you can enable it because you know that you have Mesa as your GL
> provider.
Now that you suggest it I like the PACKAGECONFIG option because its trivial to work with from the distro without impacting other things. It also streamlines the dependencies and configure options. Thanks!
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 11/17] package.bbclass: Split out package_fixsymlinks function
2013-01-30 14:01 ` [PATCH 11/17] package.bbclass: Split out package_fixsymlinks function Richard Purdie
@ 2013-01-31 18:57 ` Saul Wold
0 siblings, 0 replies; 23+ messages in thread
From: Saul Wold @ 2013-01-31 18:57 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On 01/30/2013 06:01 AM, Richard Purdie wrote:
> The symlink handling code doesn't need to being part of populate_packages
> and is logically separate so split it out into a separate function,
> package_fixsymlinks.
>
Not sure why, this patch causes a problem with the hicolor-icon-theme.
The problem I see is:
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
> ERROR: 0127: bb.note("adding hicolor-icon-theme dependency to %s" % pkg)
> ERROR: 0128: rdepends = d.getVar('RDEPENDS_%s' % pkg, True)
> ERROR: *** 0129: rdepends = rdepends + ' ' + d.getVar('MLPREFIX') + "hicolor-icon-t
In this case the rdepends is a NoneType.
I have a patch on the queue that solves the problem. I changed the lines
above to use d.appendVar().
Sau!
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> meta/classes/package.bbclass | 17 ++++++++++++-----
> 1 file changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 858afbd..8bf80f5 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -919,7 +919,7 @@ python split_and_strip_files () {
> }
>
> python populate_packages () {
> - import glob, stat, errno, re, subprocess
> + import glob, re, subprocess
>
> workdir = d.getVar('WORKDIR', True)
> outdir = d.getVar('DEPLOY_DIR', True)
> @@ -1037,10 +1037,17 @@ python populate_packages () {
> package_qa_handle_error("installed_vs_shipped", msg, d)
>
> bb.build.exec_func("package_name_hook", d)
> +}
> +populate_packages[dirs] = "${D}"
> +
> +python package_fixsymlinks () {
> + import errno
> + pkgdest = d.getVar('PKGDEST', True)
> + packages = d.getVar("PACKAGES").split()
>
> dangling_links = {}
> pkg_files = {}
> - for pkg in package_list:
> + for pkg in packages:
> dangling_links[pkg] = []
> pkg_files[pkg] = []
> inst_root = os.path.join(pkgdest, pkg)
> @@ -1059,13 +1066,13 @@ python populate_packages () {
> target = os.path.join(root[len(inst_root):], target)
> dangling_links[pkg].append(os.path.normpath(target))
>
> - for pkg in package_list:
> + for pkg in packages:
> rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
>
> for l in dangling_links[pkg]:
> found = False
> bb.debug(1, "%s contains dangling link %s" % (pkg, l))
> - for p in package_list:
> + for p in packages:
> for f in pkg_files[p]:
> if f == l:
> found = True
> @@ -1079,7 +1086,6 @@ python populate_packages () {
> bb.note("%s contains dangling symlink to %s" % (pkg, l))
> d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
> }
> -populate_packages[dirs] = "${D}"
>
> PKGDESTWORK = "${WORKDIR}/pkgdata"
>
> @@ -1842,6 +1848,7 @@ PACKAGEFUNCS ?= "package_get_auto_pr \
> split_and_strip_files \
> fixup_perms \
> populate_packages \
> + package_fixsymlinks \
> package_do_filedeps \
> package_do_shlibs \
> package_do_pkgconfig \
>
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2013-01-31 19:13 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
2013-01-30 14:00 ` [PATCH 01/17] alsa-tools: upgrade to 1.0.26.1 Richard Purdie
2013-01-30 14:00 ` [PATCH 02/17] multilib.conf: Use BASELIB to set baselib, not hardcode the value Richard Purdie
2013-01-30 14:00 ` [PATCH 03/17] sstate: Move debug comment to more logical place Richard Purdie
2013-01-30 14:00 ` [PATCH 04/17] insane.bbclass: Fix incorrect getVar call Richard Purdie
2013-01-30 14:00 ` [PATCH 05/17] package: Rename splitfile functions to something more descriptive Richard Purdie
2013-01-30 14:00 ` [PATCH 06/17] package.bbclass: Improve kernel module handling Richard Purdie
2013-01-30 14:01 ` [PATCH 07/17] package.bbclass: Add a shortcut exit from the mkdir function Richard Purdie
2013-01-30 14:01 ` [PATCH 08/17] package.bbclass: Check FILES once, not once per loop iteration Richard Purdie
2013-01-30 14:01 ` [PATCH 09/17] package.bbclass: Avoid copying the datastore for FILES handling Richard Purdie
2013-01-30 14:01 ` [PATCH 10/17] package.bbclass: Move PKG handling code to emit_pkgdata Richard Purdie
2013-01-30 14:01 ` [PATCH 11/17] package.bbclass: Split out package_fixsymlinks function Richard Purdie
2013-01-31 18:57 ` Saul Wold
2013-01-30 14:01 ` [PATCH 12/17] package.bbclass: Tweak PACKAGEFUNCS Richard Purdie
2013-01-30 14:01 ` [PATCH 13/17] package.bbclass: Improve package_fixsymlinks Richard Purdie
2013-01-30 14:01 ` [PATCH 14/17] package: Create global package file list and use throughout PACKAGEFUNCS Richard Purdie
2013-01-30 14:01 ` [PATCH 15/17] package.bbclass: Use expanded RDEPENDS in read_shlibdeps Richard Purdie
2013-01-30 14:01 ` [PATCH 16/17] package_ipk/deb/rpm: Ensure deploy staging directory is empty before rerunning task Richard Purdie
2013-01-30 14:01 ` [PATCH 17/17] directfb: Explictly disable mesa Richard Purdie
2013-01-30 14:43 ` Ian Geiser
2013-01-30 14:52 ` Burton, Ross
2013-01-30 14:57 ` Ian Geiser
2013-01-30 14:52 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox