summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorhubertf <hubertf>1999-03-13 03:47:49 +0000
committerhubertf <hubertf>1999-03-13 03:47:49 +0000
commit2677bd259e8427c7702b1f2e5d37ab6b19a40faa (patch)
treed07638ce99686db721b628ec64391f9619011d45 /pkgtools
parent59312edaa6d53fe9eaf36618a4cca697a763e0b3 (diff)
downloadpkgsrc-2677bd259e8427c7702b1f2e5d37ab6b19a40faa.tar.gz
Call "pkg_admin rebuild" if it was never run before.
This should ONLY be run when upgrading from a non-pkgdb to a pkgdb-version of the pkg_* tools.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_install/Makefile6
-rw-r--r--pkgtools/pkg_install/pkg/PLIST4
2 files changed, 8 insertions, 2 deletions
diff --git a/pkgtools/pkg_install/Makefile b/pkgtools/pkg_install/Makefile
index 64b8dc12f70..5b91108a234 100644
--- a/pkgtools/pkg_install/Makefile
+++ b/pkgtools/pkg_install/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 1999/03/08 17:34:51 bad Exp $
+# $NetBSD: Makefile,v 1.12 1999/03/13 03:47:49 hubertf Exp $
#
# Note to package maintainers:
@@ -31,4 +31,8 @@ NO_PACKAGE= No package registration is done
MANCOMPRESSED= yes
.endif
+post-install:
+ [ -f $${PKG_DBDIR:-/var/db/pkg}/pkgdb.byfile.db ] || \
+ pkg_admin rebuild
+
.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/pkg_install/pkg/PLIST b/pkgtools/pkg_install/pkg/PLIST
index a7b4b722911..909351a8c8b 100644
--- a/pkgtools/pkg_install/pkg/PLIST
+++ b/pkgtools/pkg_install/pkg/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 1999/03/08 15:59:37 bad Exp $
+@comment $NetBSD: PLIST,v 1.3 1999/03/13 03:47:49 hubertf Exp $
sbin/pkg_add
sbin/pkg_admin
sbin/pkg_create
@@ -14,3 +14,5 @@ share/man/man1/pkg_admin.1
share/man/man1/pkg_create.1
share/man/man1/pkg_delete.1
share/man/man1/pkg_info.1
+@exec [ -f ${PKG_DBDIR:-/var/db/pkg}/pkgdb.byfile.db ] || pkg_admin rebuild
+