[jhbuild/desrt/master: 4/22] core: stop ignoring 'after' modules



commit 5057794019cde9cd92706b62ca0deb40d7dc0b62
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Jan 10 13:46:30 2015 -0500

    core: stop ignoring 'after' modules
    
    The --build-optional-modules flag on the 'build' command was the only
    way to get jhbuild to actually consider 'after' modules.  Get rid of it
    and turn that functionality on by default.
    
    Add a new config flag to turn it off.  That makes it the same as
    'suggests' now (which has a similar config flag).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693290

 jhbuild/commands/base.py   |   10 ++++------
 jhbuild/config.py          |    2 +-
 jhbuild/defaults.jhbuildrc |    3 +++
 jhbuild/moduleset.py       |    4 ++--
 4 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/jhbuild/commands/base.py b/jhbuild/commands/base.py
index f66ac14..9259353 100644
--- a/jhbuild/commands/base.py
+++ b/jhbuild/commands/base.py
@@ -64,7 +64,8 @@ class cmd_update(Command):
         module_set = jhbuild.moduleset.load(config)
         module_list = module_set.get_module_list(args or config.modules,
                 config.skip, tags=config.tags,
-                include_suggests=not config.ignore_suggests)
+                include_suggests=not config.ignore_suggests,
+                include_afters=not config.ignore_after)
         # remove modules up to startat
         if options.startat:
             while module_list and module_list[0].name != options.startat:
@@ -218,9 +219,6 @@ class cmd_build(BuildCommand):
             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')),
             make_option('--min-age', metavar='TIME-SPEC',
                         action='store', dest='min_age', default=None,
                         help=_('skip modules installed less than the given time ago')),
@@ -237,7 +235,7 @@ class cmd_build(BuildCommand):
         full_module_list = module_set.get_full_module_list \
                                (modules, config.skip,
                                 include_suggests=not config.ignore_suggests,
-                                include_afters=options.build_optional_modules)
+                                include_afters=not config.ignore_after)
         full_module_list = module_set.remove_tag_modules(full_module_list,
                                                          config.tags)
         module_list = module_set.remove_system_modules(full_module_list)
@@ -465,7 +463,7 @@ class cmd_list(Command):
                               (args or config.modules, config.skip,
                                tags=config.tags,
                                include_suggests= not config.ignore_suggests,
-                               include_afters=options.list_optional_modules)
+                               include_afters=not config.ignore_after)
 
         # remove modules up to startat
         if options.startat:
diff --git a/jhbuild/config.py b/jhbuild/config.py
index 613a9ce..bb5442d 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -59,7 +59,7 @@ _known_keys = [ 'moduleset', 'modules', 'skip', 'tags', 'prefix',
                 'jhbuildbot_slavename', 'jhbuildbot_password',
                 'jhbuildbot_svn_commits_box', 'jhbuildbot_slaves_dir',
                 'jhbuildbot_dir', 'jhbuildbot_mastercfg',
-                'use_local_modulesets', 'ignore_suggests', 'modulesets_dir',
+                'use_local_modulesets', 'ignore_after', 'ignore_suggests', 'modulesets_dir',
                 'mirror_policy', 'module_mirror_policy', 'dvcs_mirror_dir',
                 'shallow_clone', 'build_targets', 'cmakeargs', 'module_cmakeargs',
                 'print_command_pattern', 'static_analyzer',
diff --git a/jhbuild/defaults.jhbuildrc b/jhbuild/defaults.jhbuildrc
index 2522b4d..3118498 100644
--- a/jhbuild/defaults.jhbuildrc
+++ b/jhbuild/defaults.jhbuildrc
@@ -217,6 +217,9 @@ use_local_modulesets = False
 # whether to ignore soft dependencies
 ignore_suggests = False
 
+# which to ignore 'after' dependencies
+ignore_after = False
+
 # local directory for DVCS mirror (git only atm)
 dvcs_mirror_dir = None
 # If true, use --depth=1 to git and bzr checkout --light
diff --git a/jhbuild/moduleset.py b/jhbuild/moduleset.py
index d906dad..4c1aedf 100644
--- a/jhbuild/moduleset.py
+++ b/jhbuild/moduleset.py
@@ -97,7 +97,7 @@ class ModuleSet:
         raise KeyError(module_name)
 
     def get_module_list(self, module_names, skip=[], tags=[],
-                        include_suggests=True, include_afters=False):
+                        include_suggests=True, include_afters=True):
         module_list = self.get_full_module_list(module_names, skip,
                                                 include_suggests,
                                                 include_afters)
@@ -106,7 +106,7 @@ class ModuleSet:
         return module_list
 
     def get_full_module_list(self, module_names='all', skip=[],
-                                include_suggests=True, include_afters=False,
+                                include_suggests=True, include_afters=True,
                                 warn_about_circular_dependencies=True):
 
         def add_module(to_build, name, seen = []):


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