From d6422390f721a067d8d44a24710bcc8913087a95 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Sun, 22 Oct 2006 18:19:35 +0000 Subject: [PATCH] * remove comment and unused code --- pisi/operations.py | 74 ---------------------------------------------- 1 file changed, 74 deletions(-) diff --git a/pisi/operations.py b/pisi/operations.py index 8b0a332f..eaf55b45 100644 --- a/pisi/operations.py +++ b/pisi/operations.py @@ -10,8 +10,6 @@ # Please read the COPYING file. # -"""Package Operations: install/remove/upgrade""" - import os import sys @@ -644,78 +642,6 @@ def expand_src_components(A): Ap.add(x) return Ap -##def build_names(A, rebuild = true): -## -## # A was a list, remove duplicates and expand components -## A_0 = A = expand_src_components(set(A)) -## ctx.ui.debug('A = %s' % str(A)) -## -## # filter packages that are already installed -## if not rebuild: -## Ap = set(filter(lambda x: not ctx.installdb.is_installed(x), A)) -## d = A - Ap -## if len(d) > 0: -## ctx.ui.warning(_('Not re-building the following packages: ') + -## util.strlist(d)) -## A = Ap -## -## if len(A)==0: -## ctx.ui.info(_('No packages to build.')) -## return -## -## if not ctx.config.get_option('ignore_dependency'): -## G_f, order_inst = plan_build_pkg_names(A) -## else: -## G_f = None -## order_inst = [] -## -## ctx.ui.info(_("""The following minimal list of packages will be installed -##in the respective order to satisfy dependencies: -##""") + util.strlist(order)) -## -## if ctx.get_option('dry_run'): -## return -## -## if len(order) > len(A_0): -## if not ctx.ui.confirm(_('There are extra packages due to dependencies. Do you want to continue?')): -## return False -## -## ctx.ui.notify(ui.packagestogo, order = order) -## -## for x in order: -## atomicoperations.install_single_name(x) -## -##def plan_build_names(A): -## # try to construct a pisi graph of packages to -## # install / reinstall -## -## G_f = pgraph.PGraph(packagedb) # construct G_f -## -## # find the "install closure" graph of G_f by package -## # set A using packagedb -## for x in A: -## G_f.add_package(x) -## B = A -## -## while len(B) > 0: -## Bp = set() -## for x in B: -## pkg = packagedb.get_package(x) -## for dep in pkg.runtimeDependencies(): -## ctx.ui.debug('checking %s' % str(dep)) -## # we don't deal with already *satisfied* dependencies -## if not dependency.installed_satisfies_dep(dep): -## if not dep.package in G_f.vertices(): -## Bp.add(str(dep.package)) -## G_f.add_dep(x, dep) -## B = Bp -## if ctx.config.get_option('debug'): -## G_f.write_graphviz(sys.stdout) -## order = G_f.topological_sort() -## order.reverse() -## check_conflicts(order) -## return G_f, order - def emerge(A, rebuild_all = False): # A was a list, remove duplicates and expand components