]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: toaster: Allow forward slash in variable names
authorBelen Barros Pena <belen.barros.pena@linux.intel.com>
Mon, 5 Sep 2016 14:29:27 +0000 (15:29 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 7 Sep 2016 23:33:47 +0000 (00:33 +0100)
Add forward slash to the list of special characters allowed in variable
names. Also update the list of allowed special characters in the error
messages.

[YOCTO #9611]

(Bitbake rev: 146f6f95a8753308edb31e952d7c440c8de11870)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/toaster/toastergui/static/css/default.css
bitbake/lib/toaster/toastergui/templates/projectconf.html

index 88fe864e442d6d7201ffe1b494a877abeea7cbdb..ff24e8c1abfebef5c8e3454762180199b15a8d69 100644 (file)
@@ -182,6 +182,7 @@ dd.variable-list form { margin-top: 10px; }
 .scrolling.has-error { border-color: #a94442; }
 .help-block.text-danger { color: #a94442; }
 .tooltip-inner code { color: #fff; }
+.text-danger > code { color: #a94442; }
 dd.variable-list .glyphicon-question-sign { font-size: 14px; }
 dd.variable-list .glyphicon-edit { font-size: 16px; }
 dt .glyphicon-trash { margin-left: 5px; font-size: 16px; }
index c3ed21619487c2fa99156d2d7eb68333cabfbbfc..fcf6df2bf856a0a78a710b6531d6ea00f053bd78 100644 (file)
@@ -251,16 +251,16 @@ function validate_new_variable() {
     }
   }
 
-  var bad_chars  = /[^a-zA-Z0-9\-_]/.test(variable);
+  var bad_chars  = /[^a-zA-Z0-9\-_/]/.test(variable);
   var has_spaces = (0 <= variable.indexOf(" "));
   var only_spaces = (0 < variable.length) && (0 == variable.trim().length);
 
   if (only_spaces) {
     error_msg = "A valid variable name cannot include spaces";
   } else if (bad_chars && has_spaces) {
-    error_msg = "A valid variable name can only include letters, numbers, underscores, dashes, and cannot include spaces";
+    error_msg = "A valid variable name can only include letters, numbers and the special characters <code> _ - /</code>. Variable names cannot include spaces";
   } else if (bad_chars) {
-    error_msg = "A valid variable name can only include letters, numbers, underscores, and dashes";
+    error_msg = "A valid variable name can only include letters, numbers and the special characters <code>_ - /</code>";
   }
 
   if ("" != error_msg) {