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/

This commit is contained in:
og 2014-03-02 17:32:14 -07:00
parent 1c0d74f7db
commit 5cbdf981c0
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

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