From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 04/14] devtool: sdk-update: fix not using updateserver config file option
Date: Thu, 7 Jan 2016 00:15:45 +1300 [thread overview]
Message-ID: <3bd50779917e6ae02a67c70824697a74892aa277.1452078721.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1452078721.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1452078721.git.paul.eggleton@linux.intel.com>
We read the updateserver setting from the config file but we never
actually used that value - the code then went on to use only the value
supplied on the command line.
Fix courtesy of Dmitry Rozhkov <dmitry.rozhkov@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
scripts/lib/devtool/sdk.py | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index 47b9a7e..afe52cf 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -86,7 +86,7 @@ def sdk_update(args, config, basepath, workspace):
updateserver = config.get('SDK', 'updateserver', '')
if not updateserver:
raise DevtoolError("Update server not specified in config file, you must specify it on the command line")
- logger.debug("updateserver: %s" % args.updateserver)
+ logger.debug("updateserver: %s" % updateserver)
# Make sure we are using sdk-update from within SDK
logger.debug("basepath = %s" % basepath)
@@ -97,35 +97,35 @@ def sdk_update(args, config, basepath, workspace):
else:
logger.debug("Found conf/locked-sigs.inc in %s" % basepath)
- if ':' in args.updateserver:
+ if ':' in updateserver:
is_remote = True
else:
is_remote = False
if not is_remote:
# devtool sdk-update /local/path/to/latest/sdk
- new_locked_sig_file_path = os.path.join(args.updateserver, 'conf/locked-sigs.inc')
+ new_locked_sig_file_path = os.path.join(updateserver, 'conf/locked-sigs.inc')
if not os.path.exists(new_locked_sig_file_path):
- logger.error("%s doesn't exist or is not an extensible SDK" % args.updateserver)
+ logger.error("%s doesn't exist or is not an extensible SDK" % updateserver)
return -1
else:
- logger.debug("Found conf/locked-sigs.inc in %s" % args.updateserver)
+ logger.debug("Found conf/locked-sigs.inc in %s" % updateserver)
update_dict = generate_update_dict(new_locked_sig_file_path, old_locked_sig_file_path)
logger.debug("update_dict = %s" % update_dict)
- sstate_objects = get_sstate_objects(update_dict, args.updateserver)
+ sstate_objects = get_sstate_objects(update_dict, updateserver)
logger.debug("sstate_objects = %s" % sstate_objects)
if len(sstate_objects) == 0:
logger.info("No need to update.")
return 0
logger.info("Installing sstate objects into %s", basepath)
- install_sstate_objects(sstate_objects, args.updateserver.rstrip('/'), basepath)
+ install_sstate_objects(sstate_objects, updateserver.rstrip('/'), basepath)
logger.info("Updating configuration files")
- new_conf_dir = os.path.join(args.updateserver, 'conf')
+ new_conf_dir = os.path.join(updateserver, 'conf')
old_conf_dir = os.path.join(basepath, 'conf')
shutil.rmtree(old_conf_dir)
shutil.copytree(new_conf_dir, old_conf_dir)
logger.info("Updating layers")
- new_layers_dir = os.path.join(args.updateserver, 'layers')
+ new_layers_dir = os.path.join(updateserver, 'layers')
old_layers_dir = os.path.join(basepath, 'layers')
shutil.rmtree(old_layers_dir)
ret = subprocess.call("cp -a %s %s" % (new_layers_dir, old_layers_dir), shell=True)
@@ -140,12 +140,12 @@ def sdk_update(args, config, basepath, workspace):
os.makedirs(tmpsdk_dir)
os.makedirs(os.path.join(tmpsdk_dir, 'conf'))
# Fetch locked-sigs.inc from update server
- ret = subprocess.call("wget -q -O - %s/conf/locked-sigs.inc > %s/locked-sigs.inc" % (args.updateserver, os.path.join(tmpsdk_dir, 'conf')), shell=True)
+ ret = subprocess.call("wget -q -O - %s/conf/locked-sigs.inc > %s/locked-sigs.inc" % (updateserver, os.path.join(tmpsdk_dir, 'conf')), shell=True)
if ret != 0:
- logger.error("Fetching conf/locked-sigs.inc from %s to %s/locked-sigs.inc failed" % (args.updateserver, os.path.join(tmpsdk_dir, 'conf')))
+ logger.error("Fetching conf/locked-sigs.inc from %s to %s/locked-sigs.inc failed" % (updateserver, os.path.join(tmpsdk_dir, 'conf')))
return ret
else:
- logger.info("Fetching conf/locked-sigs.inc from %s to %s/locked-sigs.inc succeeded" % (args.updateserver, os.path.join(tmpsdk_dir, 'conf')))
+ logger.info("Fetching conf/locked-sigs.inc from %s to %s/locked-sigs.inc succeeded" % (updateserver, os.path.join(tmpsdk_dir, 'conf')))
new_locked_sig_file_path = os.path.join(tmpsdk_dir, 'conf/locked-sigs.inc')
update_dict = generate_update_dict(new_locked_sig_file_path, old_locked_sig_file_path)
logger.debug("update_dict = %s" % update_dict)
@@ -160,19 +160,19 @@ def sdk_update(args, config, basepath, workspace):
else:
ret = -1
if ret != 0:
- ret = subprocess.call("rm -rf layers && git clone %s/layers" % args.updateserver, shell=True)
+ ret = subprocess.call("rm -rf layers && git clone %s/layers" % updateserver, shell=True)
if ret != 0:
logger.error("Updating meta data via git failed")
return ret
logger.debug("Updating conf files ...")
conf_files = ['local.conf', 'bblayers.conf', 'devtool.conf', 'locked-sigs.inc']
for conf in conf_files:
- ret = subprocess.call("wget -q -O - %s/conf/%s > conf/%s" % (args.updateserver, conf, conf), shell=True)
+ ret = subprocess.call("wget -q -O - %s/conf/%s > conf/%s" % (updateserver, conf, conf), shell=True)
if ret != 0:
logger.error("Update %s failed" % conf)
return ret
with open(os.path.join(basepath, 'conf/local.conf'), 'a') as f:
- f.write('SSTATE_MIRRORS_append = " file://.* %s/sstate-cache/PATH \\n "\n' % args.updateserver)
+ f.write('SSTATE_MIRRORS_append = " file://.* %s/sstate-cache/PATH \\n "\n' % updateserver)
# Run bitbake command for the whole SDK
sdk_targets = config.get('SDK', 'sdk_targets')
--
2.5.0
next prev parent reply other threads:[~2016-01-06 11:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-06 11:15 [PATCH 00/14] Extensible SDK / devtool / recipetool improvements Paul Eggleton
2016-01-06 11:15 ` [PATCH 01/14] scripts/oe-publish-sdk: add missing call to git update-server-info Paul Eggleton
2016-01-06 11:15 ` [PATCH 02/14] classes/populate_sdk_ext: fix cascading from preparation failure Paul Eggleton
2016-01-06 11:15 ` [PATCH 03/14] classes/populate_sdk_ext: disable signature warnings Paul Eggleton
2016-01-06 11:15 ` Paul Eggleton [this message]
2016-01-06 11:15 ` [PATCH 05/14] devtool: sdk-update: fix metadata update step Paul Eggleton
2016-01-06 11:15 ` [PATCH 06/14] devtool: sdk-update: fix error checking Paul Eggleton
2016-01-06 11:15 ` [PATCH 07/14] devtool: sdk-update: add option to skip preparation step Paul Eggleton
2016-01-06 11:15 ` [PATCH 08/14] recipetool: create: lower case name when determining from filename Paul Eggleton
2016-01-06 11:15 ` [PATCH 09/14] recipetool: create: support creating standalone native/nativesdk recipes Paul Eggleton
2016-01-06 11:15 ` [PATCH 10/14] devtool: reset: do clean for multiple recipes at once with -a Paul Eggleton
2016-01-06 11:15 ` [PATCH 11/14] devtool: add: support adding a native variant Paul Eggleton
2016-01-06 11:15 ` [PATCH 12/14] devtool: refactor code for getting local recipe file Paul Eggleton
2016-01-06 11:15 ` [PATCH 13/14] devtool: reset: support recipes with BBCLASSEXTEND Paul Eggleton
2016-01-06 11:15 ` [PATCH 14/14] devtool: build: support using BBCLASSEXTENDed names Paul Eggleton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3bd50779917e6ae02a67c70824697a74892aa277.1452078721.git.paul.eggleton@linux.intel.com \
--to=paul.eggleton@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox