optparser.add_option('', '--ignore-ksrepo', action='store_true',
dest='ignore_ksrepo', default=False,
help=SUPPRESS_HELP)
- optparser.add_option('', '--strict_mode', action='store_true',
+ optparser.add_option('', '--strict-mode', action='store_true',
dest='strict_mode', default=False,
help='Abort creation of image, if there are some errors'
' during rpm installation. ')
class Zypp(BackendPlugin):
name = 'zypp'
- #strict_mode not used in zypp yet(yum only)
def __init__(self, target_arch, instroot, cachedir, strict_mode = False):
self.cachedir = cachedir
self.instroot = instroot
self.target_arch = target_arch
+ self.strict_mode = strict_mode
self.__pkgs_license = {}
self.__pkgs_content = {}
if len(errors) == 0:
msger.warning('scriptlet or other non-fatal errors occurred '
'during transaction.')
-
+ if self.strict_mode:
+ raise CreatorError("mic failes to install some packages")
else:
for e in errors:
msger.warning(e[0])