I'm installing burp 2.1 on my systems thusly with salt: burp-pkgs: pkg.installed: - pkgs: - burp%2.1
This works reasonably well, except that salt doesn't understand that 2.1 is already installed. So on every highstate run it tries to install it again. pkg_add usually does nothing. Except when a new snapshot is out, then I get a new version of quirks installed. This is annoying since I get an email that salt change something. It would also upgrade the burp package if there was a newer one and all hell might break lose. I'd rather do my sysupgrade and pkg_add -u when I want them, not when salt runs. Anyway, this teaches salt about branch names, I'm running with this for about a month now. diff --git Makefile Makefile index 8018247174c..55e7d9e44eb 100644 --- Makefile +++ Makefile @@ -19,6 +19,7 @@ COMMENT = remote execution and configuration management system MODPY_EGG_VERSION = 3000.3 DISTNAME = salt-${MODPY_EGG_VERSION} +REVISION = 0 CATEGORIES = sysutils net devel diff --git patches/patch-salt_states_pkg_py patches/patch-salt_states_pkg_py new file mode 100644 index 00000000000..f5e67b319ce --- /dev/null +++ patches/patch-salt_states_pkg_py @@ -0,0 +1,21 @@ +$OpenBSD$ + +Index: salt/states/pkg.py +--- salt/states/pkg.py.orig ++++ salt/states/pkg.py +@@ -713,6 +713,15 @@ def _find_install_targets(name=None, + failed_verify = False + for package_name, version_string in six.iteritems(desired): + cver = cur_pkgs.get(package_name, []) ++ if not cver and salt.utils.platform.is_openbsd(): ++ if "%" in package_name: ++ # deal with %branch package names, e.g. python%3.7 ++ (stem, branch) = package_name.split("%") ++ for tver in cur_pkgs.get(stem, []): ++ if tver.startswith(branch): ++ cver = [tver] ++ break ++ + if resolve_capabilities and not cver and package_name in cur_prov: + cver = cur_pkgs.get(cur_prov.get(package_name)[0], []) + -- I'm not entirely sure you are real.