Beispiel #1
0
    def getPackageInfo(self, pkg_name):
        """
        Get package information. The return is a dictionary containg the
        information about a package, in the format:

        package = {'package_name': <string>,
                   'version': <string>,
                   'arch': <string>,
                   'repository': <string>
                  }
        """
        self.wait_pkg_manager_available()
        try:
            return get_yum_package_info(pkg_name)
        except Exception, e:
            raise NotFoundError('GGBPKGUPD0003E', {'err': str(e)})
Beispiel #2
0
    def getPackageInfo(self, pkg_name):
        """
        Get package information. The return is a dictionary containg the
        information about a package, in the format:

        package = {'package_name': <string>,
                   'version': <string>,
                   'arch': <string>,
                   'repository': <string>
                  }
        """
        self.wait_pkg_manager_available()
        try:
            return get_yum_package_info(pkg_name)
        except Exception, e:
            raise NotFoundError('GGBPKGUPD0003E', {'err': str(e)})
Beispiel #3
0
    def getPackageInfo(self, pkg_name):
        """
        Get package information. The return is a dictionary containg the
        information about a package, in the format:

        package = {'package_name': <string>,
                   'version': <string>,
                   'arch': <string>,
                   'repository': <string>,
                   'depends': <list>
                  }
        """
        if self.isRunning():
            raise OperationFailed('GGBPKGUPD0005E')

        package = {}
        try:
            gingerBaseLock.acquire()
            package = get_yum_package_info(pkg_name)
        except Exception, e:
            raise NotFoundError('GGBPKGUPD0003E', {'err': str(e)})