adding pkg_path parameter to be explicitly set, this is important for using -current, as os_version always parses to a release version (e.g. 5.5) but the path that mirrors have is /snapshots/

remotes/origin/feature_files_export
og 11 years ago
parent 1c0d74f7db
commit 5cbdf981c0
  1. 8
      cdist/conf/type/__package_pkg_openbsd/gencode-remote
  2. 1
      cdist/conf/type/__package_pkg_openbsd/parameter/optional

@ -50,8 +50,11 @@ fi
pkg_version="$(cat "$__object/explorer/pkg_version")"
# TODO: Shouldn't be hardcoded
echo export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/$os_version/packages/$machine/
if [ -f "$__object/parameter/pkg_path" ]; then
pkg_path="$(cat "$__object/parameter/pkg_path")"
else
pkg_path="ftp://ftp.openbsd.org/pub/OpenBSD/$os_version/packages/$machine/"
fi
if [ "$pkg_version" ]; then
state_is="present"
@ -65,6 +68,7 @@ case "$state_should" in
present)
# use this because pkg_add doesn't properly handle errors
cat << eof
export PKG_PATH="$pkg_path"
status=\$(pkg_add "$pkgopts" "$name--$flavor")
# no error

@ -1,3 +1,4 @@
name
flavor
state
pkg_path

Loading…
Cancel
Save