[oe-commits] [openembedded-core] 05/24: devtool: sdk-install: add option to allow building from source

git at git.openembedded.org git at git.openembedded.org
Mon Mar 21 12:43:39 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit cbad02548fb76e31fdb08e5c9e7473b349d11e04
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Mon Mar 21 18:14:00 2016 +1300

    devtool: sdk-install: add option to allow building from source
    
    By default the sdk-install subcommand expects to restore the requested
    items from sstate and fails if it can't. If the user is OK with building
    from source, add a -s/--allow-build option to allow them to do that. In
    the process, ensure we show the status output while we're installing.
    
    Also add the missing header to the top of the file.
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/lib/devtool/sdk.py | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index 22c5279..b1905f9 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -1,4 +1,19 @@
 # Development tool - sdk-update command plugin
+#
+# Copyright (C) 2015-2016 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 import os
 import subprocess
@@ -278,8 +293,11 @@ def sdk_install(args, config, basepath, workspace):
                 if recipe.endswith('-native') and 'package' in task:
                     continue
                 install_tasks.append('%s:%s' % (recipe, task))
+        options = ''
+        if not args.allow_build:
+            options += ' --setscene-only'
         try:
-            exec_build_env_command(config.init_path, basepath, 'bitbake --setscene-only %s' % ' '.join(install_tasks))
+            exec_build_env_command(config.init_path, basepath, 'bitbake %s %s' % (options, ' '.join(install_tasks)), watch=True)
         except bb.process.ExecutionError as e:
             raise DevtoolError('Failed to install %s:\n%s' % (recipe, str(e)))
         failed = False
@@ -312,4 +330,5 @@ def register_commands(subparsers, context):
                                                    description='Installs additional recipe development files into the SDK. (You can use "devtool search" to find available recipes.)',
                                                    group='sdk')
         parser_sdk_install.add_argument('recipename', help='Name of the recipe to install the development artifacts for', nargs='+')
+        parser_sdk_install.add_argument('-s', '--allow-build', help='Allow building requested item(s) from source', action='store_true')
         parser_sdk_install.set_defaults(func=sdk_install)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list