Exemplo n.º 1
0
    def golang_package2upstream(self, package_name):
        '''
        Convert a package name packaged in Fedora to upstream URL
        @param upstream_url: URL of a project
        @return: URL of package upstream
        '''
        ret = ServiceResult()

        with self.get_lock(self.mappings_json):
            t = GoTranslator(self.mappings_json)
            ret.result = t.pkgname2upstream(package_name)

        return ret
Exemplo n.º 2
0
    def golang_upstream2package(self, upstream_url):
        '''
        Convert an upstream URL to a package name packaged in Fedora
        @param upstream_url: URL of a project
        @return: package name in Fedora
        '''
        ret = ServiceResult()

        with self.get_lock(self.mappings_json):
            t = GoTranslator(self.mappings_json)
            ret.result = t.upstream2pkgname(upstream_url)

        return ret