# -*- Python -*- # # The configuration file of yumport. # It's a Python file (*not* a module). def guessFedoraDistTag ( release ): m = re.match(r".*\.fc(?P\d+)\..*",release) if m: return "fc%s" % (m.group("fcversion")) m = re.match(r".*\.(?P[^.]+)$",release) if m: return m.group("disttag") return release def guessPatchedDistTag ( release ): return "slsoc6" def binaryToSource ( binary ): def rePerlSepar ( mo ): if mo.group(0) == '(': return "-" elif mo.group(0) == ')': return "" elif mo.group(0) == "::": return "-" return "" matched = True source = binary if binary.startswith("perl("): print source source = re.sub(r"\(|\)|::",rePerlSepar,source) else: if binary == "qtscriptbindings": source = "qtscriptgenerator" else: matched = False return (source,matched) configuration.setDelayUpdateRepo (False) configuration.addSourceRepo ("soc-changed-source-local" ,guessFedoraDistTag) configuration.setTargetRpmsRepo ("soc-changed-local" ,"RPMS") configuration.setTargetSrpmsRepo ("soc-changed-source-local") configuration.setBinaryToSourceHook(binaryToSource)