bitbake: toaster: Enforce unique layer names

We had some clever functionality to manage duplicate layer names by
using layer versions and new revisions, unfortunately this was too
opaque to the user.

[YOCTO #7337]

(Bitbake rev: 4590cfcb2d5e26518e04f8abc8e7c2dad973f6d2)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Wood
2015-03-02 15:00:49 +00:00
committed by Richard Purdie
parent d8ae3ac160
commit dcbfc74c3c
3 changed files with 82 additions and 62 deletions

View File

@@ -51,26 +51,51 @@
<div class="control-group" id="layer-name-ctrl">
<label class="control-label" for="import-layer-name">
Layer name
<span class="icon-question-sign get-help" title="Something like 'meta-mylayer'. Your layer name must be unique and can only include letters, numbers and dashes" />
<span class="icon-question-sign get-help" title="Something like 'meta-mylayer'. Your layer name must be unique and can only include letters, numbers and dashes"></span>
</label>
<div class="controls">
<input id="import-layer-name" type="text" required autofocus>
<input id="import-layer-name" type="text" required autofocus data-autocomplete="off" data-provide="typeahead">
<span class="help-inline" style="display: none;" id="invalid-layer-name-hint">A valid layer name can only include letters, numbers and dashes</span>
<span class="help-inline" style="display: none;" id="duplicated-layer-name-hint"></span>
</div>
</div>
<span id="duplicate-layer-info" style="display:none">
<div class="alert warning">
<h3>A layer called <a href="" class="dup-layer-link"><span class="dup-layer-name"></span></a> already exists</h3>
<p>Layer names must be unqiue. Please use a different layer name.</p>
</div>
<dl>
<dt>
The <span class="dup-layer-name"></span> repository url is
</dt>
<dd>
<span id="dup-layer-vcs-url"></span>
</dd>
<dt>
The <span class="dup-layer-name"></span> revision is
</dt>
<dd>
<span id="dup-layer-revision"></span>
</dd>
</dl>
<p><a href="" class="dup-layer-link">View the <span class="dup-layer-name"></span> layer information</a></p>
</span>
<span class="fields-apart-from-layer-name">
<label for="layer-git-repo-url" class="project-form">
Git repository URL
<span class="icon-question-sign get-help" title="Fetch/clone URL of the repository. Currently, Toaster only supports Git repositories." />
<span class="icon-question-sign get-help" title="Fetch/clone URL of the repository. Currently, Toaster only supports Git repositories." ></span>
</label>
<input type="text" id="layer-git-repo-url" class="input-xxlarge" required>
<label class="project-form" for="layer-subdir">
Repository subdirectory
<span class="muted">(optional)</span>
<span class="icon-question-sign get-help" title="Subdirectory within the repository where the layer is located, if not in the root (usually only used if the repository contains more than one layer)" />
<span class="icon-question-sign get-help" title="Subdirectory within the repository where the layer is located, if not in the root (usually only used if the repository contains more than one layer)"></span>
</label>
<input type="text" id="layer-subdir">
@@ -83,13 +108,16 @@
<span class="help-inline" style="diaply:none;" id="invalid-layer-revision-hint"></span>
</div>
</div>
</span>
</fieldset>
<span class="fields-apart-from-layer-name">
<fieldset class="air">
<legend>
Layer dependencies
<span class="muted">(optional)</span>
<span class="icon-question-sign get-help heading-help" title="Other layers this layer depends upon" />
<span class="icon-question-sign get-help heading-help" title="Other layers this layer depends upon"></span>
</legend>
<ul class="unstyled configuration-list" id="layer-deps-list">
</ul>
@@ -105,6 +133,7 @@
<button class="btn btn-primary btn-large" data-toggle="modal" id="import-and-add-btn" data-target="#dependencies-message" disabled>Import and add to project</button>
<span class="help-inline" id="import-and-add-hint" style="vertical-align: middle;">To import a layer, you need to enter a repository URL, a branch, tag or commit and a layer name</span>
</div>
</span>
</form>
{% endblock %}