def is_installed(self): """We consider it installed if the macport package is installed and the config file changes are made. """ config_file = self.ctx.props.output_ports.apache.config_file if (not os.path.exists(config_file)) or \ (not self.ctx.rv(macports_pkg.is_installed, PORTS_PACKAGE_NAME)): return False elif not is_config_line_present(config_file, CFG_LINE1): return False elif not is_config_line_present(config_file, CFG_LINE2): return False else: return True
def is_installed(self): logger.debug("in wsgi is_installed") rv = self.ctx.rv p = self.ctx.props if not rv(is_installed, PORTS_PACKAGE_NAME): logger.debug("wsgi package not installed") return False elif not os.path.exists(p.output_ports.wsgi.config_file_path): logger.debug("wsgi config file not present") return False elif not is_config_line_present(p.output_ports.wsgi.config_file_path, APACHE_CONFIG_LINE): logger.debug("wsgi config line not present in %s" % p.output_ports.wsgi.config_file_path) return False else: logger.debug("mod_wsgi installed") return True