old_contents: '''
  Created on March 10, 2013
  
  __author__ = "Elizabeth 'pidge' Flanagan"
  __copyright__ = "Copyright 2012-2013, Intel Corp."
  __credits__ = ["Elizabeth Flanagan"]
  __license__ = "GPL"
  __version__ = "2.0"
  __maintainer__ = "Elizabeth Flanagan"
  __email__ = "elizabeth.flanagan@intel.com"
  '''
  
  
  from buildbot.steps.shell import ShellCommand
  from buildbot.process.buildstep import LogLineObserver
  from autobuilder.config import *
  import os
  from twisted.python import log
  
  class BuildEclipsePlugin(ShellCommand):
      haltOnFailure = False
      flunkOnFailure = True
      name = "Building Eclipse Plugin"
      def __init__(self, factory, argdict=None, **kwargs):
          self._pendingLogObservers = []
          self.factory = factory
          self.eclipsedir = "eclipse-poky"
          for k, v in argdict.iteritems():
              setattr(self, k, v)
          self.description = "Building Eclipse Plugin"
          # Timeout needs to be passed to LoggingBuildStep as a kwarg
          self.timeout = 100000
          kwargs['timeout']=self.timeout
          self.workerworkdir=os.path.join(os.path.join(YOCTO_ABBASE, "yocto-worker"))
          for k, v in argdict.iteritems():
              setattr(self, k, v)
          ShellCommand.__init__(self, **kwargs)
  
      def start(self):
          buildername=self.getProperty("buildername")
          oldbuildername=buildername.replace("plugin", "poky")
          doc_branch=self.getProperty("branch")
          eclipse_branch=self.getProperty("branch_%s" % (oldbuildername))
          eclipsehome=self.workerworkdir + "/" + buildername + '/build'
          rel_name = 'development'
          if str(self.getProperty("custom_release_me")) == "True":
              yocto_number = self.getProperty("custom_yocto_number")
              rel_name = 'yocto-'+ yocto_number
          self.command='cd %s/scripts/; ./setup.sh; ECLIPSE_HOME="%s/scripts/eclipse/" ./build.sh %s %s %s' % \
                       (eclipsehome, eclipsehome, eclipse_branch, doc_branch, rel_name)
          ShellCommand.start(self)
  
new_contents: '''
  Created on March 10, 2013
  
  __author__ = "Elizabeth 'pidge' Flanagan"
  __copyright__ = "Copyright 2012-2013, Intel Corp."
  __credits__ = ["Elizabeth Flanagan"]
  __license__ = "GPL"
  __version__ = "2.0"
  __maintainer__ = "Elizabeth Flanagan"
  __email__ = "elizabeth.flanagan@intel.com"
  '''
  
  
  from buildbot.steps.shell import ShellCommand
  from buildbot.process.buildstep import LogLineObserver
  from autobuilder.config import *
  import os
  from twisted.python import log
  
  class BuildEclipsePlugin(ShellCommand):
      haltOnFailure = False
      flunkOnFailure = True
      name = "Building Eclipse Plugin"
      def __init__(self, factory, argdict=None, **kwargs):
          self._pendingLogObservers = []
          self.factory = factory
          self.eclipsedir = "eclipse-poky"
          for k, v in argdict.iteritems():
              setattr(self, k, v)
          self.description = "Building Eclipse Plugin"
          # Timeout needs to be passed to LoggingBuildStep as a kwarg
          self.timeout = 100000
          kwargs['timeout']=self.timeout
          self.workerworkdir=os.path.join(os.path.join(YOCTO_ABBASE, "yocto-worker"))
          for k, v in argdict.iteritems():
              setattr(self, k, v)
          ShellCommand.__init__(self, **kwargs)
  
      def start(self):
          buildername=self.getProperty("buildername")
          eclipsename=buildername.replace("eclipse-plugin-", "")
          oldbuildername=buildername.replace("plugin", "poky")
          doc_branch=self.getProperty("branch").replace(eclipsename,"").replace("/","").replace("-","")
          eclipse_branch=self.getProperty("branch_%s" % (oldbuildername))
          eclipsehome=self.workerworkdir + "/" + buildername + '/build'
          rel_name = 'development'
          if str(self.getProperty("custom_release_me")) == "True":
              yocto_number = self.getProperty("custom_yocto_number")
              rel_name = 'yocto-'+ yocto_number
          self.command='cd %s/scripts/; ./setup.sh; ECLIPSE_HOME="%s/scripts/eclipse/" ./build.sh %s %s %s' % \
                       (eclipsehome, eclipsehome, eclipse_branch, doc_branch, rel_name)
          ShellCommand.start(self)
  
subject: Fix eclipse builds with new git structure