mirror of
https://github.com/valitydev/salt-common.git
synced 2024-11-06 10:25:23 +00:00
Fix exception on nonexisted use flag (#91)
This commit is contained in:
parent
19078d6b91
commit
f42101e552
@ -743,7 +743,10 @@ def install(name=None,
|
||||
changes[param] = {'version': version(param),
|
||||
'old': {'use': all_uses[0]},
|
||||
'new': {'use': all_uses[1]}}
|
||||
else: continue
|
||||
else:
|
||||
if '[' in target:
|
||||
log.warning(
|
||||
'Package {0} does not have an update or flag changes, but requested to be installed, so there is probably a nonexistent flag in requested use, use equery to confirm that', target)
|
||||
|
||||
targets.append(target)
|
||||
else:
|
||||
|
@ -2462,10 +2462,11 @@ def latest(
|
||||
slot = kwargs.get('slot', None)
|
||||
if slot is not None:
|
||||
fname += ':{0}'.format(slot)
|
||||
if fromrepo is not None:
|
||||
fname += '::{0}'.format(fromrepo)
|
||||
if __salt__['portage_config.is_changed_uses'](fname):
|
||||
log.debug(
|
||||
'Package is up-to-date, but USE flags are changed so we need to reinstall it'
|
||||
)
|
||||
'Package {0} is up-to-date, but uses were changed, so we need to reinstall it', fname)
|
||||
targets[pkg] = cur[pkg]
|
||||
else:
|
||||
# Package either a) is not installed, or b) is installed and has an
|
||||
|
Loading…
Reference in New Issue
Block a user