diff options
author | joerg <joerg@pkgsrc.org> | 2008-01-24 14:48:02 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2008-01-24 14:48:02 +0000 |
commit | e5ec1e7ace86ed056ad4e2501897cc9891554dd2 (patch) | |
tree | bf00d61effe6fbadd1b192506ffcc862f5f95256 /bootstrap | |
parent | 2eb3b8f616ab886ce183b267dfb49d4d4c2428bc (diff) | |
download | pkgsrc-e5ec1e7ace86ed056ad4e2501897cc9891554dd2.tar.gz |
Change default pathes to more sane values:
- /var as varbase is only used for privileged builds without prefix
or when prefix is explicitly set to /usr/pkg
- if prefix is set to a non-standard value, derive varbase from it
- derive pkgdbdir from varbase
Based on the discussion in PR 37796 and with jlam@.
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap/bootstrap | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index 3aa4eddc231..0c547694afc 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.118 2008/01/23 21:12:41 joerg Exp $ +# $NetBSD: bootstrap,v 1.119 2008/01/24 14:48:02 joerg Exp $ # # # Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved. @@ -407,13 +407,14 @@ checkarg_sane_relative_path "$pkgmandir" "--pkgmandir" wrkobjdir=${wrkdir}/pkgsrc if [ "$unprivileged" = "yes" ]; then [ -z "$prefix" ] && prefix=${HOME}/pkg - [ -z "$pkgdbdir" ] && pkgdbdir=${prefix}/var/db/pkg - [ -z "$varbase" ] && varbase=${prefix}/var -else - [ -z "$prefix" ] && prefix=/usr/pkg - [ -z "$pkgdbdir" ] && pkgdbdir=/var/db/pkg +elif [ -z "$prefix" -o "$prefix" = "/usr/pkg" ]; then + prefix=/usr/pkg [ -z "$varbase" ] && varbase=/var fi + +[ -z "$varbase" ] && varbase=${prefix}/var +[ -z "$pkgdbdir" ] && pkgdbdir=${varbase}/db/pkg + if [ "$prefix" = "/usr" ]; then [ -z "$pkgmandir" ] && pkgmandir=share/man else |