pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/flavor/pkg The undo-replace target had confused the...
details: https://anonhg.NetBSD.org/pkgsrc/rev/d7cd6de17433
branches: trunk
changeset: 521659:d7cd6de17433
user: rillig <rillig%pkgsrc.org@localhost>
date: Thu Nov 16 22:06:18 2006 +0000
description:
The undo-replace target had confused the "installed" and the "new" name.
Fixed this.
diffstat:
mk/flavor/pkg/replace.mk | 73 +++++++++++++++++++----------------------------
1 files changed, 30 insertions(+), 43 deletions(-)
diffs (153 lines):
diff -r 5edb4b7fe52f -r d7cd6de17433 mk/flavor/pkg/replace.mk
--- a/mk/flavor/pkg/replace.mk Thu Nov 16 22:04:21 2006 +0000
+++ b/mk/flavor/pkg/replace.mk Thu Nov 16 22:06:18 2006 +0000
@@ -1,34 +1,35 @@
-# $NetBSD: replace.mk,v 1.5 2006/07/17 18:18:42 gdt Exp $
+# $NetBSD: replace.mk,v 1.6 2006/11/16 22:06:18 rillig Exp $
######################################################################
### replace-pkg (PRIVATE, pkgsrc/mk/install/replace.mk)
######################################################################
### replace-pkg updates a package in-place on the system.
###
-_REPLACE_PKG_TARGETS+= replace-tarup
-_REPLACE_PKG_TARGETS+= replace-names
-_REPLACE_PKG_TARGETS+= replace-preserve-required-by
-_REPLACE_PKG_TARGETS+= deinstall
-_REPLACE_PKG_TARGETS+= install-clean
-_REPLACE_PKG_TARGETS+= install
-_REPLACE_PKG_TARGETS+= replace-fixup-required-by
-replace-pkg: ${_REPLACE_PKG_TARGETS}
+replace-pkg: \
+ replace-tarup \
+ replace-names \
+ replace-preserve-required-by \
+ deinstall \
+ install-clean \
+ install \
+ replace-fixup-required-by \
+ .PHONY
######################################################################
### undo-replace-pkg (PRIVATE, pkgsrc/mk/install/replace.mk)
######################################################################
### undo-replace-pkg undoes a "make replace".
###
-_UNDO_REPLACE_PKG_TARGETS+= undo-replace-check
-_UNDO_REPLACE_PKG_TARGETS+= undo-replace-names
-_UNDO_REPLACE_PKG_TARGETS+= replace-preserve-required-by
-_UNDO_REPLACE_PKG_TARGETS+= deinstall
-_UNDO_REPLACE_PKG_TARGETS+= undo-replace-install
-_UNDO_REPLACE_PKG_TARGETS+= replace-fixup-required-by
-_UNDO_REPLACE_PKG_TARGETS+= replace-clean
-undo-replace-pkg: ${_UNDO_REPLACE_PKG_TARGETS}
+undo-replace-pkg: \
+ undo-replace-check \
+ replace-preserve-required-by \
+ deinstall \
+ undo-replace-install \
+ replace-fixup-required-by \
+ replace-clean \
+ .PHONY
_REQUIRED_BY_FILE= ${PKG_DB_TMPDIR}/+REQUIRED_BY
@@ -42,11 +43,10 @@
### undo-replace-check verifies that there was a previous "replace"
### action performed that can be undone.
###
-.PHONY: undo-replace-check
-undo-replace-check:
+undo-replace-check: .PHONY
${_PKG_SILENT}${_PKG_DEBUG} \
${TEST} ! -f ${_COOKIE.replace} || exit 0; \
- ${ERROR_MSG} "No replacment to undo!"; \
+ ${ERROR_MSG} "No replacement to undo!"; \
exit 1
######################################################################
@@ -55,8 +55,7 @@
### replace-tarup generates a binary package for the (older) installed
### package using pkg_tarup.
###
-.PHONY: replace-tarup
-replace-tarup:
+replace-tarup: .PHONY
${_PKG_SILENT}${_PKG_DEBUG} \
if ${TEST} ! -x ${_PKG_TARUP_CMD:Q}; then \
${ERROR_MSG} ${_PKG_TARUP_CMD:Q}" was not found."; \
@@ -72,14 +71,13 @@
### undo-replace-install re-installs the old package from the binary
### package saved from replace-tarup.
###
-.PHONY: undo-replace-install
-undo-replace-install:
+undo-replace-install: .PHONY
@${PHASE_MSG} "Re-adding ${PKGNAME} from saved tar-up package."
${_PKG_SILENT}${_PKG_DEBUG} \
- ${TEST} -f ${_REPLACE_NEWNAME_FILE} || exit 0; \
- newname=`${CAT} ${_REPLACE_NEWNAME_FILE}`; \
- ${ECHO} "Running ${PKG_ADD} ${WRKDIR}/$$newname${PKG_SUFX}"; \
- ${PKG_ADD} ${WRKDIR}/$$newname${PKG_SUFX}
+ ${TEST} -f ${_REPLACE_OLDNAME_FILE} || exit 0; \
+ oldname=`${CAT} ${_REPLACE_OLDNAME_FILE}`; \
+ ${ECHO} "Running ${PKG_ADD} ${WRKDIR}/$${oldname}${PKG_SUFX}"; \
+ ${PKG_ADD} ${WRKDIR}/$${oldname}${PKG_SUFX}
######################################################################
### replace-names, undo-replace-names (PRIVATE)
@@ -88,8 +86,7 @@
### installed and replacement packages into files queried by other
### targets.
###
-.PHONY: replace-names
-replace-names:
+replace-names: .PHONY
${_PKG_SILENT}${_PKG_DEBUG} \
${_PKG_BEST_EXISTS} ${PKGWILDCARD:Q} > ${_REPLACE_OLDNAME_FILE}
${_PKG_SILENT}${_PKG_DEBUG} \
@@ -97,21 +94,13 @@
${_PKG_SILENT}${_PKG_DEBUG} \
${CP} -f ${_REPLACE_NEWNAME_FILE} ${_COOKIE.replace}
-.PHONY: undo-replace-names
-undo-replace-names:
- ${_PKG_SILENT}${_PKG_DEBUG} \
- ${ECHO} ${PKGNAME} > ${_REPLACE_OLDNAME_FILE}
- ${_PKG_SILENT}${_PKG_DEBUG} \
- ${CP} -f ${_COOKIE.replace} ${_REPLACE_NEWNAME_FILE}
-
######################################################################
### replace-preserve-required-by (PRIVATE)
######################################################################
### replace-preserve-required-by saves and removes the +REQUIRED_BY
### file from the installed package.
###
-.PHONY: replace-preserve-required-by
-replace-preserve-required-by:
+replace-preserve-required-by: .PHONY
${_PKG_SILENT}${_PKG_DEBUG} \
${TEST} -f ${_REPLACE_OLDNAME_FILE} || exit 0; \
${STEP_MSG} "Preserving existing +REQUIRED_BY file."; \
@@ -126,8 +115,7 @@
### replace-fixup-required-by fixes the +CONTENTS files of dependent
### packages to refer to the replacement package.
###
-.PHONY: replace-fixup-required-by
-replace-fixup-required-by:
+replace-fixup-required-by: .PHONY
@${STEP_MSG} "Fixing @pkgdep entries in dependent packages."
${_PKG_SILENT}${_PKG_DEBUG} \
set -e; \
@@ -159,8 +147,7 @@
### replace-clean removes the state files for the "replace" target so
### that it may be re-invoked.
###
-.PHONY: replace-clean
-replace-clean:
+replace-clean: .PHONY
${_PKG_SILENT}${_PKG_DEBUG} \
${TEST} -f ${_REPLACE_OLDNAME_FILE} || exit 0; \
oldname=`${CAT} ${_REPLACE_OLDNAME_FILE}`; \
Home |
Main Index |
Thread Index |
Old Index