Bug 11213 - Cannot add layers in Machine page
Summary: Cannot add layers in Machine page
Status: RESOLVED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ major
Target Milestone: 2.3 M4
Assignee: David Reyna
QA Contact: Libertad
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-03-22 15:21 UTC by BogDan Vatra
Modified: 2017-04-28 17:35 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BogDan Vatra 2017-03-22 15:21:32 UTC
Toaster doesn't work anymore on master branch (I tested sha1: 49c2df5652d25e6e9b2a4976658ab9bb17fe6694). 
It doesn't create a build folder for new projects and I can't add anything to that project (e.g. I can't add a layer or select a different machine).

Steps to reproduce:
$ git clone git://git.yoctoproject.org/poky.git
$ cd poky
$ . oe-init-build-env
$ . toaster start
- open http://localhost:8000 in your browser
- create a new project (e.g. rpi3)
- use "Yocto Project Master branch".
- trying to change the machine to "raspberrypi3" by adding "meta-raspberrypi" layer fails. Clicking on "Add layer" button does nothing.
- I tried to use the "Layers" section (from top left) to add "meta-raspberrypi" layer manually, but again I failed.

My *hunch* is that all this problems are caused the fact that there is no "build-xxxxx" folder when I create a new project.
Comment 1 David Reyna 2017-03-24 07:07:21 UTC
I find that I can add layers via the "Layer" page and the "Software recipes" page, but not the "Machine" page, so that narrows the problem a bit. 

This indicated a temporary workaround, where I could add the "meta-raspberrypi" layer directly, which then allowed me to select the raspberry-pi Machine.

There are no obvious errors in the UI log nor the Toaster shell, unfortunately.
Comment 2 David Reyna 2017-03-24 07:18:29 UTC
Hmm, and building "quilt-native" returns these bitbake error, which may be a problem in the core and not Toaster per se.

vvvvvvvvvvvvvvvvvvvv
Error executing a python function in <code>:

The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 4, function: <module>
     0001:__anon_22__opt_dreyna_toaster_newer_poky__toaster_clones__git___git_yoctoproject_org_poky_master_meta_conf_machine_include_arm_feature_arm_thumb_inc(d)
     0002:__anon_25__opt_dreyna_toaster_newer_poky__toaster_clones__git___git_yoctoproject_org_poky_master_meta_classes_patch_bbclass(d)
     0003:__anon_167__opt_dreyna_toaster_newer_poky__toaster_clones__git___git_yoctoproject_org_poky_master_meta_classes_base_bbclass(d)
 *** 0004:__anon_679__opt_dreyna_toaster_newer_poky__toaster_clones__git___git_yoctoproject_org_poky_master_meta_classes_base_bbclass(d)
     0005:__anon_1352__opt_dreyna_toaster_newer_poky__toaster_clones__git___git_yoctoproject_org_poky_master_meta_classes_insane_bbclass(d)
     0006:__anon_250__opt_dreyna_toaster_newer_poky__toaster_clones__git___git_yoctoproject_org_poky_master_meta_classes_package_bbclass(d)
     0007:__anon_708__opt_dreyna_toaster_newer_poky__toaster_clones__git___git_yoctoproject_org_poky_master_meta_classes_package_rpm_bbclass(d)
     0008:__anon_25__opt_dreyna_toaster_newer_poky__toaster_clones__git___git_yoctoproject_org_poky_master_meta_classes_debian_bbclass(d)
File: '/opt/dreyna/toaster_newer/poky/_toaster_clones/_git___git.yoctoproject.org_poky_master/meta/classes/base.bbclass', lineno: 580, function: __anon_679__opt_dreyna_toaster_newer_poky__toaster_clones__git___git_yoctoproject_org_poky_master_meta_classes_base_bbclass
     0576:    needsrcrev = False
     0577:    srcuri = d.getVar('SRC_URI')
     0578:    for uri in srcuri.split():
     0579:        (scheme, _ , path) = bb.fetch.decodeurl(uri)[:3]
 *** 0580:
     0581:        # HTTP/FTP use the wget fetcher
     0582:        if scheme in ("http", "https", "ftp"):
     0583:            d.appendVarFlag('do_fetch', 'depends', ' wget-native:do_populate_sysroot')
     0584:
File: '/opt/dreyna/toaster_newer/poky/_toaster_clones/_git___git.yoctoproject.org_poky_master/bitbake/lib/bb/fetch2/__init__.py', lineno: 360, function: decodeurl
     0356:    """
     0357:
     0358:    m = re.compile('(?P<type>[^:]*)://((?P<user>[^/;]+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url)
     0359:    if not m:
 *** 0360:        raise MalformedUrl(url)
     0361:
     0362:    type = m.group('type')
     0363:    location = m.group('location')
     0364:    if not location:
Exception: bb.fetch2.MalformedUrl: The URL: '${LINUX_GIT_URI}/${LINUX_GIT_PREFIX}${LINUX_GIT_REPO};branch=${LINUX_GIT_SRCREV};protocol=${LINUX_GIT_PROTOCOL}' is invalid and cannot be interpreted
^^^^^^^^^^^^^^^^^^^
Comment 3 BogDan Vatra 2017-03-24 08:00:39 UTC
(In reply to comment #1)
> I find that I can add layers via the "Layer" page and the "Software recipes"
> page, but not the "Machine" page, so that narrows the problem a bit. 
> 
> This indicated a temporary workaround, where I could add the
> "meta-raspberrypi" layer directly, which then allowed me to select the
> raspberry-pi Machine.
> 
> There are no obvious errors in the UI log nor the Toaster shell,
> unfortunately.

Strangely it doesn't work using Chrome 57.0.2987.110 (64-bit) but it works using firefox ...
Comment 4 David Reyna 2017-03-29 05:03:55 UTC
This fails for me on my Firefox 64-bit, both Linux and Windows.

The problem is the fact in this page the data "layer" is not being interpreted as an object, which leads to the exception "uncaught exception: xhrLayerUrl is undefined", as opposed to the Layers page.

The code looks the same except that the class "layerbtn" is missing in the failing code's aref.
Comment 5 David Reyna 2017-04-05 23:50:02 UTC
There were format errors in "machine_btn.html" that broke the object. Patch being submitted.
Comment 6 David Reyna 2017-04-11 23:57:21 UTC
commit 2a40a0587e64a4bdf2ed64c4b84f0d6f4d602d7c