Bug 8429 - Re-work import layer behaviour
Summary: Re-work import layer behaviour
Status: RESOLVED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 2.1
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Michael Wood
QA Contact: Libertad
URL:
Whiteboard: GUI design pending
Depends on:
Blocks: 7574
  Show dependency tree
 
Reported: 2015-10-01 16:24 UTC by Michael Wood
Modified: 2017-01-04 02:46 UTC (History)
5 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-10-01 16:24:11 UTC
The existing behaviour isn't quite working out, we need to come back to this feature and re-think the restrictions and scope of imported layers
Comment 1 Michael Wood 2015-10-07 16:00:12 UTC
To expand on this:

- We currently don't allow layers with the same name as imported layers, this isn't actually required, although we need to look into the implications of non-unique names properly (e.g. if you add two layers with the same name to a project does that work?)

- We require a git url - if you have a layer on your filesystem does this make sense, if we support non-git checkouts we should be able to provide a local path

- Each imported layer is project specific - does it need to be, should this be optional

- Should we create revisions of existing layers if the layer already exists

- Should the layer imported be assigned to a particular release [fido, master, dizzy..], this has an impact on the release change mechanism and the compatible layers listed in toaster.
Comment 2 Belen Barros Pena 2015-10-11 12:54:27 UTC
How we design this might also be impacted by bug 6640 and bug 6701 (just so that we don't forget keeping this in mind).
Comment 3 Henry Bruce 2016-02-29 19:11:17 UTC
It was not clear to me what "revision" means when enter layer info.
For recipes this is a number.
In this context it turned out to be git branch or tag.
Comment 4 Belen Barros Pena 2016-03-01 11:48:39 UTC
(In reply to comment #3)
> It was not clear to me what "revision" means when enter layer info.
> For recipes this is a number.
> In this context it turned out to be git branch or tag.

Can I ask: how did you find out what revision meant? Would changing the label to "Git revision" help in any way? Do you have any suggestions for a better label?
Comment 5 Henry Bruce 2016-03-01 17:26:15 UTC
I clicked on the "revision" tool tip and it told me exactly what revision meant. The problem was I didn't notice the tool-tip mini-icon first time round. Renaming "Revision" to "Git Revision" would be a good solution.
Comment 6 Belen Barros Pena 2016-03-03 10:58:23 UTC
(In reply to comment #5)
> Renaming "Revision" to "Git Revision" would be a good solution.

Patch sent 

https://lists.yoctoproject.org/pipermail/toaster/2016-March/004007.html
Comment 7 Belen Barros Pena 2016-03-03 11:57:19 UTC
This should probably include running git ls-remote <giturl> when importing a layer, which would allow us to

1) check if a git url is reachable and warn users if it isn't
2) store available branches and show them to users for selection

And maybe even other tricks we haven't thought of yet. 

For some background on this see

https://bugzilla.yoctoproject.org/show_bug.cgi?id=9200#c1
https://bugzilla.yoctoproject.org/show_bug.cgi?id=9200#c2
https://bugzilla.yoctoproject.org/show_bug.cgi?id=9200#c3
Comment 8 David Reyna 2017-01-04 02:46:32 UTC
commit 97ff2c0091c654bf01bc4b0809a6a664ad6c579c
Author: Michael Wood <michael.g.wood@intel.com>
Date:   Fri Dec 9 16:52:49 2016