On 20. jan. 2012, at 01.50, Martin Pelikan wrote:
>
> ... better alternative:
>
> echo 'export PKG_PATH=ftp://ftp.XX.openbsd.org/pub/OpenBSD/`uname
-r`/packages/`uname -m`/' >> ~/.profile
>
> for -release and -stable, or
>
> echo 'export
PKG_PATH=ftp://ftp.XX.openbsd.org/pub/OpenBSD/snapshots/packages/`uname -m`/'
>> ~/.profile
>


Instead, why not solve the general case rather than specific cases. Since the
install script now guesses location for nearest mirror for install source ( &
TZ etc), then I don't see why it couldn't setup a sane default PKG_PATH in
/etc/profile (can be easily overidden in ~/.profile if desired) at install
time. This should ofcourse use the correct arch & version (if it's a snapshot
then set the PKG_PATH as such) and be derived from the install source.

- I know this breaks for mirrors site which carry only install images not
packages, this can be combated with: 'pkg_add -v' should maybe announce which
site it's using, to aid debugging (and be referenced in SASQ).

- people that install snapshots, and then don't keep up with -current, will
possibly (probably) get broken packages. That applies with or without this
change. Again 'pkg_add -v' could grep for /snapshot/ in the PKG_PATH, and if
present, proceed, but with a one line warning (or alternatively stop unless a
new -D keyword to force snapshot packages was supplied).



/Pete

Reply via email to