pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: pkgsrc/shells/zsh
Hi,
Jonathan Perkin <jperkin%joyent.com@localhost> writes:
> * On 2020-12-04 at 15:23 GMT, Ryo ONODERA wrote:
>
>> +--- Completion/BSD/Command/_bsd_pkg.orig 2019-05-06 03:42:37.000000000 +0000
>> ++++ Completion/BSD/Command/_bsd_pkg
>> +@@ -31,7 +31,14 @@ _bsd_pkg_pkgfiles() {
>> +
>> + (( $+functions[_bsd_pkg_pkgs] )) ||
>> + _bsd_pkg_pkgs() {
>> +- compadd "$@" - ${PKG_DBDIR:-/var/db/pkg}/*(/:t)
>> ++ case $OSTYPE in
>> ++ netbsd*)
>> ++ compadd "$@" - ${PKG_DBDIR:-/usr/pkg/pkgdb}/*(/:t)
>> ++ ;;
>> ++ *)
>> ++ compadd "$@" - ${PKG_DBDIR:-/var/db/pkg}/*(/:t)
>> ++ ;;
>> ++ esac
>
> This is going to be wrong on so many systems. Two better ways of
> doing this would be:
>
> * SUBST the correct value at build time.
>
> * Call `pkg_admin config-var PKG_DBDIR` to calculate it at runtime.
>
> Certainly the "/var/db/pkg" default for non-NetBSD is almost certainly
> never going to be correct, you would have to specify that exact
> location at bootstrap time, overriding any defaults.
It seems that _bsd_pkg does not used on non-BSD platforms.
I think that _bsd_pkg should be usable for pkgsrc
even on non-BSD platforms.
Anyway I will SUBST PKG_DBDIR for customized NetBSD.
Thank you.
> --
> Jonathan Perkin - Joyent, Inc. - www.joyent.com
--
Ryo ONODERA // ryo%tetera.org@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
Home |
Main Index |
Thread Index |
Old Index