Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/5] extsdk bug fixes and minimal type addition
@ 2016-02-04 20:31 Randy Witt
  2016-02-04 20:31 ` [PATCH 1/5] copy_buildsystem.py: Pass the nativelsb argument to gen-lockedsig-cache Randy Witt
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Randy Witt @ 2016-02-04 20:31 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit b33e440cc6fbd703e8045d94b806790343e72eb6:

  libical: Work around hardcoded paths in pkgconfig file (2016-02-04 13:09:56 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib fcef7183f0ac9ab38715bb0c0a80109696d79b2d
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=fcef7183f0ac9ab38715bb0c0a80109696d79b2d

Randy Witt (5):
  copy_buildsystem.py: Pass the nativelsb argument to
    gen-lockedsig-cache
  toolchain-scripts.bbclass: Use PYTHONPATH instead of PYTHONHOME
  populate_sdk_ext: Don't set sdk_update_targets in the config
  populate_sdk_ext: Add support for a "minimal" type
  populate_sdk_ext: Make populate_sdk_ext depend on sdk_extra_conf

 meta/classes/populate_sdk_ext.bbclass  | 21 +++++++++++----------
 meta/classes/toolchain-scripts.bbclass |  2 +-
 meta/lib/oe/copy_buildsystem.py        |  9 ++++++++-
 3 files changed, 20 insertions(+), 12 deletions(-)

-- 
2.5.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/5] copy_buildsystem.py: Pass the nativelsb argument to gen-lockedsig-cache
  2016-02-04 20:31 [PATCH 0/5] extsdk bug fixes and minimal type addition Randy Witt
@ 2016-02-04 20:31 ` Randy Witt
  2016-02-04 20:31 ` [PATCH 2/5] toolchain-scripts.bbclass: Use PYTHONPATH instead of PYTHONHOME Randy Witt
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Randy Witt @ 2016-02-04 20:31 UTC (permalink / raw)
  To: openembedded-core

If the nativelsb argument is not used, then create_locked_sstate_cache()
can get collisions when moving the files from the input_sstate_cache
to the output_sstate_cache.

The specific case where this was encountered was when a "universal"
nativelsb directory already existed in the input_sstate_cache.

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
---
 meta/lib/oe/copy_buildsystem.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index fb51b51..0627461 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -154,4 +154,11 @@ def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cac
     if fixedlsbstring:
         nativedir = output_sstate_cache + '/' + nativelsbstring
         if os.path.isdir(nativedir):
-            os.rename(nativedir, output_sstate_cache + '/' + fixedlsbstring)
+            destdir = os.path.join(output_sstate_cache, fixedlsbstring)
+            bb.utils.mkdirhier(destdir)
+
+            dirlist = os.listdir(nativedir)
+            for i in dirlist:
+                src = os.path.join(nativedir, i)
+                dest = os.path.join(destdir, i)
+                os.rename(src, dest)
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/5] toolchain-scripts.bbclass: Use PYTHONPATH instead of PYTHONHOME
  2016-02-04 20:31 [PATCH 0/5] extsdk bug fixes and minimal type addition Randy Witt
  2016-02-04 20:31 ` [PATCH 1/5] copy_buildsystem.py: Pass the nativelsb argument to gen-lockedsig-cache Randy Witt
@ 2016-02-04 20:31 ` Randy Witt
  2016-02-04 20:31 ` [PATCH 3/5] populate_sdk_ext: Don't set sdk_update_targets in the config Randy Witt
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Randy Witt @ 2016-02-04 20:31 UTC (permalink / raw)
  To: openembedded-core

In the extensible sdk it was originally intended that the native sstate
would always be setscened as part of the sdk installation. However, the
soon to come "minimal" sdk won't do that.

