From c41f8cf05ca0bd675d4be36fff4e608d99da2a89 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Fri, 3 Nov 2006 12:39:42 +0000 Subject: [PATCH] =?UTF-8?q?*=20remove=20the=20=5Fbroken=5F=20component=20e?= =?UTF-8?q?xpand=20feature=20of=20install,=20remove,=20upgrade.=20=20=20A?= =?UTF-8?q?=20cleaner=20solution=20will=20come=20with=20-c=C2=A0[--compone?= =?UTF-8?q?nt]=20option.=20This=20is=20a=20quicker=20=20=20and=20safer=20f?= =?UTF-8?q?ix=20for=20YALI.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/operations.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/pisi/operations.py b/pisi/operations.py index cc4933ea..03d9da02 100644 --- a/pisi/operations.py +++ b/pisi/operations.py @@ -259,15 +259,6 @@ def check_conflicts(order, packagedb): return list(C) -def expand_components(A): - Ap = set() - for x in A: - if ctx.componentdb.has_component(x): - Ap = Ap.union(ctx.componentdb.get_union_comp(x).packages) - else: - Ap.add(x) - return Ap - def is_upgradable(name, ignore_build = False): if not ctx.installdb.is_installed(name): return False @@ -311,9 +302,8 @@ def install_pkg_names(A, reinstall = False): installs""" A = [str(x) for x in A] #FIXME: why do we still get unicode input here? :/ -- exa - # A was a list, remove duplicates and expand components - A_0 = A = expand_components(set(A)) - ctx.ui.debug('A = %s' % str(A)) + # A was a list, remove duplicates + A_0 = A = set(A) # filter packages that are already installed if not reinstall: @@ -409,7 +399,7 @@ def upgrade_pkg_names(A = []): # if A is empty, then upgrade all packages A = ctx.installdb.list_installed() - A_0 = A = expand_components(set(A)) + A_0 = A = set(A) Ap = [] for x in A: @@ -575,7 +565,7 @@ def remove(A, ignore_dep = False, ignore_safety = False): A = [str(x) for x in A] # filter packages that are not installed - A_0 = A = expand_components(set(A)) + A_0 = A = set(A) if not ctx.get_option('ignore_safety') and not ignore_safety: if ctx.componentdb.has_component('system.base'):