Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] extsdk bug fixes
@ 2016-02-18 17:17 Randy Witt
  2016-02-18 17:17 ` [PATCH 1/3] populate_sdk_ext: Don't ignore SDK_TARGETS value Randy Witt
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Randy Witt @ 2016-02-18 17:17 UTC (permalink / raw)
  To: openembedded-core

These are bug fixes for bugs found during installation of the ext sdk.
The following changes since commit bc72f64eb4041ef44198e3e0caeb2be9f43eb44e:

  linux-yocto: Update SRCREV for genericx86* for 4.4 (2016-02-11 22:58:38 +0000)

are available in the git repository at:

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

Randy Witt (3):
  populate_sdk_ext: Don't ignore SDK_TARGETS value
  devtool: Don't recursively look for .devtoolbase in --basepath
  populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable

 meta/classes/populate_sdk_ext.bbclass | 15 +++++++++++++--
 scripts/devtool                       | 28 ++++++++++++++++------------
 2 files changed, 29 insertions(+), 14 deletions(-)

-- 
2.5.0



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

* [PATCH 1/3] populate_sdk_ext: Don't ignore SDK_TARGETS value
  2016-02-18 17:17 [PATCH 0/3] extsdk bug fixes Randy Witt
@ 2016-02-18 17:17 ` Randy Witt
  2016-02-18 17:17 ` [PATCH 2/3] devtool: Don't recursively look for .devtoolbase in --basepath Randy Witt
  2016-02-18 17:17 ` [PATCH 3/3] populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable Randy Witt
  2 siblings, 0 replies; 7+ messages in thread
From: Randy Witt @ 2016-02-18 17:17 UTC (permalink / raw)
  To: openembedded-core

This fixes a problem where SDK_INSTALL_TARGETS wouldn't pick up the
value in SDK_TARGETS. It also removes the inline python to make the
code more readable.

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

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 6e36642..7c95301 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -32,7 +32,18 @@ SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
 SDK_UPDATE_URL ?= ""
 
 SDK_TARGETS ?= "${PN}"
-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 ''}"
+
+def get_sdk_install_targets(d):
+    sdk_install_targets = ''
+    if d.getVar('SDK_EXT_TYPE', True) != 'minimal':
+        sdk_install_targets = d.getVar('SDK_TARGETS', True)
+
+    if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1':
+        sdk_install_targets += ' meta-world-pkgdata:do_allpackagedata'
+
+    return sdk_install_targets
+
+SDK_INSTALL_TARGETS = "${@get_sdk_install_targets(d)}"
 OE_INIT_ENV_SCRIPT ?= "oe-init-build-env"
 
 # The files from COREBASE that you want preserved in the COREBASE copied
-- 
2.5.0



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

