def rpm_install(rpm_name):
    _LOGGER.info("Installing the rpm")
    nodeps = ''
    if env.nodeps:
        nodeps = '--nodeps '

    if 'java8_home' not in env or env.java8_home is None:
        ret = sudo('rpm -i %s%s' %
                   (nodeps, os.path.join(constants.REMOTE_PACKAGES_PATH,
                                         rpm_name)))
    else:
        with shell_env(JAVA8_HOME='%s' % env.java8_home):
            ret = sudo('rpm -i %s%s' %
                       (nodeps, os.path.join(constants.REMOTE_PACKAGES_PATH,
                                             rpm_name)))
    if ret.succeeded:
        print("Package installed successfully on: " + env.host)
dataset/ETHPy150Open prestodb/presto-admin/prestoadmin/package.py/rpm_install/original