def git_unpack( self, repoString ): raise Exception('This function is deprecated. It calls undefined utils.replaceGitUrl.') # pylint: disable=W0101 # pylint should not warn about unreachable code here svndir = os.path.join( self.downloaddir, "svn-src" ) ret = True if ( not self.noFetch ): safePath = os.environ["PATH"] os.environ["PATH"] = os.path.join(self.rootdir, "dev-utils", "git", "bin") + ";" + safePath if os.path.exists( self.svndir ): # if directory already exists, simply do a pull but obey to offline ret = self.msys.msysExecute( self.svndir, "git", "pull" ) else: # it doesn't exist so clone the repo # first try to replace with a repo url from etc/portage/emergehosts.conf # TODO: This fails: repoString = utils.replaceGitUrl( repoString ) repoUrl = utils.splitVCSUrl( repoString )[0] ret = self.msys.msysExecute( svndir, "git", "clone %s %s" % ( repoUrl, self.package ) ) dummyUrl2, repoBranch, repoTag = utils.splitVCSUrl( repoString ) if ret and repoBranch: ret = self.msys.msysExecute( self.svndir, "git", "checkout --track -b %s origin/%s" % ( repoBranch, repoBranch ) ) if ret and repoTag: ret = self.msys.msysExecute( self.svndir, "git", "checkout -b %s %s" % ( repoTag, repoTag ) ) os.environ["PATH"] = safePath else: utils.debug( "skipping git fetch (--offline)" ) return ret
def getUpdatableVCSTargets(self, category, package): """ check if the targets are tags or not """ targetDict = PortageInstance.getAllVCSTargets(category, package) retList = [] for key in targetDict: url = targetDict[key] if url: sourceType = utils.getVCSType(url) if sourceType == "svn": # for svn, ignore tags if not url.startswith("tags/") and not "/tags/" in url: retList.append(key) elif sourceType == "git": _, branch, tag = utils.splitVCSUrl(url) if tag == "" and not branch.endswith("-patched"): retList.append(key) elif not sourceType == "": # for all other vcs types, simply rebuild everything for now retList.append(key) return retList
def getUpdatableVCSTargets(self, category, package, version): """ check if the targets are tags or not """ targetDict = PortageInstance.getAllVCSTargets(category, package, version) retList = [] for key in targetDict: url = targetDict[key] if url: sourceType = utils.getVCSType(url) if sourceType == "svn": # for svn, ignore tags if not url.startswith("tags/") and not "/tags/" in url: retList.append(key) elif sourceType == "git": _, branch, tag = utils.splitVCSUrl(url) if tag == "" and not branch.endswith("-patched"): retList.append(key) elif not sourceType == "": # for all other vcs types, simply rebuild everything for now retList.append(key) return retList