Bug 9435

Summary: Toaster throws an exception for images that have files on the / level
Product: [Build System, Metadata & Runtime] Toaster Reporter: brian avery <brian.avery>
Component: toasterAssignee: Toaster default assignee <toaster>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Low CC: belen.barros.pena, david.reyna, jessica.zhang, jose.perez.carranza, stanciux.mihail
Version: 2.1   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description brian avery 2016-04-11 23:17:10 UTC
Distributions like poky-tiny have files (init) on the top level of the target directory structure.  In this case, the construction of the parent directory results in '' which later throws an exception.
Sample Exception:
ERROR: Target_File matching query does not exist.
Traceback (most recent call last):
  File "/big/src/myBugs/poky/bitbake/lib/bb/ui/toasterui.py", line 410, in main
    buildinfohelper.store_target_package_data(event)
  File "/big/src/myBugs/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 1247, in store_target_package_data
    self.orm_wrapper.save_target_file_information(self.internal_state['build'], target, filedata)
  File "/big/src/myBugs/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 528, in save_target_file_information
    parent_obj = self._cached_get(Target_File, target = target_obj, path = parent_path, inodetype = Target_File.ITYPE_DIRECTORY)
  File "/big/src/myBugs/poky/bitbake/lib/bb/ui/buildinfohelper.py", line 120, in _cached_get
    vars(self)[dictname][key] = clazz.objects.get(**kwargs)
  File "/big/src/myBugs/RUN/t-Django-1.8/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 "/big/src/myBugs/RUN/t-Django-1.8/local/lib/python2.7/site-packages/django/db/models/query.py", line 334, in get
    self.model._meta.object_name
DoesNotExist: Target_File matching query does not exist.
Comment 1 Belen Barros Pena 2016-04-25 14:53:58 UTC
I am not sure if Brian Avery will be able to do much Toaster work, so setting this one to the default assignee for the time being. Brian: feel free to take it back if you really want it!
Comment 2 Belen Barros Pena 2016-04-25 14:54:43 UTC
Also, if this means Toaster does not build with DISTRO set to poky-tiny, this might not be a "low".