| Submitter | Hongxu Jia |
|---|---|
| Date | Jan. 17, 2013, 7:07 a.m. |
| Message ID | <6b20de5260fdf8542bd214ca4c380bfe7614f56c.1358406049.git.hongxu.jia@windriver.com> |
| Download | mbox | patch |
| Permalink | /patch/42767/ |
| State | New |
| Headers | show |
Comments
On Thu, Jan 17, 2013 at 03:07:21PM +0800, Hongxu Jia wrote: > The pkg_prerm_${PN} failed at image creation time because $D is not assigned > as the prefix of "/etc/nsswitch.conf" Again looks the same why not use $D/etc/nsswitch.conf in both cases? > > [YOCTO #3633] > > Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > --- > meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb > index f7356e4..e9a4128 100644 > --- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb > +++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb > @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1" > > DEPENDS = "avahi" > RDEPENDS_${PN} = "avahi-daemon" > -PR = "r6" > +PR = "r7" > > SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz" > > @@ -30,7 +30,14 @@ pkg_postinst_${PN} () { > } > > pkg_prerm_${PN} () { > +if [ "$D" != "" ]; then > sed -e '/^hosts:/s/\s*\<mdns4\>//' \ > -e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \ > - -i /etc/nsswitch.conf > + -i $D/etc/nsswitch.conf > + exit 0 > +fi > + > +sed -e '/^hosts:/s/\s*\<mdns4\>//' \ > + -e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \ > + -i /etc/nsswitch.conf > } > -- > 1.7.10.4 > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
On 01/17/2013 05:28 PM, Martin Jansa wrote: > On Thu, Jan 17, 2013 at 03:07:21PM +0800, Hongxu Jia wrote: >> The pkg_prerm_${PN} failed at image creation time because $D is not assigned >> as the prefix of "/etc/nsswitch.conf" > Again looks the same why not use $D/etc/nsswitch.conf in both cases? I think that test $D to explicitly make a distinction between the build time and run time, it's better for others to notice the difference. Thanks, Hongxu >> [YOCTO #3633] >> >> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> >> --- >> meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb | 11 +++++++++-- >> 1 file changed, 9 insertions(+), 2 deletions(-) >> >> diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb >> index f7356e4..e9a4128 100644 >> --- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb >> +++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb >> @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1" >> >> DEPENDS = "avahi" >> RDEPENDS_${PN} = "avahi-daemon" >> -PR = "r6" >> +PR = "r7" >> >> SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz" >> >> @@ -30,7 +30,14 @@ pkg_postinst_${PN} () { >> } >> >> pkg_prerm_${PN} () { >> +if [ "$D" != "" ]; then >> sed -e '/^hosts:/s/\s*\<mdns4\>//' \ >> -e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \ >> - -i /etc/nsswitch.conf >> + -i $D/etc/nsswitch.conf >> + exit 0 >> +fi >> + >> +sed -e '/^hosts:/s/\s*\<mdns4\>//' \ >> + -e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \ >> + -i /etc/nsswitch.conf >> } >> -- >> 1.7.10.4 >> >> >> _______________________________________________ >> Openembedded-core mailing list >> Openembedded-core@lists.openembedded.org >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
On Thu, Jan 17, 2013 at 06:48:01PM +0800, Hongxu Jia wrote: > On 01/17/2013 05:28 PM, Martin Jansa wrote: > > On Thu, Jan 17, 2013 at 03:07:21PM +0800, Hongxu Jia wrote: > >> The pkg_prerm_${PN} failed at image creation time because $D is not assigned > >> as the prefix of "/etc/nsswitch.conf" > > Again looks the same why not use $D/etc/nsswitch.conf in both cases? > I think that test $D to explicitly make a distinction between the build > time > and run time, it's better for others to notice the difference. But there isn't any difference if I'm looking correctly. Cheers, > Thanks, > Hongxu > >> [YOCTO #3633] > >> > >> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> > >> --- > >> meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb | 11 +++++++++-- > >> 1 file changed, 9 insertions(+), 2 deletions(-) > >> > >> diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb > >> index f7356e4..e9a4128 100644 > >> --- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb > >> +++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb > >> @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1" > >> > >> DEPENDS = "avahi" > >> RDEPENDS_${PN} = "avahi-daemon" > >> -PR = "r6" > >> +PR = "r7" > >> > >> SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz" > >> > >> @@ -30,7 +30,14 @@ pkg_postinst_${PN} () { > >> } > >> > >> pkg_prerm_${PN} () { > >> +if [ "$D" != "" ]; then > >> sed -e '/^hosts:/s/\s*\<mdns4\>//' \ > >> -e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \ > >> - -i /etc/nsswitch.conf > >> + -i $D/etc/nsswitch.conf > >> + exit 0 > >> +fi > >> + > >> +sed -e '/^hosts:/s/\s*\<mdns4\>//' \ > >> + -e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \ > >> + -i /etc/nsswitch.conf > >> } > >> -- > >> 1.7.10.4 > >> > >> > >> _______________________________________________ > >> Openembedded-core mailing list > >> Openembedded-core@lists.openembedded.org > >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core >
Patch
diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb index f7356e4..e9a4128 100644 --- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb +++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1" DEPENDS = "avahi" RDEPENDS_${PN} = "avahi-daemon" -PR = "r6" +PR = "r7" SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz" @@ -30,7 +30,14 @@ pkg_postinst_${PN} () { } pkg_prerm_${PN} () { +if [ "$D" != "" ]; then sed -e '/^hosts:/s/\s*\<mdns4\>//' \ -e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \ - -i /etc/nsswitch.conf + -i $D/etc/nsswitch.conf + exit 0 +fi + +sed -e '/^hosts:/s/\s*\<mdns4\>//' \ + -e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \ + -i /etc/nsswitch.conf }
The pkg_prerm_${PN} failed at image creation time because $D is not assigned as the prefix of "/etc/nsswitch.conf" [YOCTO #3633] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)