def __init__(self, distro, root_dir, instances): super(YumDependencyHandler, self).__init__(distro, root_dir, instances) self.rpmbuild_dir = sh.joinpths(self.deps_dir, "rpmbuild") self.deps_repo_dir = sh.joinpths(self.deps_dir, "openstack-deps") self.deps_src_repo_dir = sh.joinpths(self.deps_dir, "openstack-deps-sources") self.anvil_repo_filename = sh.joinpths(self.deps_dir, self.REPO_FN) # Track what file we create so they can be cleaned up on uninstall. trace_fn = tr.trace_filename(root_dir, 'deps') self.tracewriter = tr.TraceWriter(trace_fn, break_if_there=False) self.tracereader = tr.TraceReader(trace_fn) self.helper = yum_helper.Helper()
def __init__(self, distro, root_dir, instances, opts, group, prior_groups): self.distro = distro self.root_dir = root_dir self.instances = instances self.prior_groups = prior_groups self.opts = opts or {} self.group = group self.retries = max(0, int(opts.get('pip_retries', self.RETRIES))) self.retry_delay = max( 0, float(opts.get('pip_retry_delay', self.RETRY_DELAY))) # Various paths we will use while operating self.deps_dir = sh.joinpths(self.root_dir, "deps") self.download_dir = sh.joinpths(self.deps_dir, "download") self.log_dir = sh.joinpths(self.deps_dir, "output") sh.mkdir(self.log_dir, recurse=True) self.gathered_requires_filename = sh.joinpths( self.deps_dir, "pip-requires-group-%s" % group) self.forced_requires_filename = sh.joinpths( self.deps_dir, "forced-requires-group-%s" % group) self.download_requires_filename = sh.joinpths( self.deps_dir, "download-requires-group-%s" % group) self.multipip = multipip_helper.Helper() # List of requirements self.pips_to_install = [] self.forced_pips = [] # Instances to there app directory (with a setup.py inside) self.package_dirs = self._get_package_dirs(instances) # Track what file we create so they can be cleaned up on uninstall. trace_fn = tr.trace_filename(self.root_dir, 'deps') self.tracewriter = tr.TraceWriter(trace_fn, break_if_there=False) self.tracereader = tr.TraceReader(trace_fn) self.requirements = {} for key in ("build-requires", "requires", "conflicts"): req_set = set() for inst in self.instances: req_set |= set(pkg["name"] for pkg in inst.get_option(key) or []) self.requirements[key] = req_set ignore_pips = set() ignore_distro_pips = self.distro.get_dependency_config( "ignoreable_pips", quiet=True) if ignore_distro_pips: ignore_pips.update(ignore_distro_pips) self.ignore_pips = ignore_pips
def __init__(self, distro, root_dir, instances, opts): self.distro = distro self.root_dir = root_dir self.instances = instances self.opts = opts or {} # Various paths we will use while operating self.deps_dir = sh.joinpths(self.root_dir, "deps") self.downloaded_flag_file = sh.joinpths(self.deps_dir, "pip-downloaded") self.download_dir = sh.joinpths(self.deps_dir, "download") self.log_dir = sh.joinpths(self.deps_dir, "output") sh.mkdir(self.log_dir, recurse=True) self.gathered_requires_filename = sh.joinpths(self.deps_dir, "pip-requires") self.forced_requires_filename = sh.joinpths(self.deps_dir, "forced-requires") self.download_requires_filename = sh.joinpths(self.deps_dir, "download-requires") self.multipip = multipip_helper.Helper() # List of requirements self.pips_to_install = [] self.forced_packages = [] # Instances to there app directory (with a setup.py inside) self.package_dirs = self._get_package_dirs(instances) # Track what file we create so they can be cleaned up on uninstall. trace_fn = tr.trace_filename(self.root_dir, 'deps') self.tracewriter = tr.TraceWriter(trace_fn, break_if_there=False) self.tracereader = tr.TraceReader(trace_fn) self.requirements = {} for key in ("build-requires", "requires", "conflicts"): req_set = set() for inst in self.instances: req_set |= set(pkg["name"] for pkg in inst.get_option(key) or []) self.requirements[key] = req_set # These pip names we will ignore from being converted/analyzed... ignore_pips = self.distro.get_dependency_config("ignoreable_pips", quiet=True) if not ignore_pips: self.ignore_pips = set() else: self.ignore_pips = set(ignore_pips)
def __init__(self, distro, root_dir, instances, opts=None): self.distro = distro self.root_dir = root_dir self.instances = instances self.opts = opts or {} # Various paths we will use while operating self.deps_dir = sh.joinpths(self.root_dir, "deps") self.downloaded_flag_file = sh.joinpths(self.deps_dir, "pip-downloaded") self.download_dir = sh.joinpths(self.deps_dir, "download") self.log_dir = sh.joinpths(self.deps_dir, "output") self.gathered_requires_filename = sh.joinpths(self.deps_dir, "pip-requires") self.forced_requires_filename = sh.joinpths(self.deps_dir, "forced-requires") self.download_requires_filename = sh.joinpths(self.deps_dir, "download-requires") # Executables we require to operate self.multipip_executable = sh.which("multipip", ["tools/"]) self.pip_executable = sh.which_first(['pip-python', 'pip']) self.pipdownload_executable = sh.which("pip-download", ["tools/"]) # List of requirements self.pips_to_install = [] self.forced_packages = [] # Instances to there app directory (with a setup.py inside) self.package_dirs = self._get_package_dirs(instances) # Instantiate this as late as we can. self._python_names = None # Track what file we create so they can be cleaned up on uninstall. trace_fn = tr.trace_filename(self.root_dir, 'deps') self.tracewriter = tr.TraceWriter(trace_fn, break_if_there=False) self.tracereader = tr.TraceReader(trace_fn) self.requirements = {} for key in ("build-requires", "requires", "conflicts"): req_set = set() for inst in self.instances: req_set |= set(pkg["name"] for pkg in inst.get_option(key) or []) self.requirements[key] = req_set
def __init__(self, *args, **kargs): super(PkgUninstallComponent, self).__init__(*args, **kargs) trace_fn = tr.trace_filename(self.get_option('trace_dir'), 'created') self.tracereader = tr.TraceReader(trace_fn)
def __init__(self, *args, **kargs): component.Component.__init__(self, *args, **kargs) trace_fn = tr.trace_filename(self.get_option('trace_dir'), 'created') self.tracereader = tr.TraceReader(trace_fn) self.purge_packages = kargs.get('purge_packages')
def __init__(self, *args, **kargs): ProgramRuntime.__init__(self, *args, **kargs) trace_fn = tr.trace_filename(self.get_option('trace_dir'), 'start') self.tracewriter = tr.TraceWriter(trace_fn, break_if_there=True) self.tracereader = tr.TraceReader(trace_fn)