Changeset 3963ac4 in rtems-source-builder


Ignore:
Timestamp:
01/18/15 00:24:11 (7 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, 5, master
Children:
818ea24
Parents:
0392c5f
Message:

Detect a Cxc build from the options and automatically disabled installing.

This is similar to always providing --no-install on the command when building
a Cxc package.

Location:
source-builder/sb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/options.py

    r0392c5f r3963ac4  
    298298            if path.exists(rsb_macros):
    299299                self.defaults.load(rsb_macros)
     300        # If a Cxc build disable installing.
     301        if self.canadian_cross():
     302            self.opts['no-install'] = '1'
     303            self.defaults['_no_install'] = '1'
    300304
    301305    def sb_git(self):
     
    360364    def no_install(self):
    361365        return self.opts['no-install'] != '0'
     366
     367    def canadian_cross(self):
     368        _host = self.defaults.expand('%{_host}')
     369        _build = self.defaults.expand('%{_build}')
     370        _target = self.defaults.expand('%{_target}')
     371        if len(_target):
     372            return len(_host) and len(_build) and (_target) and \
     373                _host != _build and _host != _target
     374        return len(_host) and len(_build) and _host != _build
    362375
    363376    def user_macros(self):
  • source-builder/sb/setbuilder.py

    r0392c5f r3963ac4  
    459459        if not list_bset_cfg_files(opts, configs):
    460460            prefix = opts.defaults.expand('%{_prefix}')
    461             if not opts.dry_run() and not opts.no_install() and \
    462                     not path.ispathwritable(prefix):
     461            if not opts.dry_run() and \
     462               not not opts.canadian_cross() and \
     463               not opts.no_install() and \
     464               not path.ispathwritable(prefix):
    463465                raise error.general('prefix is not writable: %s' % (path.host(prefix)))
    464466            for bset in opts.params():
Note: See TracChangeset for help on using the changeset viewer.