Skip to contentSkip to conversation

toaster: fix naming for clone directory (ed/toaster/fix-directory-name)

PATCH In review Ed Bartosh 2 participants 2 messages Oct 7, 2015

lore
Share & tools
lore

Ed Bartosh

author
#0 lore raw

PATCH 1/1 toaster: fix naming for clone directory (ed/toaster/fix-directory-name)

Toaster uses git url and branch to make a clone directory name. Current code leaves '@' and '%' characters unchanged, which can cause generation of wrong directory names.

Fixed this issue by replacing '@' and '%' with underscore.

---
 bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +1 -1
index a8d8398..3ee68ae 100644
@@ -183,7 +183,7 @@ class LocalhostBEController(BuildEnvironmentController):
     def getGitCloneDirectory(self, url, branch):
         """Construct unique clone directory name out of url and branch."""
         if branch != "HEAD":
-            return "_toaster_clones/_%s_%s" % (re.sub('[:/]', '_', url), branch)
+            return "_toaster_clones/_%s_%s" % (re.sub('[:/@%]', '_', url), branch)
 
         # word of attention; this is a localhost-specific issue; only on the localhost we expect to have "HEAD" releases
         # which _ALWAYS_ means the current poky checkout

--
Ed

#1 lore raw
Quoted 4 lines · Ed Bartosh

Toaster uses git url and branch to make a clone directory name. Current code leaves '@' and '%' characters unchanged, which can cause generation of wrong directory names.

Submitted upstream.

Elliot

Quoted 35 lines

Fixed this issue by replacing '@' and '%' with underscore.

---
 bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +0 -0
index a8d8398..3ee68ae 100644
@@ -183,7 +183,7 @@ class

LocalhostBEController(BuildEnvironmentController):
def getGitCloneDirectory(self, url, branch):
"""Construct unique clone directory name out of url and branch.""" if branch != "HEAD":
- return "_toaster_clones/_%s_%s" % (re.sub('[:/]', '_', url),
branch)
+ return "_toaster_clones/_%s_%s" % (re.sub('[:/@%]', '_',
url), branch)

         # word of attention; this is a localhost-specific issue; only on
the localhost we expect to have "HEAD" releases
         # which _ALWAYS_ means the current poky checkout
--
Ed

--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Signature · 3 lines
Elliot Smith
Software Engineer
Intel Open Source Technology Centre