* [PATCH 2/3] devtool: Don't recursively look for .devtoolbase in --basepath
  2016-02-18 17:17 [PATCH 0/3] extsdk bug fixes Randy Witt
  2016-02-18 17:17 ` [PATCH 1/3] populate_sdk_ext: Don't ignore SDK_TARGETS value Randy Witt
@ 2016-02-18 17:17 ` Randy Witt
  2016-02-18 17:17 ` [PATCH 3/3] populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable Randy Witt
  2 siblings, 0 replies; 7+ messages in thread
From: Randy Witt @ 2016-02-18 17:17 UTC (permalink / raw)
  To: openembedded-core

If the user specifies --basepath on the commandline, only the directory
specified should be searched for .devtoolbase. Otherwise when --basepath
is a child of the sdk directory, .devtoolbase will always be found and
devtool will only show options meant to be used within an sdk.

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
---
 scripts/devtool | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/scripts/devtool b/scripts/devtool
index 2d57da0b..23e9b50 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -192,13 +192,6 @@ def main():
 
     # Default basepath
     basepath = os.path.dirname(os.path.abspath(__file__))
-    pth = basepath
-    while pth != '' and pth != os.sep:
-        if os.path.exists(os.path.join(pth, '.devtoolbase')):
-            context.fixed_setup = True
-            basepath = pth
-            break
-        pth = os.path.dirname(pth)
 
     parser = argparse_oe.ArgumentParser(description="OpenEmbedded development tool",
                                         add_help=False,
@@ -224,11 +217,22 @@ def main():
     if global_args.basepath:
         # Override
         basepath = global_args.basepath
-    elif not context.fixed_setup:
-        basepath = os.environ.get('BUILDDIR')
-        if not basepath:
-            logger.error("This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)")
-            sys.exit(1)
+        if os.path.exists(os.path.join(basepath, '.devtoolbase')):
+            context.fixed_setup = True
+    else:
+        pth = basepath
+        while pth != '' and pth != os.sep:
+            if os.path.exists(os.path.join(pth, '.devtoolbase')):
+                context.fixed_setup = True
+                basepath = pth
+                break
+            pth = os.path.dirname(pth)
+
+        if not context.fixed_setup:
+            basepath = os.environ.get('BUILDDIR')
+            if not basepath:
+                logger.error("This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)")
+                sys.exit(1)
 
     logger.debug('Using basepath %s' % basepath)
 
-- 
2.5.0



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

* [PATCH 3/3] populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable
  2016-02-18 17:17 [PATCH 0/3] extsdk bug fixes Randy Witt
  2016-02-18 17:17 ` [PATCH 1/3] populate_sdk_ext: Don't ignore SDK_TARGETS value Randy Witt
  2016-02-18 17:17 ` [PATCH 2/3] devtool: Don't recursively look for .devtoolbase in --basepath Randy Witt
@ 2016-02-18 17:17 ` Randy Witt
  2016-02-18 22:57   ` Richard Purdie
  2016-02-19  4:42   ` [PATCH v2 " Randy Witt
  2 siblings, 2 replies; 7+ messages in thread
From: Randy Witt @ 2016-02-18 17:17 UTC (permalink / raw)
  To: openembedded-core

Currently there isn't a way for the extensible sdk to know all the tasks
that will need sstate for an image. This is because a layer can add it's
on custom tasks that are required for an image to be generated.

The extensible sdk solved this for poky by using recrdeptask and
specifying the tasks known to be required for the image as well as for
building new recipes.

So the SDK_RECRDEP_TASKS variable allows a user to specify additional
tasks that need to be pulled in.

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

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 7c95301..5f90aea 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -359,7 +359,7 @@ addtask sdk_depends
 do_sdk_depends[dirs] = "${WORKDIR}"
 do_sdk_depends[depends] = "${@get_ext_sdk_depends(d)}"
 do_sdk_depends[recrdeptask] = "${@d.getVarFlag('do_populate_sdk', 'recrdeptask', False)}"
-do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy"
+do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy ${SDK_RECRDEP_TASKS}"
 do_sdk_depends[rdepends] = "${@get_sdk_ext_rdepends(d)}"
 
 def get_sdk_ext_rdepends(d):
-- 
2.5.0



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

* Re: [PATCH 3/3] populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable
  2016-02-18 17:17 ` [PATCH 3/3] populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable Randy Witt
@ 2016-02-18 22:57   ` Richard Purdie
  2016-02-19  4:34     ` Randy Witt
  2016-02-19  4:42   ` [PATCH v2 " Randy Witt
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2016-02-18 22:57 UTC (permalink / raw)
  To: Randy Witt, openembedded-core

On Thu, 2016-02-18 at 09:17 -0800, Randy Witt wrote:
> Currently there isn't a way for the extensible sdk to know all the
> tasks
> that will need sstate for an image. This is because a layer can add
> it's
> on custom tasks that are required for an image to be generated.
> 
> The extensible sdk solved this for poky by using recrdeptask and
> specifying the tasks known to be required for the image as well as
> for
> building new recipes.
> 
> So the SDK_RECRDEP_TASKS variable allows a user to specify additional
> tasks that need to be pulled in.
> 
> Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
> ---
>  meta/classes/populate_sdk_ext.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/populate_sdk_ext.bbclass
> b/meta/classes/populate_sdk_ext.bbclass
> index 7c95301..5f90aea 100644
> --- a/meta/classes/populate_sdk_ext.bbclass
> +++ b/meta/classes/populate_sdk_ext.bbclass
> @@ -359,7 +359,7 @@ addtask sdk_depends
>  do_sdk_depends[dirs] = "${WORKDIR}"
>  do_sdk_depends[depends] = "${@get_ext_sdk_depends(d)}"
>  do_sdk_depends[recrdeptask] = "${@d.getVarFlag('do_populate_sdk',
> 'recrdeptask', False)}"
> -do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa
> do_populate_sysroot do_deploy"
> +do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa
> do_populate_sysroot do_deploy ${SDK_RECRDEP_TASKS}"
>  do_sdk_depends[rdepends] = "${@get_sdk_ext_rdepends(d)}"
>  
>  def get_sdk_ext_rdepends(d):

Doesn't this need a default value or it will throw parse failures?

Cheers,

Richard


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

* Re: [PATCH 3/3] populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable
  2016-02-18 22:57   ` Richard Purdie
@ 2016-02-19  4:34     ` Randy Witt
  0 siblings, 0 replies; 7+ messages in thread
