Bug 7276 - Toaster crash/traceback importing layer configuration
Summary: Toaster crash/traceback importing layer configuration
Status: VERIFIED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.8 M3
Assignee: Alexandru Damian
QA Contact: Mihail Stanciu
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-02-03 16:13 UTC by Christopher Larson
Modified: 2015-04-10 08:31 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Larson 2015-02-03 16:13:58 UTC
File "/scratch/cedar/toaster-test/poky/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py", line 71, in _import_layer_config
    bvo.giturl = _read_git_url_from_local_repository(bvi['giturl'])
  File "/scratch/cedar/toaster-test/poky/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py", line 62, in _read_git_url_from_local_repository
    raise Exception("Error while looking for remote \"%s\" in \"s\"" % (remote_name, lo.local_path))
NameError: free variable 'lo' referenced before assignment in enclosing scope
Comment 1 Alexandru Damian 2015-02-03 17:04:44 UTC
There seems to be an issue trying to figure out remotes from the local git repo, and it fails to raise the proper exception.

The patch below enables the correct Exception message, which should help debug what is wrong in the first place.


diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py b/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py
index e2f61e4..9163e9b 100644
--- a/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py
+++ b/bitbake/lib/toaster/bldcontrol/management/commands/loadconf.py
@@ -59,7 +59,7 @@ class Command(BaseCommand):
                 except ValueError:
                     pass
             if url == None:
-                raise Exception("Error while looking for remote \"%s\" in \"s\"" % (remote_name, lo.local_path))
+                raise Exception("Error while looking for remote \"%s\" in \"%s\"" % (remote_name, out))
             return url
Comment 2 Alexandru Damian 2015-02-05 12:14:54 UTC
Pushed for review on 

poky-contrib:adamian/20150204-bug-7283
Comment 3 Alexandru Damian 2015-02-11 11:48:24 UTC
Merged in master.
Comment 4 Mihail Stanciu 2015-04-10 08:31:50 UTC
Verified on master: 33558eacc8a2d3dce3396b9ab2fd0773ac5076bc