diff options
author | jlam <jlam> | 2003-08-24 08:51:11 +0000 |
---|---|---|
committer | jlam <jlam> | 2003-08-24 08:51:11 +0000 |
commit | 61eab77de115efe572b733ec858603a16d2e0422 (patch) | |
tree | 751b7fa4c3c204ca125aa6cde9918911e32f9697 /mk | |
parent | 198fe64d61c1d687342f8f2b55096ef55b4e60e5 (diff) | |
download | pkgsrc-61eab77de115efe572b733ec858603a16d2e0422.tar.gz |
Sanity check that the package is actually installed by running pkg_info(1)
before trying to create the binary package. This makes:
cd pkgsrc/category/foo
make install
pkg_delete foo
make package
fail because package "foo" isn't actually installed, so no binary package
can be built.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index c48900c9309..83be8cab2f7 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1244 2003/08/23 09:11:19 grant Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1245 2003/08/24 08:51:11 jlam Exp $ # # This file is in the public domain. # @@ -2254,6 +2254,12 @@ do-install: real-su-package: ${PLIST} ${DESCR} ${_PKG_SILENT}${_PKG_DEBUG} \ ${ECHO_MSG} "${_PKGSRC_IN}> Building binary package for ${PKGNAME}"; \ + if ${PKG_INFO} -qe ${PKGNAME}; then \ + : The package is installed. ; \ + else \ + ${ECHO_MSG} "=> ${PKGNAME} is not installed."; \ + exit 1; \ + fi; \ if [ ! -d ${PKGREPOSITORY} ]; then \ ${MKDIR} ${PKGREPOSITORY}; \ if [ $$? -ne 0 ]; then \ |