Skip to contentSkip to conversation

PublishLayerTarballs.py: don't change directories for Eclipse builds

PATCH Superseded Bill Randle 2 participants 2 messages Jul 8, 2016 – Jul 12, 2016

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PublishLayerTarballs.py: don't change directories for Eclipse builds

When publishing eclipse tarballs, we are already in the correct directory, so skip the change direction operation (which will generate an error).

---
 .../site-packages/autobuilder/buildsteps/PublishLayerTarballs.py       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/python2.7/site-packages/autobuilder/buildsteps/PublishLayerTarballs.py +2 -1
index c140725..7c1ce4a 100644
@@ -38,7 +38,8 @@ class PublishLayerTarballs(ShellCommand):
         snapshot = ""
         self.basedir=os.path.join(os.path.join(os.path.join(
                                     self.workerdir, buildername), self.workdir))
-        if self.layername is not "poky":
+        if self.layername is not "poky"
+           and "eclipse" is not in self.layername:
             command = "cd " + self.layername + ";"
         else:
             command = ""
Signature · 1 line
2.5.5
#1 lore raw
Quoted 21 lines · Bill Randle

When publishing eclipse tarballs, we are already in the correct directory,
so skip the change direction operation (which will generate an error).

---
 .../site- packages/autobuilder/buildsteps/PublishLayerTarballs.py       | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

packages/autobuilder/buildsteps/PublishLayerTarballs.py b/lib/python2.7/site- packages/autobuilder/buildsteps/PublishLayerTarballs.py index c140725..7c1ce4a 100644
--- a/lib/python2.7/site- packages/autobuilder/buildsteps/PublishLayerTarballs.py +++ b/lib/python2.7/site- packages/autobuilder/buildsteps/PublishLayerTarballs.py

(quoted diff) +0 -0
@@ -38,7 +38,8 @@ class PublishLayerTarballs(ShellCommand):
Quoted 7 lines

         snapshot = "" self.basedir=os.path.join(os.path.join(os.path.join( self.workerdir, buildername), self.workdir))
-        if self.layername is not "poky":
+        if self.layername is not "poky"
+           and "eclipse" is not in self.layername:

That's not valid Python syntax, you want foo not in bar:

[joshuagl@munchkin ~]

$ python3
Python 3.5.1 (default, Jun 20 2016, 14:48:22) 
[GCC 6.1.1 20160510 (Red Hat 6.1.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
Quoted 1 line
Quoted 1 line
Quoted 1 line

"eclipse" is not in "foo"

  File "<stdin>", line 1
    "eclipse" is not in "foo"
                      ^
SyntaxError: invalid syntax

Quoted 1 line
Quoted 1 line
Quoted 1 line

"eclipse" not in "foo"

True

Regards,

Joshua

Quoted 3 lines

             command = "cd " + self.layername + ";" else:
             command = ""