diff options
Diffstat (limited to 'community/salt/0001-alpine-support.patch')
-rw-r--r-- | community/salt/0001-alpine-support.patch | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/community/salt/0001-alpine-support.patch b/community/salt/0001-alpine-support.patch index fcd7f2d037..accfdb7daa 100644 --- a/community/salt/0001-alpine-support.patch +++ b/community/salt/0001-alpine-support.patch @@ -2,10 +2,10 @@ Upstream code not yet released --- diff --git a/salt/modules/apk.py b/salt/modules/apk.py new file mode 100644 -index 0000000..a45d1cf +index 0000000..8dae7a8 --- /dev/null +++ b/salt/modules/apk.py -@@ -0,0 +1,606 @@ +@@ -0,0 +1,613 @@ +# -*- coding: utf-8 -*- +''' +Support for apk @@ -225,8 +225,8 @@ index 0000000..a45d1cf + try: + pkg_version = '-'.join(line.split('-')[-2:]) + pkg_name = '-'.join(line.split('-')[:-2]) -+ if (pkg == pkg_name): -+ if (installed == pkg_version): ++ if pkg == pkg_name: ++ if installed == pkg_version: + ret[pkg] = '' + else: + ret[pkg] = pkg_version @@ -318,6 +318,13 @@ index 0000000..a45d1cf + refresh_db() + + cmd = ['apk', 'add'] ++ ++ # Switch in update mode if a package is already installed ++ for _pkg in pkg_to_install: ++ if old.get(_pkg): ++ cmd.append('-u') ++ break ++ + cmd.extend(pkg_to_install) + + out = __salt__['cmd.run_all']( |