示例#1
0
 def __init__(self, factory, scheduler=None, layername=None, mode='full',  storedir=None, mirrordir=None,
             method='clobber', submodules=False, shallow=False, workdir='build',
             timeout=100000, progress=True, retryFetch=True, clobberOnFailure=False,
             getDescription=True, argdict=None,
              **kwargs):
     self.scheduler = scheduler
     self.workdir=workdir
     self.branch = ""
     self.commit = ""
     self.method = method
     self.prog = progress
     self.repourl = ""
     self.retryFetch = retryFetch
     self.submodules = submodules
     self.shallow = shallow
     self.storedir=storedir
     self.mirrordir=mirrordir
     self.fetchcount = 0
     self.clobberOnFailure = clobberOnFailure
     self.mode = mode
     self.timeout = 100000
     self.getDescription = getDescription
     self.layername = layername
     self.name="Git checkout of " + layername
     kwargs['timeout']=self.timeout
     for k, v in argdict.iteritems():
         setattr(self, k, v)
     YoctoGit.__init__(self, repourl=self.repourl, branch=self.branch, mode=self.mode,
              method=self.method, storedir=self.storedir, mirrordir=mirrordir, submodules=self.submodules,
              workdir=self.workdir, shallow=self.shallow, progress=self.progress,
              retryFetch=self.retryFetch, clobberOnFailure=self.clobberOnFailure,
              getDescription=self.getDescription, layername=self.layername, **kwargs)
示例#2
0
    def startVC(self, branch, revision, patch):
        if self.getProperty('branch_'+self.layername):
            self.branch = self.getProperty('branch_'+self.layername)
        else:
            self.branch = "master"
        if self.getProperty('repo_'+self.layername):
            self.repourl = self.getProperty('repo_'+self.layername)
        else:
            self.repourl = "git://git.yoctoproject.org/poky"

        if self.getProperty('commit_'+self.layername) == "HEAD" and \
           self.getProperty('commit_resolvedhead_'+self.layername) is not None:
            log.msg("Using Resolved HEAD")
            self.commit = self.getProperty('commit_resolvedhead_'+self.layername)
        elif self.getProperty('commit_'+self.layername):
            self.commit = self.getProperty('commit_'+self.layername)
        else:
            self.commit = "HEAD"

        self.setProperty('repourl_' + self.layername, self.repourl, "CheckOutLayers")
        self.setProperty('branch_' + self.layername, self.branch, "CheckOutLayers")
        self.setProperty('commit_' + self.layername, self.commit, "CheckOutLayers")
        if self.layername == "poky" or self.layername == "oecore" or "eclipse" in self.layername:
            self.setProperty('repository', self.repourl, "CheckOutLayers")
            self.setProperty('branch', self.branch, "CheckOutLayers")
            self.setProperty('revision', self.commit, "CheckOutLayers")
        YoctoGit.startVC(self, branch=self.branch, patch=None, revision=self.commit)
示例#3
0
    def startVC(self, branch, revision, patch):
        if self.getProperty("branch_trigger_" + self.layername + "_" + self.scheduler):
            self.branch = self.getProperty("branch_trigger_" + self.layername + "_" + self.scheduler)
        elif self.getProperty("branch_triggerer_" + self.layername + "_" + self.scheduler):
            self.branch = self.getProperty("branch_triggerer_" + self.layername + "_" + self.scheduler)
        elif self.getProperty("branch_" + self.layername):
            self.branch = self.getProperty("branch_" + self.layername)
        else:
            self.branch = "master"
        if self.getProperty("repo_trigger_" + self.layername + "_" + self.scheduler):
            self.repourl = self.getProperty("repo_trigger_" + self.layername + "_" + self.scheduler)
        elif self.getProperty("repo_triggerer_" + self.layername + "_" + self.scheduler):
            self.repourl = self.getProperty("repo_triggerer_" + self.layername + "_" + self.scheduler)
        elif self.getProperty("repo_" + self.layername):
            self.repourl = self.getProperty("repo_" + self.layername)
        else:
            self.repourl = "git://git.yoctoproject.org/poky"

        if (
            self.getProperty("commit_trigger_" + self.layername + "_" + self.scheduler) == "HEAD"
            and self.getProperty("repo_trigger_" + self.layername + "_" + self.scheduler)
            == self.getProperty("triggers_repo_" + self.layername)
            and self.getProperty("branch_trigger_" + self.layername + "_" + self.scheduler)
            == self.getProperty("triggers_branch_" + self.layername)
            and self.getProperty("commit_resolvedhead_" + self.layername) is not None
        ):
            log.msg("Using Resolved HEAD")
            self.commit = self.getProperty("commit_resolvedhead_" + self.layername)
        elif self.getProperty("commit_trigger_" + self.layername + "_" + self.scheduler):
            self.commit = self.getProperty("commit_trigger_" + self.layername + "_" + self.scheduler)
        elif self.getProperty("commit_triggerer_" + self.layername + "_" + self.scheduler):
            self.commit = self.getProperty("commit_triggerer_" + self.layername + "_" + self.scheduler)
        elif self.getProperty("commit_" + self.layername):
            self.commit = self.getProperty("commit_" + self.layername)
        else:
            self.commit = "HEAD"

        self.setProperty("repourl_" + self.layername, self.repourl, "CheckOutLayers")
        self.setProperty("branch_" + self.layername, self.branch, "CheckOutLayers")
        self.setProperty("commit_" + self.layername, self.commit, "CheckOutLayers")
        if self.layername == "poky" or self.layername == "oecore" or "eclipse" in self.layername:
            self.setProperty("repository", self.repourl, "CheckOutLayers")
            self.setProperty("branch", self.branch, "CheckOutLayers")
            self.setProperty("revision", self.commit, "CheckOutLayers")
        YoctoGit.startVC(self, branch=self.branch, patch=None, revision=self.commit)