All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

Suggested fix for OPEN-45

Review Request #215 - Created March 17, 2011 and submitted

Alain Linden Reviewers
viewer
OPEN-45 oz.linden, boroondas.gupte
None autobuild
Suggested fix for OPEN-45.  I'd like to decouple Executable as much as possible from assumptions and state of autobuild.  To that end I added an optional argument to the __str__ method to accept an options list to insert into the command string.  The command string generated by __call__ and __str__ is now identical.  Incidentally I made the environment an optional argument to __call__ to make it more general and decouple it a little more from the rest of autobuild.

 
autobuild/autobuild_tool_build.py
Revision abc1014d5ad6 New Change
... 139 lines hidden [Expand]
def _build_a_configuration(config, build_configuration, extra_arguments, dry_run=False):
140
        parent_build = None
140
        parent_build = None
141
    if build_configuration.build is not None:
141
    if build_configuration.build is not None:
142
        build_executable = copy.copy(build_configuration.build)
142
        build_executable = copy.copy(build_configuration.build)
143
        build_executable.parent = parent_build
143
        build_executable.parent = parent_build
144
    elif parent_build is not None:
144
    elif parent_build is not None:
145
        logger.info('no build executable defined; falling back to parent')
145
        logger.info('no build executable defined; falling back to parent')
146
        build_executable = parent_build
146
        build_executable = parent_build
147
    else:
147
    else:
148
        logger.info('no build executable defined; doing nothing')
148
        logger.info('no build executable defined; doing nothing')
149
        return 0
149
        return 0
150
    logger.info('executing build command %s', build_executable)
150
    logger.info('executing build command %s', build_executable.__str__(extra_arguments))
151
    if not dry_run:
151
    if not dry_run:
152
        return build_executable(extra_arguments)
152
        return build_executable(extra_arguments, common.get_autobuild_environment())
153
    else:
153
    else:
154
        return 0
154
        return 0
autobuild/autobuild_tool_configure.py
Revision abc1014d5ad6 New Change
 
autobuild/common.py
Revision abc1014d5ad6 New Change
 
autobuild/executable.py
Revision abc1014d5ad6 New Change
 
  1. autobuild/autobuild_tool_build.py: Loading...
  2. autobuild/autobuild_tool_configure.py: Loading...
  3. autobuild/common.py: Loading...
  4. autobuild/executable.py: Loading...