jhbuild r2064 - in trunk: . doc/C jhbuild jhbuild/commands



Author: fpeters
Date: Fri May  2 21:39:57 2008
New Revision: 2064
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2064&view=rev

Log:
* doc/C/jhbuild.xml, jhbuild/commands/base.py, jhbuild/moduleset.py:
add --build-optional-modules and --list-optional-modules (respectively
for the build and list commands) to include modules that would
otherwise not be built/listed in the dependency graph.

* doc/C/jhbuild.xml: add documentation for the --force option (for
build and buildone commands).



Modified:
   trunk/ChangeLog
   trunk/doc/C/jhbuild.xml
   trunk/jhbuild/commands/base.py
   trunk/jhbuild/moduleset.py

Modified: trunk/doc/C/jhbuild.xml
==============================================================================
--- trunk/doc/C/jhbuild.xml	(original)
+++ trunk/doc/C/jhbuild.xml	Fri May  2 21:39:57 2008
@@ -541,6 +541,8 @@
 	<arg>--no-xvfb</arg>
 	<arg>--try-checkout</arg>
 	<arg>--no-poison</arg>
+	<arg>--force</arg>
+	<arg>--build-optional-modules</arg>
 	<arg rep="repeat">module</arg>
       </cmdsynopsis>
 
@@ -666,6 +668,19 @@
 	  </listitem>
 	</varlistentry>
 
+	<varlistentry>
+	  <term><option>-f</option>, <option>--force</option></term>
+	  <listitem>Build the modules even if policy tells it is
+	  not required.</listitem>
+	</varlistentry>
+
+	<varlistentry>
+	  <term><option>--build-optional-modules</option></term>
+	  <listitem>Some modules, listed as optional dependencies, may not be
+	  required to build the target module, this option inncludes them
+	  nevertheless.</listitem>
+	</varlistentry>
+
       </variablelist>
 
     </section>
@@ -685,7 +700,8 @@
 	<arg>--distcheck</arg>
 	<arg>--no-network</arg>
 	<arg>-D <replaceable>date</replaceable></arg>
-	<arg>-x</arg>
+	<arg>--no-xvfb</arg>
+	<arg>--force</arg>
 	<arg choice="plain" rep="repeat">module</arg>
       </cmdsynopsis>
 
@@ -825,6 +841,7 @@
 	<arg>-r</arg>
 	<arg>-s</arg>
 	<arg>--tags=<replaceable>tags</replaceable></arg>
+	<arg>--list-optional-modules</arg>
 	<arg rep="repeat">module</arg>
       </cmdsynopsis>
 
@@ -862,6 +879,13 @@
 	  </listitem>
 	</varlistentry>
 
+	<varlistentry>
+	  <term><option>--list-optional-modules</option></term>
+	  <listitem>Some modules, listed as optional dependencies, may not be
+	  required to get to the target module, this option inncludes them
+	  nevertheless.</listitem>
+	</varlistentry>
+
       </variablelist>
 
     </section>

Modified: trunk/jhbuild/commands/base.py
==============================================================================
--- trunk/jhbuild/commands/base.py	(original)
+++ trunk/jhbuild/commands/base.py	Fri May  2 21:39:57 2008
@@ -164,6 +164,9 @@
             make_option('-f', '--force',
                         action='store_true', dest='force_policy', default=False,
                         help="build even if policy says not to"),
+            make_option('--build-optional-modules',
+                        action='store_true', dest='build_optional_modules', default=False,
+                        help="also build soft-dependencies that could be skipped"),
             ])
 
     def run(self, config, options, args):
@@ -196,7 +199,8 @@
 
         module_set = jhbuild.moduleset.load(config)
         module_list = module_set.get_module_list(args or config.modules,
-                config.skip, tags = config.tags)
+                config.skip, tags = config.tags,
+                include_optional_modules = options.build_optional_modules)
         # remove modules up to startat
         if options.startat:
             while module_list and module_list[0].name != options.startat:
@@ -367,6 +371,9 @@
             make_option('--tags',
                         action='append', dest='tags', default=[],
                         help='build only modules with the given tags'),
+            make_option('--list-optional-modules',
+                        action='store_true', dest='list_optional_modules', default=False,
+                        help="also list soft-dependencies that could be skipped"),
             ])
 
     def run(self, config, options, args):
@@ -376,7 +383,8 @@
             config.tags += item.split(',')
         module_set = jhbuild.moduleset.load(config)
         module_list = module_set.get_module_list(args or config.modules,
-                config.skip, tags = config.tags)
+                config.skip, tags = config.tags,
+                include_optional_modules = options.list_optional_modules)
 
         for mod in module_list:
             if options.show_rev:

Modified: trunk/jhbuild/moduleset.py
==============================================================================
--- trunk/jhbuild/moduleset.py	(original)
+++ trunk/jhbuild/moduleset.py	Fri May  2 21:39:57 2008
@@ -43,7 +43,8 @@
         '''add a Module object to this set of modules'''
         self.modules[module.name] = module
 
-    def get_module_list(self, seed, skip=[], tags=[], ignore_cycles = False):
+    def get_module_list(self, seed, skip=[], tags=[], ignore_cycles = False,
+                include_optional_modules = False):
         '''gets a list of module objects (in correct dependency order)
         needed to build the modules in the seed list'''
 
@@ -116,8 +117,10 @@
                 order([self.modules[x] for x in depmod.dependencies], depmod, 'suggests')
             for modname in module.after:
                 depmod = self.modules.get(modname)
-                if not depmod in all_modules:
-                    # not built otherwise
+                if not depmod in all_modules and not include_optional_modules:
+                    # skipping modules that would not be built otherwise
+                    # (build_optional_modules being the argument to force them
+                    # to be included nevertheless)
                     continue
                 if not depmod:
                     continue



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