jhbuild r1804 - in trunk: . jhbuild jhbuild/commands jhbuild/modtypes



Author: walters
Date: Fri Jan 11 21:26:43 2008
New Revision: 1804
URL: http://svn.gnome.org/viewvc/jhbuild?rev=1804&view=rev

Log:
2008-01-11  Colin Walters  <walters redhat com>

        http://bugzilla.gnome.org/show_bug.cgi?id=507930

        * jhbuild/commands/base.py: Add --force option to build and buildone.
        * jhbuild/modtypes/__init__.py: Allow for overriding policy.
        * jhbuild/config.py: Add variable force_policy to config.
        * jhbuild/defaults.jhbuildrc: Default force_policy to off.



Modified:
   trunk/ChangeLog
   trunk/jhbuild/commands/base.py
   trunk/jhbuild/config.py
   trunk/jhbuild/defaults.jhbuildrc
   trunk/jhbuild/modtypes/__init__.py

Modified: trunk/jhbuild/commands/base.py
==============================================================================
--- trunk/jhbuild/commands/base.py	(original)
+++ trunk/jhbuild/commands/base.py	Fri Jan 11 21:26:43 2008
@@ -153,6 +153,9 @@
             make_option('-N', '--no-poison',
                         action='store_true', dest='nopoison', default=False,
                         help="don't poison modules on failure"),
+            make_option('-f', '--force',
+                        action='store_true', dest='force_policy', default=False,
+                        help="build even if policy says not to"),
             ])
 
     def run(self, config, options, args):
@@ -178,6 +181,8 @@
             config.nopoison = True
         if options.quiet:
             config.quiet_mode = True
+        if options.force_policy:
+            config.force_policy = True
 
         module_set = jhbuild.moduleset.load(config)
         module_list = module_set.get_module_list(args or config.modules,
@@ -226,7 +231,10 @@
                         help='set a sticky date when checking out modules'),
             make_option('-x', '--no-xvfb',
                         action='store_true', dest='noxvfb', default=False,
-                        help='Run tests in real X and not in Xvfb')
+                        help='Run tests in real X and not in Xvfb'),
+            make_option('-f', '--force',
+                        action='store_true', dest='force_policy', default=False,
+                        help="build even if policy says not to"),
             ])
 
     def run(self, config, options, args):
@@ -246,6 +254,8 @@
             config.noxvfb = options.noxvfb
         if options.quiet:
             config.quiet_mode = True
+        if options.force_policy:
+            config.force_policy = True
 
         module_set = jhbuild.moduleset.load(config)
         try:

Modified: trunk/jhbuild/config.py
==============================================================================
--- trunk/jhbuild/config.py	(original)
+++ trunk/jhbuild/config.py	Fri Jan 11 21:26:43 2008
@@ -38,7 +38,7 @@
                 'tarballdir', 'pretty_print', 'svn_program', 'makedist',
                 'makedistcheck', 'nonotify', 'cvs_program',
                 'checkout_mode', 'copy_dir', 'module_checkout_mode',
-                'build_policy', 'trycheckout', 'nopoison', 'quiet_mode',
+                'build_policy', 'force_policy', 'trycheckout', 'nopoison', 'quiet_mode',
                 'progress_bar']
 
 env_prepends = {}

Modified: trunk/jhbuild/defaults.jhbuildrc
==============================================================================
--- trunk/jhbuild/defaults.jhbuildrc	(original)
+++ trunk/jhbuild/defaults.jhbuildrc	Fri Jan 11 21:26:43 2008
@@ -54,6 +54,7 @@
 makedistcheck = False  # run make distcheck after building
 trycheckout   = False  # try to force checkout and autogen on failure
 nopoison      = False  # don't poison modules on failure
+force_policy  = False  # Whether to override specified build policy
 
 interact      = True   # whether to interact with the user.
 quiet_mode    = False  # whether to display running commands output

Modified: trunk/jhbuild/modtypes/__init__.py
==============================================================================
--- trunk/jhbuild/modtypes/__init__.py	(original)
+++ trunk/jhbuild/modtypes/__init__.py	Fri Jan 11 21:26:43 2008
@@ -107,6 +107,8 @@
                               % srcdir)
 
 def check_build_policy(package, buildscript):
+    if buildscript.config.force_policy:
+        return
     if buildscript.config.build_policy in ('updated', 'updated-deps'):
         # has this module been updated ?
         if buildscript.packagedb.check(package.name, package.get_revision() or ''):



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