sdk.py: Fix undefined variable
PATCH 1/2 sdk.py: Fix undefined variable
"sdk_update" uses a variable newsdk_path, which was never declared. This would cause the command:
devtool sdk-update <poky-sdk-latest>
to fail with an error:
NameError: global name 'newsdk_path' is not defined
The remedy is to declare newsdk_path as it was no doubt intended, corresponding to the argument specifying <poky-sdk-latest>.
[YOCTO#9042]
Signed-off-by Juro Bystricky <[email protected]>
--- scripts/lib/devtool/sdk.py | 1 + 1 file changed, 1 insertion(+)
scripts/lib/devtool/sdk.py +1 -0
@@ -133,6 +133,7 @@ def sdk_update(args, config, basepath, workspace): 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) + newsdk_path = updateserver sstate_dir = os.path.join(newsdk_path, 'sstate-cache') if not os.path.exists(sstate_dir): logger.error("sstate-cache directory not found under %s" % newsdk_path)
Signature · 1 line
1.9.1
PATCH 2/2 sdk_update.py: Enable local sdk-update tests
Testing of local sdk updates was commented out.
Local sdk updates are functional now, so the tests should be re-enabled.
Signed-off-by Juro Bystricky <[email protected]>
--- meta/lib/oeqa/sdkext/sdk_update.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/sdkext/sdk_update.py +2 -2
@@ -30,8 +30,8 @@ class SdkUpdateTest(oeSDKExtTest): def test_sdk_update_http(self): output = self._run("devtool sdk-update \"%s\"" % self.http_url) -# def test_sdk_update_local(self): -# output = self._run("devtool sdk-update \"%s\"" % self.publish_dir) + def test_sdk_update_local(self): + output = self._run("devtool sdk-update \"%s\"" % self.publish_dir) @classmethod def tearDownClass(self):
Signature · 1 line
1.9.1