A side effect of that is that pointing PYTHONHOME at the native sysroot
within the "bitbake workspace" won't work. For now only set PYTHONPATH
instead and continue using the python that comes from buildtools.

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
---
 meta/classes/toolchain-scripts.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index ab4feb0..13e7390 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -31,7 +31,7 @@ toolchain_create_sdk_env_script () {
 	echo "export OECORE_NATIVE_SYSROOT=\"$sdkpathnative\"" >> $script
 	echo 'export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"' >> $script
 	echo "export OECORE_ACLOCAL_OPTS=\"-I $sdkpathnative/usr/share/aclocal\"" >> $script
-	echo "export PYTHONHOME=$sdkpathnative$prefix" >> $script
+	echo "export PYTHONPATH=$sdkpathnative$prefix" >> $script
 	echo 'unset command_not_found_handle' >> $script
 
 	toolchain_shared_env_script
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/5] populate_sdk_ext: Don't set sdk_update_targets in the config
  2016-02-04 20:31 [PATCH 0/5] extsdk bug fixes and minimal type addition Randy Witt
  2016-02-04 20:31 ` [PATCH 1/5] copy_buildsystem.py: Pass the nativelsb argument to gen-lockedsig-cache Randy Witt
  2016-02-04 20:31 ` [PATCH 2/5] toolchain-scripts.bbclass: Use PYTHONPATH instead of PYTHONHOME Randy Witt
@ 2016-02-04 20:31 ` Randy Witt
  2016-02-04 20:31 ` [PATCH 4/5] populate_sdk_ext: Add support for a "minimal" type Randy Witt
  2016-02-04 20:31 ` [PATCH 5/5] populate_sdk_ext: Make populate_sdk_ext depend on sdk_extra_conf Randy Witt
  4 siblings, 0 replies; 6+ messages in thread
From: Randy Witt @ 2016-02-04 20:31 UTC (permalink / raw)
  To: openembedded-core

sdk_update_targets isn't used by any code, so there is no reason to set
it.

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
---
 meta/classes/populate_sdk_ext.bbclass | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index da7fdfb..ba30023 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -99,7 +99,6 @@ python copy_buildsystem () {
     config.set('General', 'core_meta_subdir', core_meta_subdir)
     config.add_section('SDK')
     config.set('SDK', 'sdk_targets', d.getVar('SDK_TARGETS', True))
-    config.set('SDK', 'sdk_update_targets', d.getVar('SDK_INSTALL_TARGETS', True))
     updateurl = d.getVar('SDK_UPDATE_URL', True)
     if updateurl:
         config.set('SDK', 'updateserver', updateurl)
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/5] populate_sdk_ext: Add support for a "minimal" type
  2016-02-04 20:31 [PATCH 0/5] extsdk bug fixes and minimal type addition Randy Witt
                   ` (2 preceding siblings ...)
  2016-02-04 20:31 ` [PATCH 3/5] populate_sdk_ext: Don't set sdk_update_targets in the config Randy Witt
@ 2016-02-04 20:31 ` Randy Witt
  2016-02-04 20:31 ` [PATCH 5/5] populate_sdk_ext: Make populate_sdk_ext depend on sdk_extra_conf Randy Witt
  4 siblings, 0 replies; 6+ messages in thread
From: Randy Witt @ 2016-02-04 20:31 UTC (permalink / raw)
  To: openembedded-core

If the user sets the SDK_EXT_TYPE variable to "minimal" then the sdk won't
contain any sstate. The sstate can come from an sstate mirror and be
installed on demand as usual.

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
---
 meta/classes/populate_sdk_ext.bbclass | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index ba30023..caf8b6e 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -18,6 +18,9 @@ SDK_RELOCATE_AFTER_INSTALL_task-populate-sdk-ext = "0"
 SDK_EXT = ""
 SDK_EXT_task-populate-sdk-ext = "-ext"
 
+# Options are full or minimal
+SDK_EXT_TYPE ?= "full"
+
 SDK_LOCAL_CONF_WHITELIST ?= ""
 SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \
                              BB_NUMBER_THREADS \
@@ -29,7 +32,7 @@ SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
 SDK_UPDATE_URL ?= ""
 
 SDK_TARGETS ?= "${PN}"
-SDK_INSTALL_TARGETS = "${SDK_TARGETS} ${@'meta-world-pkgdata:do_allpackagedata' if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1' else ''}"
+SDK_INSTALL_TARGETS = "${@SDK_TARGETS if d.getVar('SDK_EXT_TYPE', True) != 'minimal' else ''} ${@'meta-world-pkgdata:do_allpackagedata' if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1' else ''}"
 OE_INIT_ENV_SCRIPT ?= "oe-init-build-env"
 
 # The files from COREBASE that you want preserved in the COREBASE copied
@@ -203,10 +206,6 @@ python copy_buildsystem () {
     bb.utils.remove(sstate_out, True)
     # uninative.bbclass sets NATIVELSBSTRING to 'universal'
     fixedlsbstring = 'universal'
-    oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_pruned,
-                                                   d.getVar('SSTATE_DIR', True),
-                                                   sstate_out, d,
-                                                   fixedlsbstring)
 
     # Add packagedata if enabled
     if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1':
@@ -218,7 +217,9 @@ python copy_buildsystem () {
                                              d.getVar('STAGING_DIR_HOST', True) + '/world-pkgdata/locked-sigs-pkgdata.inc',
                                              lockedsigs_pruned,
                                              lockedsigs_copy)
-        oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_copy,
+
+    if d.getVar('SDK_EXT_TYPE', True) != 'minimal':
+        oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_pruned,
                                                        d.getVar('SSTATE_DIR', True),
                                                        sstate_out, d,
                                                        fixedlsbstring)
@@ -302,7 +303,7 @@ sdk_ext_postinst() {
 	# For now this is where uninative.bbclass expects the tarball
 	mv *-nativesdk-libc.tar.* $target_sdk_dir/`dirname ${oe_init_build_env_path}`
 
-	if [ "$prepare_buildsystem" != "no" ]; then
+	if [ "$prepare_buildsystem" != "no" -a -n "${@SDK_INSTALL_TARGETS.strip()}" ]; then
 		printf "Preparing build system...\n"
 		# dash which is /bin/sh on Ubuntu will not preserve the
 		# current working directory when first ran, nor will it set $1 when
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 5/5] populate_sdk_ext: Make populate_sdk_ext depend on sdk_extra_conf
  2016-02-04 20:31 [PATCH 0/5] extsdk bug fixes and minimal type addition Randy Witt
                   ` (3 preceding siblings ...)
  2016-02-04 20:31 ` [PATCH 4/5] populate_sdk_ext: Add support for a "minimal" type Randy Witt
@ 2016-02-04 20:31 ` Randy Witt
  4 siblings, 0 replies; 6+ messages in thread
From: Randy Witt @ 2016-02-04 20:31 UTC (permalink / raw)
  To: openembedded-core

If a user changes sdk_extra_conf, it should cause populate_sdk_ext to
run.

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
---
 meta/classes/populate_sdk_ext.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index caf8b6e..704c003 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -361,8 +361,9 @@ do_populate_sdk_ext[depends] = "${@d.getVarFlag('do_populate_sdk', 'depends', Fa
 
 do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':do_build' for x in d.getVar('SDK_TARGETS', True).split()])}"
 
-# Make sure codes change in copy_buildsystem can result in rebuilt
-do_populate_sdk_ext[vardeps] += "copy_buildsystem"
+# Make sure code changes can result in rebuild
+do_populate_sdk_ext[vardeps] += "copy_buildsystem \
+                                 sdk_ext_postinst"
 
 do_populate_sdk_ext[file-checksums] += "${COREBASE}/meta/files/toolchain-shar-relocate.sh:True \
                                         ${COREBASE}/meta/files/toolchain-shar-extract.sh:True \
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-02-04 20:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-04 20:31 [PATCH 0/5] extsdk bug fixes and minimal type addition Randy Witt
2016-02-04 20:31 ` [PATCH 1/5] copy_buildsystem.py: Pass the nativelsb argument to gen-lockedsig-cache Randy Witt
2016-02-04 20:31 ` [PATCH 2/5] toolchain-scripts.bbclass: Use PYTHONPATH instead of PYTHONHOME Randy Witt
2016-02-04 20:31 ` [PATCH 3/5] populate_sdk_ext: Don't set sdk_update_targets in the config Randy Witt
2016-02-04 20:31 ` [PATCH 4/5] populate_sdk_ext: Add support for a "minimal" type Randy Witt
2016-02-04 20:31 ` [PATCH 5/5] populate_sdk_ext: Make populate_sdk_ext depend on sdk_extra_conf Randy Witt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox