Skip to contentSkip to conversation

toaster: remove SSTATE_MIRRORS from blacklists in views

PATCH New Michael Wood 1 participant 2 messages Jun 24, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 toaster: remove SSTATE_MIRRORS from blacklists in views

From: Sujith H <[email protected]>

Remove SSTATE_MIRRORS variable from blacklists in views.py This helps user to point mirrors using SSTATE_MIRRORS with toaster.

[#YOCTO 9598]

---
 lib/toaster/toastergui/views.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
lib/toaster/toastergui/views.py +8 -3
index 28ff67b..c40273c 100755
@@ -1533,11 +1533,16 @@ if True:
     def xhr_configvaredit(request, pid):
         try:
             prj = Project.objects.get(id = pid)
+            # There are cases where user can add variables which hold values
+            # like http://, file:/// etc. In such case a simple split(":")
+            # would fail. One example is SSTATE_MIRRORS variable. So we use
+            # max_split var to handle them.
+            max_split = 1
             # add conf variables
             if 'configvarAdd' in request.POST:
                 t=request.POST['configvarAdd'].strip()
                 if ":" in t:
-                    variable, value = t.split(":")
+                    variable, value = t.split(":", max_split)
                 else:
                     variable = t
                     value = ""
@@ -1547,7 +1552,7 @@ if True:
             if 'configvarChange' in request.POST:
                 t=request.POST['configvarChange'].strip()
                 if ":" in t:
-                    variable, value = t.split(":")
+                    variable, value = t.split(":", max_split)
                 else:
                     variable = t
                     value = ""
@@ -2210,7 +2215,7 @@ if True:
         vars_blacklist  = {
             'PARALLEL_MAKE','BB_NUMBER_THREADS',
             'BB_DISKMON_DIRS','BB_NUMBER_THREADS','CVS_PROXY_HOST','CVS_PROXY_PORT',
-            'PARALLEL_MAKE','SSTATE_MIRRORS','TMPDIR',
+            'PARALLEL_MAKE','TMPDIR',
             'all_proxy','ftp_proxy','http_proxy ','https_proxy'
             }
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 toaster: remove SSTATE_MIRRORS from projectconf

From: Sujith H <[email protected]>

Remove SSTATE_MIRRORS from getting blacklisted. Hence the SSTATE_MIRRORS should be removed from projectconf.html file so that users can know that this variable is no more blacklisted.

[YOCTO #9598]

---
 lib/toaster/toastergui/templates/projectconf.html | 1 -
 1 file changed, 1 deletion(-)
lib/toaster/toastergui/templates/projectconf.html +0 -1
index bfa386d..9a8b841 100644
@@ -203,7 +203,6 @@
           <code>CVS_PROXY_HOST</code>
           <code>CVS_PROXY_PORT</code>
           <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-PARALLEL_MAKE" target="_blank">PARALLEL_MAKE</a></code>
-          <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-SSTATE_MIRRORS" target="_blank">SSTATE_MIRRORS</a></code>
           <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-TMPDIR" target="_blank">TMPDIR</a></code></p>
           <p>Plus the following standard shell environment variables:</p>
           <p><code>http_proxy</code> <code>ftp_proxy</code> <code>https_proxy</code> <code>all_proxy</code></p>
Signature · 1 line
2.7.4