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:
parent
1c0d74f7db
commit
5cbdf981c0
2 changed files with 7 additions and 2 deletions
|
@ -50,8 +50,11 @@ fi
|
||||||
|
|
||||||
pkg_version="$(cat "$__object/explorer/pkg_version")"
|
pkg_version="$(cat "$__object/explorer/pkg_version")"
|
||||||
|
|
||||||
# TODO: Shouldn't be hardcoded
|
if [ -f "$__object/parameter/pkg_path" ]; then
|
||||||
echo export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/$os_version/packages/$machine/
|
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
|
if [ "$pkg_version" ]; then
|
||||||
state_is="present"
|
state_is="present"
|
||||||
|
@ -65,6 +68,7 @@ case "$state_should" in
|
||||||
present)
|
present)
|
||||||
# use this because pkg_add doesn't properly handle errors
|
# use this because pkg_add doesn't properly handle errors
|
||||||
cat << eof
|
cat << eof
|
||||||
|
export PKG_PATH="$pkg_path"
|
||||||
status=\$(pkg_add "$pkgopts" "$name--$flavor")
|
status=\$(pkg_add "$pkgopts" "$name--$flavor")
|
||||||
|
|
||||||
# no error
|
# no error
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
name
|
name
|
||||||
flavor
|
flavor
|
||||||
state
|
state
|
||||||
|
pkg_path
|
||||||
|
|
Loading…
Reference in a new issue