[Toaster] [review-request][PATCH] toaster: Add fake entry to Target_File for filesystem root

Brian Avery avery.brian at gmail.com
Tue Sep 22 09:47:02 PDT 2015


yes, please raise the buildhistory bug with bitbake but for now, I'm
ok with this workaround, especially since you did the sensible thing
of checking to see if it exists before creating your entry i.e. this
code will still work even after/if they fix the buildhistory bug.
-b

On Tue, Sep 22, 2015 at 1:37 AM, Smith, Elliot <elliot.smith at intel.com> wrote:
> On 22 September 2015 at 09:03, Ed Bartosh <ed.bartosh at linux.intel.com>
> wrote:
>>
>> On Mon, Sep 21, 2015 at 06:49:22PM +0100, Elliot Smith wrote:
>> > The files-in-image.txt file is produced by bitbake after an
>> > image is created, listing all the files in the image.
>> > However, this list doesn't include the root directory ('/').
>> >
>> Did you try to look what caused this change? Bitbake used to include
>> root dir into this file previously, right?
>
>
> I'm not sure if it ever did include this file. I had a brief look at how
> buildhistory_analysis.py does its work (git diffs if I read it correctly),
> but didn't dig right into it.
>
>>
>> > buildinfohelper.py then tries to construct the filesystem
>> > tree from this file, assuming that every directory apart from
>> > the root directory (which is special-cased) can be assigned
>> > a parent. But because the root directory isn't listed in
>> > files-in-image.txt, an object for the root directory is never
>> > created.
>> >
>> > The direct subdirectories of the root ('./bin', './usr' etc.)
>> > then can't be assigned a parent directory, as the object
>> > representing the root directory doesn't exist. This
>> > results in a Target_File lookup error and causes the
>> > directory listing page to fail.
>> >
>> > Fix this by creating a fake entry for the root directory
>> > in the Target_File table, so that the direct subdirectories
>> > of / can be assigned a parent. Note that it doesn't matter
>> > that the root is faked, as its properties are never shown
>> > in the directory structure tree.
>> >
>> This looks like a workaround to me. It should be fixed in bitbake code
>> if it's possible.
>
>
>  I discussed this with Brian, and the decision was that a work-around was
> sufficient for now. (See the options I suggested in
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=8280#c9.)
>
> I can investigate this some more and/or raise a bug, if we think that's
> worthwhile.
>
> Elliot
> --
> Elliot Smith
> Software Engineer
> Intel Open Source Technology Centre
>
> --
> _______________________________________________
> toaster mailing list
> toaster at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>


More information about the toaster mailing list