diff options
-rw-r--r-- | ybd/config/ybd.conf | 6 | ||||
-rw-r--r-- | ybd/morphs.py | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ybd/config/ybd.conf b/ybd/config/ybd.conf index 129e1bd..79aea84 100644 --- a/ybd/config/ybd.conf +++ b/ybd/config/ybd.conf @@ -74,6 +74,12 @@ artifact-version: 13 # path to be used in default chroots for builds base-path: ['/usr/bin', '/bin', '/usr/sbin', '/sbin'] +# This set how ybd should react to missing references to .morph files +# Default value is 'warn' to not break previous definitions, +# but we recommend set this it to 'exit' +# possible values are 'ignore', 'warn', 'exit' +check-references: 'warn' + # historically we have not been great at ensuring definitions don't contain # wrong names etc. ybd can react to this via the check-definitions parameter. # possible values are 'ignore', 'warn', 'exit' diff --git a/ybd/morphs.py b/ybd/morphs.py index 4e1059d..3d04dd2 100644 --- a/ybd/morphs.py +++ b/ybd/morphs.py @@ -146,10 +146,12 @@ class Morphs(object): ''' exit = (config.get('check-definitions') == 'exit') + exit_ref = (config.get('check-references') == 'exit') if dn.get('morph'): if not os.path.isfile(dn.get('morph')): - log('DEFINITION', 'WARNING: missing', dn['morph'], exit=exit) + log('DEFINITION', 'WARNING: missing', dn['morph'], + exit=exit_ref) dn['path'] = self._demorph(dn.pop('morph')) if 'path' not in dn: |