From 96566d306036442e0fc927e80c6e64ccbc92bfda Mon Sep 17 00:00:00 2001 From: Tetja Rediske Date: Fri, 20 Nov 2015 12:40:55 +0100 Subject: [PATCH 1/2] We can't query installed use flags for a non installed pkg --- salt/states/pkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/states/pkg.py b/salt/states/pkg.py index fea38dc7ce..242d0fd0bf 100644 --- a/salt/states/pkg.py +++ b/salt/states/pkg.py @@ -1437,7 +1437,7 @@ def latest( cmp_func=cmp_func): targets[pkg] = avail[pkg] else: - if __salt__['portage_config.is_changed_uses'](pkg): + if not cur[pkg] or if __salt__['portage_config.is_changed_uses'](pkg): targets[pkg] = avail[pkg] else: for pkg in desired_pkgs: From f3d1ba1509fee34d4385e47c795edbcbc838207a Mon Sep 17 00:00:00 2001 From: Tetja Rediske Date: Fri, 20 Nov 2015 17:05:55 +0100 Subject: [PATCH 2/2] We can't query installed use flags for a non installed pkg. Also one if is enough... --- salt/states/pkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/states/pkg.py b/salt/states/pkg.py index 242d0fd0bf..e0b21ca6d5 100644 --- a/salt/states/pkg.py +++ b/salt/states/pkg.py @@ -1437,7 +1437,7 @@ def latest( cmp_func=cmp_func): targets[pkg] = avail[pkg] else: - if not cur[pkg] or if __salt__['portage_config.is_changed_uses'](pkg): + if not cur[pkg] or __salt__['portage_config.is_changed_uses'](pkg): targets[pkg] = avail[pkg] else: for pkg in desired_pkgs: