View | Details | Raw Unified | Return to bug 227721
Collapse All | Expand All

(-)py-salt-2018.3.0/Makefile (-3 / +2 lines)
Lines 1-9 Link Here
1
# Created by: Christer Edwards <christer.edwards@gmail.com>
1
# Created by: Christer Edwards <christer.edwards@gmail.com>
2
# $FreeBSD: head/sysutils/py-salt/Makefile 468048 2018-04-22 18:29:51Z sunpoet $
2
# $FreeBSD: head/sysutils/py-salt/Makefile 467246 2018-04-13 16:06:33Z garga $
3
3
4
PORTNAME=	salt
4
PORTNAME=	salt
5
PORTVERSION=	2017.7.4
5
PORTVERSION=	2018.3.0
6
PORTREVISION=	3
7
CATEGORIES=	sysutils python
6
CATEGORIES=	sysutils python
8
MASTER_SITES=	CHEESESHOP
7
MASTER_SITES=	CHEESESHOP
9
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
(-)py-salt-2018.3.0/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1520059286
1
TIMESTAMP = 1523675641
2
SHA256 (salt-2017.7.4.tar.gz) = 1d573095776ba052eec7d7cae1472f4b1d4c15f16e1d79c2dc48db3129dbae97
2
SHA256 (salt-2018.3.0.tar.gz) = a0a45d22fdf6961542a419b7e09568a3118e2b019ffe7bab9dee5aeb55b56b31
3
SIZE (salt-2017.7.4.tar.gz) = 11718327
3
SIZE (salt-2018.3.0.tar.gz) = 13448567
(-)py-salt-2018.3.0/files/patch-salt_grains_marathon.py (+16 lines)
Line 0 Link Here
1
--- salt/grains/marathon.py.old	2018-04-02 10:35:12.000000000 -0600
2
+++ salt/grains/marathon.py	2018-04-12 17:50:24.018368000 -0600
3
@@ -14,10 +14,10 @@
4
 
5
 
6
 def __virtual__():
7
-    if not salt.utils.platform.is_proxy() or 'proxy' not in __opts__:
8
-        return False
9
-    else:
10
+    if salt.utils.platform.is_proxy() and 'proxy' in __opts__:
11
         return __virtualname__
12
+    else:
13
+        return False
14
 
15
 
16
 def kernel():
(-)py-salt-2018.3.0/files/patch-salt_modules_freebsdservice.py (-18 lines)
Lines 1-18 Link Here
1
--- salt/modules/freebsdservice.py.orig	2017-08-15 15:26:36 UTC
2
+++ salt/modules/freebsdservice.py
3
@@ -16,7 +16,6 @@ import os
4
 
5
 # Import salt libs
6
 import salt.utils
7
-import salt.utils.decorators as decorators
8
 from salt.exceptions import CommandNotFoundError
9
 
10
 __func_alias__ = {
11
@@ -39,7 +38,6 @@ def __virtual__():
12
     return (False, 'The freebsdservice execution module cannot be loaded: only available on FreeBSD systems.')
13
 
14
 
15
-@decorators.memoize
16
 def _cmd(jail=None):
17
     '''
18
     Return full path to service command
(-)py-salt-2018.3.0/files/patch-salt_modules_pkgng.py (-92 lines)
Lines 1-92 Link Here
1
--- salt/modules/pkgng.py.orig	2017-10-09 16:37:42 UTC
2
+++ salt/modules/pkgng.py
3
@@ -1154,8 +1154,6 @@ def upgrade(*names, **kwargs):
4
         opts += 'n'
5
     if not dryrun:
6
         opts += 'y'
7
-    if opts:
8
-        opts = '-' + opts
9
 
10
     cmd = _pkg(jail, chroot, root)
11
     cmd.append('upgrade')
12
@@ -1181,7 +1179,11 @@ def upgrade(*names, **kwargs):
13
     return ret
14
 
15
 
16
-def clean(jail=None, chroot=None, root=None):
17
+def clean(jail=None,
18
+          chroot=None,
19
+          root=None,
20
+          clean_all=False,
21
+          dryrun=False):
22
     '''
23
     Cleans the local cache of fetched remote packages
24
 
25
@@ -1190,11 +1192,64 @@ def clean(jail=None, chroot=None, root=None):
26
     .. code-block:: bash
27
 
28
         salt '*' pkg.clean
29
-        salt '*' pkg.clean jail=<jail name or id>
30
-        salt '*' pkg.clean chroot=/path/to/chroot
31
+
32
+    jail
33
+        Cleans the package cache in the specified jail
34
+
35
+        CLI Example:
36
+
37
+        .. code-block:: bash
38
+
39
+            salt '*' pkg.clean jail=<jail name or id>
40
+
41
+    chroot
42
+        Cleans the package cache in the specified chroot (ignored if ``jail``
43
+        is specified)
44
+
45
+    root
46
+        Cleans the package cache in the specified root (ignored if ``jail``
47
+        is specified)
48
+
49
+        CLI Example:
50
+
51
+        .. code-block:: bash
52
+
53
+            salt '*' pkg.clean chroot=/path/to/chroot
54
+
55
+    clean_all
56
+        Clean all packages from the local cache (not just those that have been
57
+        superseded by newer versions).
58
+
59
+        CLI Example:
60
+
61
+        .. code-block:: bash
62
+
63
+        salt '*' pkg.clean clean_all=True
64
+
65
+    dryrun
66
+        Dry-run mode. This list of changes to the local cache is always
67
+        printed, but no changes are actually made.
68
+
69
+        CLI Example:
70
+
71
+        .. code-block:: bash
72
+
73
+            salt '*' pkg.clean dryrun=True
74
     '''
75
+    opts = ''
76
+    if clean_all:
77
+        opts += 'a'
78
+    if dryrun:
79
+        opts += 'n'
80
+    else:
81
+        opts += 'y'
82
+
83
+    cmd = _pkg(jail, chroot, root)
84
+    cmd.append('clean')
85
+    if opts:
86
+        cmd.append('-' + opts)
87
     return __salt__['cmd.run'](
88
-        _pkg(jail, chroot, root) + ['clean'],
89
+        cmd,
90
         output_loglevel='trace',
91
         python_shell=False
92
     )

Return to bug 227721