pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/install Rewrote the bin-install target so that it d...
details: https://anonhg.NetBSD.org/pkgsrc/rev/0b3b0a553a9e
branches: trunk
changeset: 519452:0b3b0a553a9e
user: rillig <rillig%pkgsrc.org@localhost>
date: Tue Oct 03 11:07:05 2006 +0000
description:
Rewrote the bin-install target so that it doesn't lock LOCALBASE
recursively. This bug was reported by Hans Rosenfeld in
http://mail-index.netbsd.org/tech-pkg/2006/10/03/0002.html
As a side effect, when bin-install fails to install a binary package,
the package is still built from source, but not as a privileged user.
diffstat:
mk/install/bin-install.mk | 51 ++++++++++++++++++++++++++++------------------
1 files changed, 31 insertions(+), 20 deletions(-)
diffs (74 lines):
diff -r 32a790351933 -r 0b3b0a553a9e mk/install/bin-install.mk
--- a/mk/install/bin-install.mk Tue Oct 03 09:04:10 2006 +0000
+++ b/mk/install/bin-install.mk Tue Oct 03 11:07:05 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bin-install.mk,v 1.4 2006/08/09 15:31:01 jlam Exp $
+# $NetBSD: bin-install.mk,v 1.5 2006/10/03 11:07:05 rillig Exp $
#
# This file provides the following targets:
@@ -23,19 +23,30 @@
BINPKG_SITES?= \
ftp://ftp.NetBSD.org/pub/NetBSD/packages/$${rel}/$${arch}
-_SU_BIN_INSTALL_TARGETS= acquire-bin-install-lock
-_SU_BIN_INSTALL_TARGETS+= locked-su-bin-install
-_SU_BIN_INSTALL_TARGETS+= release-bin-install-lock
+.PHONY: bin-install
+.PHONY: do-bin-install do-bin-install-from-source
+.PHONY: su-do-bin-install
+.PHONY: aquire-bin-install-lock locked-su-do-bin-install release-bin-install-lock
+
+bin-install: \
+ do-bin-install \
+ do-bin-install-from-source
+
+do-bin-install: su-target
+ @${PHASE_MSG} "Binary install for "${PKGNAME_REQD:U${PKGNAME}:Q}
-.PHONY: acquire-bin-install-lock release-bin-install-lock
-acquire-bin-install-lock: acquire-localbase-lock
-release-bin-install-lock: release-localbase-lock
+su-do-bin-install: \
+ acquire-bin-install-lock \
+ locked-su-do-bin-install \
+ release-bin-install-lock
-# Install binary pkg, without strict uptodate-check first
-.PHONY: su-bin-install
-su-bin-install: ${_SU_BIN_INSTALL_TARGETS}
+acquire-bin-install-lock: \
+ acquire-localbase-lock
-locked-su-bin-install:
+release-bin-install-lock: \
+ release-localbase-lock
+
+locked-su-do-bin-install:
@found=`${PKG_BEST_EXISTS} \"${PKGWILDCARD}\" || ${TRUE}`; \
if [ "$$found" != "" ]; then \
${ERROR_MSG} "$$found is already installed - perhaps an older version?"; \
@@ -52,14 +63,14 @@
${STEP_MSG} "Installing ${PKGNAME} from $$pkgpath"; \
if ${SETENV} PKG_PATH="$$pkgpath" ${PKG_ADD} ${_BIN_INSTALL_FLAGS} ${PKGNAME_REQD:U${PKGNAME}:Q}${PKG_SUFX}; then \
${ECHO} "`${PKG_INFO} -e ${PKGNAME_REQD:U${PKGNAME}:Q}` successfully installed."; \
- else \
- ${SHCOMMENT} "Cycle through some FTP server here"; \
- ${STEP_MSG} "No binary package found for ${PKGNAME} -- installing from source"; \
- ${RECURSIVE_MAKE} ${MAKEFLAGS} package \
- DEPENDS_TARGET=${DEPENDS_TARGET:Q} \
+ fi
+
+do-bin-install-from-source:
+ ${_PKG_SILENT}${_PKG_DEBUG} set -e; \
+ if ${PKG_INFO} -qe ${PKGNAME}; then \
+ : "Nothing to do"; \
+ else \
+ ${STEP_MSG} "No binary package found for ${PKGNAME}; installing from source."; \
+ ${RECURSIVE_MAKE} ${MAKEFLAGS} DEPENDS_TARGET=${DEPENDS_TARGET:Q} package \
&& ${RECURSIVE_MAKE} ${MAKEFLAGS} clean; \
fi
-
-.PHONY: bin-install
-bin-install: su-target
- @${PHASE_MSG} "Binary install for "${PKGNAME_REQD:U${PKGNAME}:Q}
Home |
Main Index |
Thread Index |
Old Index