diff options
author | garbled <garbled@pkgsrc.org> | 1999-03-25 16:18:47 +0000 |
---|---|---|
committer | garbled <garbled@pkgsrc.org> | 1999-03-25 16:18:47 +0000 |
commit | 466c7c1594feb8f389d0ac1940b99903488ff0f5 (patch) | |
tree | f60ce7c241bdf18c9c66682269e28f5f37a564de /pkgtools | |
parent | 4d28f5abcaa945d2ba681cf57529382a8ffc89b0 (diff) | |
download | pkgsrc-466c7c1594feb8f389d0ac1940b99903488ff0f5.tar.gz |
If the user has never installed a package before, /var/db/pkg does not
exist, and pkg_admin rebuild fails miserably. Create this directory
if it does not exist.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_install/Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgtools/pkg_install/Makefile b/pkgtools/pkg_install/Makefile index d6aaf140641..774b8041177 100644 --- a/pkgtools/pkg_install/Makefile +++ b/pkgtools/pkg_install/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 1999/03/16 15:42:59 tv Exp $ +# $NetBSD: Makefile,v 1.14 1999/03/25 16:18:47 garbled Exp $ # # Note to package maintainers: @@ -32,6 +32,9 @@ MANCOMPRESSED= yes post-install: [ -f $${PKG_DBDIR:-/var/db/pkg}/pkgdb.byfile.db ] || \ + if [ -d $${PKG_DBDIR:-/var/db/pkg} ]; then /bin/true; else \ + ${MKDIR} $${PKG_DBDIR:-/var/db/pkg}; \ + fi; \ pkg_admin rebuild .include "../../mk/bsd.pkg.mk" |