Tue Jan 22 14:29:44 2019 UTC ()
Call replace-names before SU

This allows the replace target to work with OBJ on NFS where root
isn't allowed.


(roy)
diff -r1.18 -r1.19 pkgsrc/mk/install/replace.mk
diff -r1.5 -r1.6 pkgsrc/mk/pkgformat/pkg/replace.mk

cvs diff -r1.18 -r1.19 pkgsrc/mk/install/replace.mk (expand / switch to unified diff)

--- pkgsrc/mk/install/replace.mk 2016/04/10 15:58:02 1.18
+++ pkgsrc/mk/install/replace.mk 2019/01/22 14:29:44 1.19
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: replace.mk,v 1.18 2016/04/10 15:58:02 joerg Exp $ 1# $NetBSD: replace.mk,v 1.19 2019/01/22 14:29:44 roy Exp $
2# 2#
3# Public targets: 3# Public targets:
4# 4#
5# replace: 5# replace:
6# Updates a package in-place on the system. 6# Updates a package in-place on the system.
7# It will acquire elevated privileges just-in-time. 7# It will acquire elevated privileges just-in-time.
8# 8#
9# undo-replace: 9# undo-replace:
10# Undoes the effects of a previous "make replace". 10# Undoes the effects of a previous "make replace".
11# It will acquire elevated privileges just-in-time. 11# It will acquire elevated privileges just-in-time.
12# 12#
13# 13#
14# Private targets that must be defined by the package system format: 14# Private targets that must be defined by the package system format:
@@ -18,26 +18,27 @@ @@ -18,26 +18,27 @@
18# 18#
19# _pkgformat-undo-replace: 19# _pkgformat-undo-replace:
20# Undoes a previous "make _pkgformat-replace". 20# Undoes a previous "make _pkgformat-replace".
21 21
22# _pkgformat-destdir-undo-replace: 22# _pkgformat-destdir-undo-replace:
23# Undoes a previous "make _pkgformat-destdir-replace". 23# Undoes a previous "make _pkgformat-destdir-replace".
24 24
25.if ${_KEEP_BIN_PKGS} == "no" 25.if ${_KEEP_BIN_PKGS} == "no"
26_REPLACE_TARGETS+= stage-package-create 26_REPLACE_TARGETS+= stage-package-create
27.else 27.else
28_REPLACE_TARGETS+= package 28_REPLACE_TARGETS+= package
29.endif 29.endif
30_REPLACE_TARGETS+= replace-message 30_REPLACE_TARGETS+= replace-message
 31_REPLACE_TARGETS+= replace-names
31_REPLACE_TARGETS+= unprivileged-install-hook 32_REPLACE_TARGETS+= unprivileged-install-hook
32 33
33# 34#
34# replace 35# replace
35# 36#
36 37
37.PHONY: replace 38.PHONY: replace
38.if defined(_PKGSRC_BARRIER) 39.if defined(_PKGSRC_BARRIER)
39replace: ${_REPLACE_TARGETS} su-target 40replace: ${_REPLACE_TARGETS} su-target
40.else 41.else
41replace: barrier 42replace: barrier
42.endif 43.endif
43 44

cvs diff -r1.5 -r1.6 pkgsrc/mk/pkgformat/pkg/replace.mk (expand / switch to unified diff)

--- pkgsrc/mk/pkgformat/pkg/replace.mk 2017/08/19 00:30:19 1.5
+++ pkgsrc/mk/pkgformat/pkg/replace.mk 2019/01/22 14:29:44 1.6
@@ -1,40 +1,38 @@ @@ -1,40 +1,38 @@
1# $NetBSD: replace.mk,v 1.5 2017/08/19 00:30:19 jlam Exp $ 1# $NetBSD: replace.mk,v 1.6 2019/01/22 14:29:44 roy Exp $
2# 2#
3 3
4# _pkgformat-destdir-replace: 4# _pkgformat-destdir-replace:
5# Updates a package in-place on the system. 5# Updates a package in-place on the system.
6# 6#
7# See also: 7# See also:
8# replace 8# replace
9# 9#
10# XXX: The whole replacement, from deinstalling the old package up 10# XXX: The whole replacement, from deinstalling the old package up
11# to installing the new package, should be one transaction. 11# to installing the new package, should be one transaction.
12# 12#
13_pkgformat-replace: \ 13_pkgformat-replace: \
14 replace-names \ 
15 replace-tarup \ 14 replace-tarup \
16 replace-preserve-installed-info \ 15 replace-preserve-installed-info \
17 replace-preserve-required-by \ 16 replace-preserve-required-by \
18 deinstall \ 17 deinstall \
19 install-clean \ 18 install-clean \
20 install \ 19 install \
21 replace-fixup-required-by \ 20 replace-fixup-required-by \
22 replace-fixup-installed-info \ 21 replace-fixup-installed-info \
23 .PHONY 22 .PHONY
24 23
25# tarup is omitted for DESTDIR, because the benefits are very small 24# tarup is omitted for DESTDIR, because the benefits are very small
26_pkgformat-destdir-replace: \ 25_pkgformat-destdir-replace: \
27 replace-names \ 
28 replace-destdir \ 26 replace-destdir \
29 .PHONY 27 .PHONY
30 28
31# _pkgformat-undo-replace: 29# _pkgformat-undo-replace:
32# Undoes the actions from a previous _pkgformat-replace. 30# Undoes the actions from a previous _pkgformat-replace.
33# 31#
34# See also: 32# See also:
35# undo-replace 33# undo-replace
36# 34#
37_pkgformat-undo-replace: \ 35_pkgformat-undo-replace: \
38 undo-replace-check \ 36 undo-replace-check \
39 replace-preserve-installed-info \ 37 replace-preserve-installed-info \
40 replace-preserve-required-by \ 38 replace-preserve-required-by \