diff mbox series

[v3,1/2] package/nss-mdns: Fix hook from post-install to finalize

Message ID 1527580812-14078-1-git-send-email-vincent.prince.fr@gmail.com
State Accepted
Commit 6433cefa5c22e879fa2df0d3501a7492c4b9019c
Headers show
Series [v3,1/2] package/nss-mdns: Fix hook from post-install to finalize | expand

Commit Message

Vincent Prince May 29, 2018, 8 a.m. UTC
Both nss-mdns and nss-myhostname patch nsswitch.conf file
so it needs to be done at the final stage otherwise changes are not applied

Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
---
 package/nss-mdns/nss-mdns.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Korsgaard May 29, 2018, 8:50 a.m. UTC | #1
>>>>> "Vincent" == Vincent Prince <vincent.prince.fr@gmail.com> writes:

 > Both nss-mdns and nss-myhostname patch nsswitch.conf file
 > so it needs to be done at the final stage otherwise changes are not applied

Sorry, but that still doesn't quite explain it to me. The problem rather
seems to be that nss-mdns completely replaces the hosts: line rather
than adding mdns4 to it, so depending on ordering it may overwrite the
modifications that nss-myhostname does.

If/when we get toplevel parallel builds then we also have the issue of
parallel changes to /etc/nsswitch.conf, so the move to target-finalize
is a good thing, just not the current description.

 > Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
 > ---
 >  package/nss-mdns/nss-mdns.mk | 2 +-
 >  1 file changed, 1 insertion(+), 1 deletion(-)

 > diff --git a/package/nss-mdns/nss-mdns.mk b/package/nss-mdns/nss-mdns.mk
 > index 407b942..ee666c7 100644
 > --- a/package/nss-mdns/nss-mdns.mk
 > +++ b/package/nss-mdns/nss-mdns.mk
 > @@ -17,6 +17,6 @@ define NSS_MDNS_INSTALL_CONFIG
 >  		$(TARGET_DIR)/etc/nsswitch.conf
 >  endef
 
 > -NSS_MDNS_POST_INSTALL_TARGET_HOOKS += NSS_MDNS_INSTALL_CONFIG
 > +NSS_MDNS_TARGET_FINALIZE_HOOKS += NSS_MDNS_INSTALL_CONFIG
 
 >  $(eval $(autotools-package))
 > -- 
 > 2.7.4
Peter Korsgaard Oct. 20, 2018, 11:48 p.m. UTC | #2
>>>>> "Vincent" == Vincent Prince <vincent.prince.fr@gmail.com> writes:

 > Both nss-mdns and nss-myhostname patch nsswitch.conf file
 > so it needs to be done at the final stage otherwise changes are not applied

 > Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>

We also need to rewrite the sed invocation so the order between
toolchain / nss-mdns / nss-myhostname doesn't matter. I've added 2
followup patches to do that and committed, thanks.
diff mbox series

Patch

diff --git a/package/nss-mdns/nss-mdns.mk b/package/nss-mdns/nss-mdns.mk
index 407b942..ee666c7 100644
--- a/package/nss-mdns/nss-mdns.mk
+++ b/package/nss-mdns/nss-mdns.mk
@@ -17,6 +17,6 @@  define NSS_MDNS_INSTALL_CONFIG
 		$(TARGET_DIR)/etc/nsswitch.conf
 endef
 
-NSS_MDNS_POST_INSTALL_TARGET_HOOKS += NSS_MDNS_INSTALL_CONFIG
+NSS_MDNS_TARGET_FINALIZE_HOOKS += NSS_MDNS_INSTALL_CONFIG
 
 $(eval $(autotools-package))