def get_chroot(self, platform=None): if not platform: platform = list(self.platforms)[0] return BuildEnv.getChrootSynoBase(platform, self.__get_version(platform), self.suffix)
def __init__(self, package): self.name = package self.package_proj = BuildEnv.Project(self.name) self.dict_projects = dict() self.__additional_build = defaultdict(list) self.__spk_config = None self.__chroot = None
def link_platform(project, platform, version=None): source = get_project_source(project) chroot = BuildEnv.getChrootSynoBase(platform, version) dest = os.path.join(chroot, "source", project) if os.path.isdir(dest): shutil.rmtree(dest) link(source, dest)
def loadConfigFiles(config): dictDepends = config.project_depends confList = glob.glob(ScriptDir + "/../source/*/SynoBuildConf/depends*") for confPath in confList: project = confPath.split("/")[-3] filename = confPath.split("/")[-1] if BuildEnv.isVirtualProject(filename): project = ( BuildEnv.deVirtual(project) + BuildEnv.VIRTUAL_PROJECT_SEPARATOR + BuildEnv.getVirtualName(filename) ) if os.path.isfile(confPath): depends = DependsParser(confPath) if project not in dictDepends: dictDepends[project] = [] dictDepends[project] = list(set(dictDepends[project] + depends.build_dep)) dictDepends[project] = list(set(dictDepends[project] + depends.build_tag)) return dictDepends
def getBaseEnvironment(proj, env, ver=None): dict_env = {} if ver: dict_env['all'] = ver return dict_env if not env: env = 'default' depends = config_parser.DependsParser( BuildEnv.Project(proj).depends_script) dict_env = depends.get_env_section(env) return dict_env
def loadConfigFiles(config): dictDepends = config.project_depends confList = glob.glob(ScriptDir + "/../source/*/SynoBuildConf/depends*") for confPath in confList: project = confPath.split('/')[-3] filename = confPath.split('/')[-1] if BuildEnv.isVirtualProject(filename): project = BuildEnv.deVirtual( project ) + BuildEnv.VIRTUAL_PROJECT_SEPARATOR + BuildEnv.getVirtualName( filename) if os.path.isfile(confPath): depends = DependsParser(confPath) if project not in dictDepends: dictDepends[project] = [] dictDepends[project] = list( set(dictDepends[project] + depends.build_dep)) dictDepends[project] = list( set(dictDepends[project] + depends.build_tag)) return dictDepends
def _resolve_project_catagory(self, projects): branches = set() tags = set() refs = set() refTags = set() for proj in projects: depends_file = BuildEnv.Project(proj).depends_script if os.path.isfile(depends_file): depends = DependsParser(depends_file) branches.update(depends.build_dep) tags.update(depends.build_tag) refs.update(depends.ref_only) refTags.update(depends.ref_only_tag) else: if proj in self.proj_depends.project_depends: tags.update(self.proj_depends.get_project_dep(proj)) for catagory in branches, tags, refs, refTags: # dynamic variable for var in self.proj_depends.dynamic_variables: if var in catagory: catagory.remove(var) catagory.update( self.proj_depends.get_dyn_sec_values( var, self.platforms)) # synobios for k, v in self.proj_depends.variables.items(): if k in catagory: catagory.remove(k) catagory.update( v + self.proj_depends.get_platform_kernels(self.platforms)) return branches, tags, refs, refTags
def prebuild_projects(self): return BuildEnv.getList("PreBuildProjects") or []
def prebuild_projects(self): return BuildEnv.getList('PreBuildProjects') or []