| Summary: | Require layer names to be unique | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | Belen Barros Pena <belen.barros.pena> | ||||||||
| Component: | toaster | Assignee: | Michael Wood <michael.g.wood> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Alexandru Roman <alexandru.costinx.roman> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | Medium | CC: | alexandru.costinx.roman, alexandru.damian, belen.barros.pena, bluelightning, cristiana.voicu, dave.lerner, david.reyna, jessica.zhang | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | 1.8 M4 | ||||||||||
| Hardware: | x86 | ||||||||||
| OS: | Multiple | ||||||||||
| Whiteboard: | |||||||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||||||
| Attachments: |
|
||||||||||
|
Description
Belen Barros Pena
2015-02-19 14:38:02 UTC
I wouldn't recommend making any changes to the import layer mechanism. The programmatic logic flow is coupled with the design, there is an assumption that we can update an existing layer, which includes all the error messages and checks/validation. (See the flow in http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake/lib/toaster/toastergui/views.py#n2388 and page 9 of your design document https://bugzilla.yoctoproject.org/attachment.cgi?id=2286) The only interim suggestion I can think of would be to have a description at the top of the import page saying something like "If we find an existing layer we will attempt to update it with the new values" (In reply to comment #1) > I wouldn't recommend making any changes to the import layer mechanism. Why? got my answer: logic is fiendishly complicated. After a very long discussion, we have identified 2 main problems: 1. When you import a layer that has the same name and git url of an existing layer, you are effectively updating that existing layer with the information you provide in the import layer form, but the interface does not explain this to you in any way 2. When you update a layer's revision using the process explained above you can no longer select the old revision, even though it is in the database. The only solution if you want to go back to the previous revision is to override the revision again, which is pretty clunky. We will address the above problems in 2 stages: Stage 1, covered by this bug, will implement some changes to the import layer page to communicate to users that when you import a layer with the same name and git url of an existing layer you are basically updating the layer information Stage 2, covered by bug 6640, will add a way to view and select which revision to build of all the ones that exist for a certain layer. Created attachment 2424 [details]
Design - Changes to the import layers page
Explains the suggested changes
commit dcbfc74c3ce9b69c020ed18ae42b8b27f8dc3991 (Bitbake rev: 4590cfcb2d5e26518e04f8abc8e7c2dad973f6d2) Created attachment 2888 [details]
layer
For a layer name that matches an existing imported layer name within the current project the subdirectory is not displayed even if it's not blank.
This happens on master too.
Created attachment 2889 [details]
layer details
Put this on reopened.
Sorry, reopened. (In reply to comment #6) > Created attachment 2888 [details] > layer > > For a layer name that matches an existing imported layer name within the > current project the subdirectory is not displayed even if it's not blank. > > This happens on master too. This seems quite a small problem, since the most important information about the layer (the git uri and the revision) are shown, and users are provided with a link to the full layer information. It is a bit harsh to reopen this bug because of this issue, so I am going to close it (mainly because we don't have manpower to tackle this small things... I wish we did). |