[jhbuild] [uninstall] changed to only uninstall the modules listed on the command line



commit b500573602c725a8e8b4d56305f54c28973dea31
Author: Frédéric Péters <fpeters 0d be>
Date:   Mon Aug 24 17:18:09 2009 +0200

    [uninstall] changed to only uninstall the modules listed on the command line

 doc/C/jhbuild.xml             |    9 +--------
 jhbuild/commands/uninstall.py |   29 +++++------------------------
 2 files changed, 6 insertions(+), 32 deletions(-)
---
diff --git a/doc/C/jhbuild.xml b/doc/C/jhbuild.xml
index bb39aa8..11029e3 100644
--- a/doc/C/jhbuild.xml
+++ b/doc/C/jhbuild.xml
@@ -1208,16 +1208,9 @@ libgnomecanvas is missing branch definition for gnome-2-20
 
       <cmdsynopsis>
         <command>jhbuild uninstall</command>
-        <arg rep="repeat">--skip=<replaceable>module</replaceable></arg>
-        <arg>--start-at=<replaceable>module</replaceable></arg>
+        <arg choice="plain" rep="repeat">module</arg>
       </cmdsynopsis>
 
-      <para>If no module names are given on the command line, then the module
-      list found in the configuration file will be used.</para>
-      
-      <para>Look at the <link linkend="command-reference-build">build</link>
-      command documentation for a description of available options.</para>
-
     </section>
 
     <section id="command-reference-update">
diff --git a/jhbuild/commands/uninstall.py b/jhbuild/commands/uninstall.py
index ba7e4a0..521b84f 100644
--- a/jhbuild/commands/uninstall.py
+++ b/jhbuild/commands/uninstall.py
@@ -29,35 +29,16 @@ class cmd_uninstall(Command):
     doc = _('Uninstall all modules')
 
     name = 'uninstall'
-    usage_args = '[ options ... ] [ modules ... ]'
-
-    def __init__(self):
-        Command.__init__(self, [
-            make_option('-s', '--skip', metavar='MODULES',
-                        action='append', dest='skip', default=[],
-                        help=_('treat the given modules as up to date')),
-            make_option('-t', '--start-at', metavar='MODULE',
-                        action='store', dest='startat', default=None,
-                        help=_('start building at the given module')),
-            make_option('--one', metavar='MODULE',
-                        action='store_true', dest='one', default=False,
-                        help=_('uninstall modules passed on command line only')),
-            ])
+    usage_args = N_('[ options ... ] [ modules ... ]')
 
     def run(self, config, options, args):
         config.set_from_cmdline_options(options)
 
         module_set = jhbuild.moduleset.load(config)
-        if options.one:
-            module_list = [module_set.get_module(modname, ignore_case = True) for modname in args]
-        else:
-            module_list = module_set.get_module_list(args or config.modules, config.skip)
-            # remove modules up to startat
-            if options.startat:
-                while module_list and module_list[0].name != options.startat:
-                    del module_list[0]
-                if not module_list:
-                    raise FatalError(_('%s not in module list') % options.startat)
+        module_list = [module_set.get_module(modname, ignore_case = True) for modname in args]
+
+        if not module_list:
+            self.parser.error(_('This command requires a module parameter.'))
 
         # remove modules that are not marked as installed
         packagedb = jhbuild.frontends.get_buildscript(config, []).packagedb



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]