From 847d466c2298fcc7d3bfe976ab1d1b999e354d0b Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Thu, 5 Oct 2006 11:24:50 +0000 Subject: [PATCH] * remove --show_abandoned_files option... build -d does this. * remove unused imports from api.py * package conflicts != file conflicts -> add --ignore-package-conflicts option for these parts. * build option does not need --ignore-file-conflicts and --ignore-comar... but they are meaningful for emerge --- pisi/api.py | 2 -- pisi/build.py | 2 +- pisi/cli/commands.py | 17 ++++++++++------- pisi/operations.py | 6 +++--- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/pisi/api.py b/pisi/api.py index ebea9717..cc9dfea8 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -15,8 +15,6 @@ import os import sys import logging import logging.handlers -from os.path import exists -import bsddb3.db as db import gettext __trans = gettext.translation('pisi', fallback=True) diff --git a/pisi/build.py b/pisi/build.py index 7544d422..5d997b65 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -823,7 +823,7 @@ class Builder: ctx.ui.info(_("Done.")) #show the files those are not collected from the install dir - if ctx.get_option('show_abandoned_files') or ctx.get_option('debug'): + if ctx.get_option('debug'): abandoned_files = self.get_abandoned_files() if abandoned_files: ctx.ui.warning(_('Abandoned files under the install dir (%s):') % (install_dir)) diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 1428b877..cf1ad347 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -441,18 +441,11 @@ to be downloaded from a repository containing sources. ignoredep_opt(self, group) group.add_option("-O", "--output-dir", action="store", default=None, help=_("Output directory for produced packages")) - group.add_option("--show-abandoned-files", action="store_true", - default=False, - help=_("Show abandoned files under the install directory after build.")) group.add_option("--ignore-action-errors", action="store_true", default=False, help=_("Bypass errors from ActionsAPI")) group.add_option("--ignore-safety", action="store_true", default=False, help=_("Bypass safety switch")) - group.add_option("--ignore-file-conflicts", action="store_true", - default=False, help=_("Ignore file conflicts")) - group.add_option("--ignore-comar", action="store_true", - default=False, help=_("Bypass comar configuration agent")) group.add_option("--create-static", action="store_true", default=False, help=_("Create a static package with ar files")) group.add_option("--no-install", action="store_true", @@ -525,6 +518,12 @@ You can also give the name of a component. group = OptionGroup(self.parser, _("emerge options")) super(Emerge, self).add_options(group) + group.add_option("--ignore-file-conflicts", action="store_true", + default=False, help=_("Ignore file conflicts")) + group.add_option("--ignore-package-conflicts", action="store_true", + default=False, help=_("Ignore package conflicts")) + group.add_option("--ignore-comar", action="store_true", + default=False, help=_("Bypass comar configuration agent")) self.parser.add_option_group(group) def run(self): @@ -594,6 +593,8 @@ expanded to package names. default=False, help=_("Reinstall already installed packages")) group.add_option("--ignore-file-conflicts", action="store_true", default=False, help=_("Ignore file conflicts")) + group.add_option("--ignore-package-conflicts", action="store_true", + default=False, help=_("Ignore package conflicts")) group.add_option("-f", "--fetch-only", action="store_true", default=False, help=_("Fetch upgrades but do not install.")) self.parser.add_option_group(group) @@ -645,6 +646,8 @@ expanded to package names. default=False, help=_("Do not update repositories")) group.add_option("--ignore-file-conflicts", action="store_true", default=False, help=_("Ignore file conflicts")) + group.add_option("--ignore-package-conflicts", action="store_true", + default=False, help=_("Ignore package conflicts")) group.add_option("-e", "--eager", action="store_true", default=False, help=_("eager upgrades")) group.add_option("-f", "--fetch-only", action="store_true", diff --git a/pisi/operations.py b/pisi/operations.py index 2eed35db..50a911fc 100644 --- a/pisi/operations.py +++ b/pisi/operations.py @@ -175,7 +175,7 @@ in the respective order to satisfy extra dependencies: if ctx.config.get_option('debug'): G_f.write_graphviz(sys.stdout) order = G_f.topological_sort() - if not ctx.get_option('ignore_file_conflicts'): + if not ctx.get_option('ignore_package_conflicts'): check_conflicts(order, packagedb) order.reverse() ctx.ui.info(_('Installation order: ') + util.strlist(order) ) @@ -376,7 +376,7 @@ def plan_install_pkg_names(A): G_f.write_graphviz(sys.stdout) order = G_f.topological_sort() order.reverse() - if not ctx.get_option('ignore_file_conflicts'): + if not ctx.get_option('ignore_package_conflicts'): check_conflicts(order, ctx.packagedb) return G_f, order @@ -545,7 +545,7 @@ def plan_upgrade(A, ignore_build = False): G_f.write_graphviz(sys.stdout) order = G_f.topological_sort() order.reverse() - if not ctx.get_option('ignore_file_conflicts'): + if not ctx.get_option('ignore_package_conflicts'): check_conflicts(order, ctx.packagedb) return G_f, order