[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 New
Headers show
Series
  • [v3,1/2] package/nss-mdns: Fix hook from post-install to finalize
Related show

Commit Message

Vincent Prince May 29, 2018, 8 a.m.
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. | #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

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))