diff options
author | obache <obache@pkgsrc.org> | 2011-06-04 10:05:00 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2011-06-04 10:05:00 +0000 |
commit | b8c7deeec1e0a90bb65bf1b2119fc7fdc725f6a3 (patch) | |
tree | e0df88a2fba38c0b64555c2c85f7d3fe5170fd65 | |
parent | 3a64d9ed4a193e4bac550ecd549202f22d1834bf (diff) | |
download | pkgsrc-b8c7deeec1e0a90bb65bf1b2119fc7fdc725f6a3.tar.gz |
Add support undo-replace with USE_DESTDIR.
fixes PR#43689.
-rw-r--r-- | mk/flavor/pkg/replace.mk | 15 | ||||
-rw-r--r-- | mk/install/replace.mk | 9 |
2 files changed, 22 insertions, 2 deletions
diff --git a/mk/flavor/pkg/replace.mk b/mk/flavor/pkg/replace.mk index 24180c75697..82b3599f177 100644 --- a/mk/flavor/pkg/replace.mk +++ b/mk/flavor/pkg/replace.mk @@ -1,4 +1,4 @@ -# $NetBSD: replace.mk,v 1.31 2010/09/14 22:30:42 gdt Exp $ +# $NetBSD: replace.mk,v 1.32 2011/06/04 10:05:00 obache Exp $ # # _flavor-replace: @@ -29,6 +29,7 @@ _flavor-replace: \ _flavor-destdir-replace: \ replace-names \ + replace-tarup \ replace-destdir \ .PHONY @@ -48,6 +49,12 @@ _flavor-undo-replace: \ replace-clean \ .PHONY +_flavor-destdir-undo-replace: \ + undo-replace-check \ + undo-destdir-replace-install \ + replace-clean \ + .PHONY + _INSTALLED_INFO_FILE= ${WRKDIR}/.replace-+INSTALLED_INFO _REQUIRED_BY_FILE= ${WRKDIR}/.replace-+REQUIRED_BY @@ -90,6 +97,12 @@ undo-replace-install: .PHONY ${ECHO} "Installing saved package ${WRKDIR}/$${oldname}${PKG_SUFX}"; \ ${PKG_ADD} ${WRKDIR}/$${oldname}${PKG_SUFX} +undo-destdir-replace-install: .PHONY + @${PHASE_MSG} "Re-adding ${PKGNAME} from saved tar-up package." + ${RUN} ${_REPLACE_OLDNAME_CMD}; \ + ${ECHO} "Installing saved package ${WRKDIR}/$${oldname}${PKG_SUFX}"; \ + ${PKG_ADD} -U -D ${WRKDIR}/$${oldname}${PKG_SUFX} + # Computes and saves the full names of the installed package to be replaced # (oldname) and the package that will be installed (newname), so that these # names are available later. diff --git a/mk/install/replace.mk b/mk/install/replace.mk index 75cd16e44b0..f1918fad77d 100644 --- a/mk/install/replace.mk +++ b/mk/install/replace.mk @@ -1,4 +1,4 @@ -# $NetBSD: replace.mk,v 1.11 2009/06/09 08:40:28 joerg Exp $ +# $NetBSD: replace.mk,v 1.12 2011/06/04 10:05:00 obache Exp $ # # Public targets: # @@ -22,6 +22,9 @@ # _flavor-undo-replace: # Undoes a previous "make _flavor-replace". +# _flavor-destdir-undo-replace: +# Undoes a previous "make _flavor-destdir-replace". + .if ${_USE_DESTDIR} == "no" _REPLACE_TARGETS+= ${_PKGSRC_BUILD_TARGETS} .else @@ -62,5 +65,9 @@ undo-replace-message: .PHONY @${PHASE_MSG} "Undoing replacement for ${PKGNAME}" @${WARNING_MSG} "experimental target - DATA LOSS MAY OCCUR." +.if ${_USE_DESTDIR} == "no" su-undo-replace: .PHONY _flavor-undo-replace +.else +su-undo-replace: .PHONY _flavor-destdir-undo-replace +.endif MAKEFLAGS.su-undo-replace= _UPDATE_RUNNING=yes |