From: Randy Witt @ 2016-02-19  4:34 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

On 02/18/2016 02:57 PM, Richard Purdie wrote:
> On Thu, 2016-02-18 at 09:17 -0800, Randy Witt wrote:
>> Currently there isn't a way for the extensible sdk to know all the
>> tasks
>> that will need sstate for an image. This is because a layer can add
>> it's
>> on custom tasks that are required for an image to be generated.
>>
>> The extensible sdk solved this for poky by using recrdeptask and
>> specifying the tasks known to be required for the image as well as
>> for
>> building new recipes.
>>
>> So the SDK_RECRDEP_TASKS variable allows a user to specify additional
>> tasks that need to be pulled in.
>>
>> Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
>> ---
>>   meta/classes/populate_sdk_ext.bbclass | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/populate_sdk_ext.bbclass
>> b/meta/classes/populate_sdk_ext.bbclass
>> index 7c95301..5f90aea 100644
>> --- a/meta/classes/populate_sdk_ext.bbclass
>> +++ b/meta/classes/populate_sdk_ext.bbclass
>> @@ -359,7 +359,7 @@ addtask sdk_depends
>>   do_sdk_depends[dirs] = "${WORKDIR}"
>>   do_sdk_depends[depends] = "${@get_ext_sdk_depends(d)}"
>>   do_sdk_depends[recrdeptask] = "${@d.getVarFlag('do_populate_sdk',
>> 'recrdeptask', False)}"
>> -do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa
>> do_populate_sysroot do_deploy"
>> +do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa
>> do_populate_sysroot do_deploy ${SDK_RECRDEP_TASKS}"
>>   do_sdk_depends[rdepends] = "${@get_sdk_ext_rdepends(d)}"
>>
>>   def get_sdk_ext_rdepends(d):
>
> Doesn't this need a default value or it will throw parse failures?

Actually, it didn't generate parse errors. My guess is it just didn't expand it 
and put a bogus task in the list. So I'll send a v2.

>
> Cheers,
>
> Richard
>



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

* [PATCH v2 3/3] populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable
  2016-02-18 17:17 ` [PATCH 3/3] populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable Randy Witt
  2016-02-18 22:57   ` Richard Purdie
@ 2016-02-19  4:42   ` Randy Witt
  1 sibling, 0 replies; 7+ messages in thread
From: Randy Witt @ 2016-02-19  4:42 UTC (permalink / raw)
  To: openembedded-core

Currently there isn't a way for the extensible sdk to know all the tasks
that will need sstate for an image. This is because a layer can add it's
on custom tasks that are required for an image to be generated.

The extensible sdk solved this for poky by using recrdeptask and
specifying the tasks known to be required for the image as well as for
building new recipes.

So the SDK_RECRDEP_TASKS variable allows a user to specify additional
tasks that need to be pulled in.

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

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 7c95301..1c1bb47 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -21,6 +21,8 @@ SDK_EXT_task-populate-sdk-ext = "-ext"
 # Options are full or minimal
 SDK_EXT_TYPE ?= "full"
 
+SDK_RECRDEP_TASKS ?= ""
+
 SDK_LOCAL_CONF_WHITELIST ?= ""
 SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \
                              BB_NUMBER_THREADS \
@@ -359,7 +361,7 @@ addtask sdk_depends
 do_sdk_depends[dirs] = "${WORKDIR}"
 do_sdk_depends[depends] = "${@get_ext_sdk_depends(d)}"
 do_sdk_depends[recrdeptask] = "${@d.getVarFlag('do_populate_sdk', 'recrdeptask', False)}"
-do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy"
+do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy ${SDK_RECRDEP_TASKS}"
 do_sdk_depends[rdepends] = "${@get_sdk_ext_rdepends(d)}"
 
 def get_sdk_ext_rdepends(d):
-- 
2.5.0



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

end of thread, other threads:[~2016-02-19  4:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-18 17:17 [PATCH 0/3] extsdk bug fixes Randy Witt
2016-02-18 17:17 ` [PATCH 1/3] populate_sdk_ext: Don't ignore SDK_TARGETS value Randy Witt
2016-02-18 17:17 ` [PATCH 2/3] devtool: Don't recursively look for .devtoolbase in --basepath Randy Witt
2016-02-18 17:17 ` [PATCH 3/3] populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable Randy Witt
2016-02-18 22:57   ` Richard Purdie
2016-02-19  4:34     ` Randy Witt
2016-02-19  4:42   ` [PATCH v2 " Randy Witt

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