Call replace-names before SU This allows the replace target to work with OBJ on NFS where root isn't allowed.diff -r1.18 -r1.19 pkgsrc/mk/install/replace.mk
(roy)
@@ -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) | |
39 | replace: ${_REPLACE_TARGETS} su-target | 40 | replace: ${_REPLACE_TARGETS} su-target | |
40 | .else | 41 | .else | |
41 | replace: barrier | 42 | replace: barrier | |
42 | .endif | 43 | .endif | |
43 | 44 |
@@ -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 \ |