Bug 8818 - error in lsupdates when duplicate openembedded-core layers found
Summary: error in lsupdates when duplicate openembedded-core layers found
Status: RESOLVED OBSOLETE
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2 M2
Assignee: Michael Wood
QA Contact: Libertad
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-12-16 14:54 UTC by Michael Wood
Modified: 2016-04-27 16:18 UTC (History)
3 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 Michael Wood 2015-12-16 14:54:09 UTC
If a layer "openembedded-core" already exists in the system and we get another one added externally we currently fail to know which layer to update from the info from the layer index.

2015-12-15 11:42:28,368 WARNING ZZZZ: urllib2.urlopen: http://layers.openembedded.org/layerindex/api/layerItems/
Failure while trying to import the toaster config file /var/www/bia/yocto/poky/meta-yocto/conf/toasterconf.json: get() returned more than one Layer -- it returned 2!
Traceback (most recent call last):
  File "/var/www/bia/toaster/poky/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py", line 114, in _verify_be
    call_command("lsupdates")
  File "/var/www/bia/toaster/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 120, in call_command
    return command.execute(*args, **defaults)
  File "/var/www/bia/toaster/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/var/www/bia/toaster/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 661, in handle
    return self.handle_noargs(**options)
  File "/var/www/bia/toaster/poky/bitbake/lib/toaster/orm/management/commands/lsupdates.py", line 12, in handle_noargs
    ls.update()
  File "/var/www/bia/toaster/poky/bitbake/lib/toaster/orm/models.py", line 948, in update
    oe_core_l =  Layer.objects.get(name=oe_core_layer)
  File "/var/www/bia/toaster/venv/local/lib/python2.7/site-packages/django/db/models/manager.py", line 127, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/var/www/bia/toaster/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 338, in get
    (self.model._meta.object_name, num)
MultipleObjectsReturned: get() returned more than one Layer -- it returned 2!
Comment 1 Michael Wood 2016-04-27 16:18:32 UTC
Not sure how to reproduce this one any more. Will re-open if it crops up again.