* [PATCH 0/4]fix support postrm/prerm at image creation time
@ 2013-01-17 7:07 Hongxu Jia
2013-01-17 7:07 ` [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm " Hongxu Jia
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: Hongxu Jia @ 2013-01-17 7:07 UTC (permalink / raw)
To: openembedded-core
There are defects to support prerm/postrm at image creation time:
1) gtk-icon-cache.bbclass:support postrm at image creation time
2) update-rc.d:support postrm at image creation time
3) libnss-mdns:support prerm at image creation time
4) gtk-immodules-cache.bbclass:fix support postrm at image creation time
[YOCTO #3633] is about 1)gtk-icon-cache.bbclass
The following changes since commit 9f263a60e3521b800121a6f527a7b30dc9b62432:
oprofile: add AArch64 support (2013-01-16 16:10:39 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/fix-postrm
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-postrm
Hongxu Jia (4):
gtk-icon-cache.bbclass:fix support postrm at image creation time
update-rc.d:fix support postrm at image creation time
libnss-mdns:fix support prerm at image creation time
gtk-immodules-cache.bbclass:fix support postrm at image creation time
meta/classes/gtk-icon-cache.bbclass | 9 +++++++++
meta/classes/gtk-immodules-cache.bbclass | 2 +-
meta/classes/update-rc.d.bbclass | 6 +++++-
meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb | 11 +++++++++--
4 files changed, 24 insertions(+), 4 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm at image creation time
2013-01-17 7:07 [PATCH 0/4]fix support postrm/prerm at image creation time Hongxu Jia
@ 2013-01-17 7:07 ` Hongxu Jia
2013-01-17 9:10 ` Laurentiu Palcu
2013-01-17 9:26 ` Martin Jansa
2013-01-17 7:07 ` [PATCH 2/4] update-rc.d:fix " Hongxu Jia
` (2 subsequent siblings)
3 siblings, 2 replies; 15+ messages in thread
From: Hongxu Jia @ 2013-01-17 7:07 UTC (permalink / raw)
To: openembedded-core
The gtk_icon_cache_postrm failed at image creation time because ${D} is not
assigned as the prefix of icondir.
[YOCTO #3633]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/classes/gtk-icon-cache.bbclass | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
index 7c7dd78..4499782 100644
--- a/meta/classes/gtk-icon-cache.bbclass
+++ b/meta/classes/gtk-icon-cache.bbclass
@@ -32,6 +32,15 @@ done
}
gtk_icon_cache_postrm() {
+if [ "$D" != "" ]; then
+ for icondir in $D/usr/share/icons/* ; do
+ if [ -d $icondir ] ; then
+ gtk-update-icon-cache -qt $icondir
+ fi
+ done
+ exit 0
+fi
+
for icondir in /usr/share/icons/* ; do
if [ -d $icondir ] ; then
gtk-update-icon-cache -qt $icondir
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm at image creation time
2013-01-17 7:07 ` [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm " Hongxu Jia
@ 2013-01-17 9:10 ` Laurentiu Palcu
2013-01-17 9:39 ` Hongxu Jia
2013-01-17 9:26 ` Martin Jansa
1 sibling, 1 reply; 15+ messages in thread
From: Laurentiu Palcu @ 2013-01-17 9:10 UTC (permalink / raw)
To: Hongxu Jia; +Cc: openembedded-core
On 01/17/2013 09:07 AM, Hongxu Jia wrote:
> gtk_icon_cache_postrm() {
> +if [ "$D" != "" ]; then
> + for icondir in $D/usr/share/icons/* ; do
> + if [ -d $icondir ] ; then
> + gtk-update-icon-cache -qt $icondir
> + fi
> + done
> + exit 0
> +fi
I think you can just exit 0 here and let the hook in intercept-scripts
directory do the rest. The hook was added in the postinst and it will
properly call gtk-update-icon-cache. If you look in the log.do_rootfs
you'll see that the intercept scripts are run at the end (just look for
"Running intercept scripts"). So, I don't think you need to do this loop
here. Besides, it will be called for every postrm and running
gtk-update-icon-cache is not cheap...
Thanks,
Laurentiu
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm at image creation time
2013-01-17 9:10 ` Laurentiu Palcu
@ 2013-01-17 9:39 ` Hongxu Jia
2013-01-17 9:51 ` Laurentiu Palcu
0 siblings, 1 reply; 15+ messages in thread
From: Hongxu Jia @ 2013-01-17 9:39 UTC (permalink / raw)
To: Laurentiu Palcu; +Cc: openembedded-core
On 01/17/2013 05:10 PM, Laurentiu Palcu wrote:
>
> On 01/17/2013 09:07 AM, Hongxu Jia wrote:
>> gtk_icon_cache_postrm() {
>> +if [ "$D" != "" ]; then
>> + for icondir in $D/usr/share/icons/* ; do
>> + if [ -d $icondir ] ; then
>> + gtk-update-icon-cache -qt $icondir
>> + fi
>> + done
>> + exit 0
>> +fi
> I think you can just exit 0 here and let the hook in intercept-scripts
> directory do the rest. The hook was added in the postinst and it will
> properly call gtk-update-icon-cache. If you look in the log.do_rootfs
> you'll see that the intercept scripts are run at the end (just look for
> "Running intercept scripts"). So, I don't think you need to do this loop
> here. Besides, it will be called for every postrm and running
> gtk-update-icon-cache is not cheap...
>
> Thanks,
> Laurentiu
Ok, I will work on it to let the hook in intercept-scripts do the rest.
Thanks,
Hongxu
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm at image creation time
2013-01-17 9:39 ` Hongxu Jia
@ 2013-01-17 9:51 ` Laurentiu Palcu
0 siblings, 0 replies; 15+ messages in thread
From: Laurentiu Palcu @ 2013-01-17 9:51 UTC (permalink / raw)
To: Hongxu Jia; +Cc: openembedded-core
On 01/17/2013 11:39 AM, Hongxu Jia wrote:
> On 01/17/2013 05:10 PM, Laurentiu Palcu wrote:
>>
>> On 01/17/2013 09:07 AM, Hongxu Jia wrote:
>>> gtk_icon_cache_postrm() {
>>> +if [ "$D" != "" ]; then
>>> + for icondir in $D/usr/share/icons/* ; do
>>> + if [ -d $icondir ] ; then
>>> + gtk-update-icon-cache -qt $icondir
>>> + fi
>>> + done
>>> + exit 0
>>> +fi
>> I think you can just exit 0 here and let the hook in intercept-scripts
>> directory do the rest. The hook was added in the postinst and it will
>> properly call gtk-update-icon-cache. If you look in the log.do_rootfs
>> you'll see that the intercept scripts are run at the end (just look for
>> "Running intercept scripts"). So, I don't think you need to do this loop
>> here. Besides, it will be called for every postrm and running
>> gtk-update-icon-cache is not cheap...
>>
>> Thanks,
>> Laurentiu
> Ok, I will work on it to let the hook in intercept-scripts do the rest.
I just realized that, in order for the hook to be installed, the postint
scriptlet has to be run in the same do_rootfs session, otherwise the
hook will not be installed... In which case you might want to do that in
the postrm itself (like it was done for postinst).
Thanks,
Laurentiu
>
> Thanks,
> Hongxu
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm at image creation time
2013-01-17 7:07 ` [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm " Hongxu Jia
2013-01-17 9:10 ` Laurentiu Palcu
@ 2013-01-17 9:26 ` Martin Jansa
1 sibling, 0 replies; 15+ messages in thread
From: Martin Jansa @ 2013-01-17 9:26 UTC (permalink / raw)
To: Hongxu Jia; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]
On Thu, Jan 17, 2013 at 03:07:19PM +0800, Hongxu Jia wrote:
> The gtk_icon_cache_postrm failed at image creation time because ${D} is not
> assigned as the prefix of icondir.
Some packages are removed at image creation time? Why is postrm
executed?
And why don't use use $D in both cases (when empty and not empty) those
2 for cycles look the same.
Cheers,
> [YOCTO #3633]
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
> meta/classes/gtk-icon-cache.bbclass | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
> index 7c7dd78..4499782 100644
> --- a/meta/classes/gtk-icon-cache.bbclass
> +++ b/meta/classes/gtk-icon-cache.bbclass
> @@ -32,6 +32,15 @@ done
> }
>
> gtk_icon_cache_postrm() {
> +if [ "$D" != "" ]; then
> + for icondir in $D/usr/share/icons/* ; do
> + if [ -d $icondir ] ; then
> + gtk-update-icon-cache -qt $icondir
> + fi
> + done
> + exit 0
> +fi
> +
> for icondir in /usr/share/icons/* ; do
> if [ -d $icondir ] ; then
> gtk-update-icon-cache -qt $icondir
> --
> 1.7.10.4
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/4] update-rc.d:fix support postrm at image creation time
2013-01-17 7:07 [PATCH 0/4]fix support postrm/prerm at image creation time Hongxu Jia
2013-01-17 7:07 ` [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm " Hongxu Jia
@ 2013-01-17 7:07 ` Hongxu Jia
2013-01-17 7:07 ` [PATCH 3/4] libnss-mdns:fix support prerm " Hongxu Jia
2013-01-17 7:07 ` [PATCH 4/4] gtk-immodules-cache.bbclass:fix support postrm " Hongxu Jia
3 siblings, 0 replies; 15+ messages in thread
From: Hongxu Jia @ 2013-01-17 7:07 UTC (permalink / raw)
To: openembedded-core
updatercd_postrm failed at image creation time because "-f -r ${D}" is not
used as update-rc.d's option.
[YOCTO #3633]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/classes/update-rc.d.bbclass | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 3364269..83816d6 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -28,7 +28,11 @@ fi
}
updatercd_postrm() {
-update-rc.d $D ${INITSCRIPT_NAME} remove
+if [ "$D" != "" ]; then
+ update-rc.d -f -r $D ${INITSCRIPT_NAME} remove
+else
+ update-rc.d ${INITSCRIPT_NAME} remove
+fi
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 3/4] libnss-mdns:fix support prerm at image creation time
2013-01-17 7:07 [PATCH 0/4]fix support postrm/prerm at image creation time Hongxu Jia
2013-01-17 7:07 ` [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm " Hongxu Jia
2013-01-17 7:07 ` [PATCH 2/4] update-rc.d:fix " Hongxu Jia
@ 2013-01-17 7:07 ` Hongxu Jia
2013-01-17 9:28 ` Martin Jansa
2013-01-17 7:07 ` [PATCH 4/4] gtk-immodules-cache.bbclass:fix support postrm " Hongxu Jia
3 siblings, 1 reply; 15+ messages in thread
From: Hongxu Jia @ 2013-01-17 7:07 UTC (permalink / raw)
To: openembedded-core
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(-)
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
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH 3/4] libnss-mdns:fix support prerm at image creation time
2013-01-17 7:07 ` [PATCH 3/4] libnss-mdns:fix support prerm " Hongxu Jia
@ 2013-01-17 9:28 ` Martin Jansa
2013-01-17 10:48 ` Hongxu Jia
0 siblings, 1 reply; 15+ messages in thread
From: Martin Jansa @ 2013-01-17 9:28 UTC (permalink / raw)
To: Hongxu Jia; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1789 bytes --]
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
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH 3/4] libnss-mdns:fix support prerm at image creation time
2013-01-17 9:28 ` Martin Jansa
@ 2013-01-17 10:48 ` Hongxu Jia
2013-01-17 12:35 ` Martin Jansa
0 siblings, 1 reply; 15+ messages in thread
From: Hongxu Jia @ 2013-01-17 10:48 UTC (permalink / raw)
To: Martin Jansa; +Cc: 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
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH 3/4] libnss-mdns:fix support prerm at image creation time
2013-01-17 10:48 ` Hongxu Jia
@ 2013-01-17 12:35 ` Martin Jansa
0 siblings, 0 replies; 15+ messages in thread
From: Martin Jansa @ 2013-01-17 12:35 UTC (permalink / raw)
To: Hongxu Jia; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2294 bytes --]
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
>
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 4/4] gtk-immodules-cache.bbclass:fix support postrm at image creation time
2013-01-17 7:07 [PATCH 0/4]fix support postrm/prerm at image creation time Hongxu Jia
` (2 preceding siblings ...)
2013-01-17 7:07 ` [PATCH 3/4] libnss-mdns:fix support prerm " Hongxu Jia
@ 2013-01-17 7:07 ` Hongxu Jia
2013-01-17 9:52 ` Burton, Ross
3 siblings, 1 reply; 15+ messages in thread
From: Hongxu Jia @ 2013-01-17 7:07 UTC (permalink / raw)
To: openembedded-core
Let gtk_immodule_cache_postrm exit with ok at image creation time
[YOCTO #3633]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/classes/gtk-immodules-cache.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/gtk-immodules-cache.bbclass b/meta/classes/gtk-immodules-cache.bbclass
index 9ffb03b..6e1f5ef 100644
--- a/meta/classes/gtk-immodules-cache.bbclass
+++ b/meta/classes/gtk-immodules-cache.bbclass
@@ -31,7 +31,7 @@ fi
gtk_immodule_cache_postrm() {
if [ "x$D" != "x" ]; then
- exit 1
+ exit 0
fi
if [ ! -z `which gtk-query-immodules-2.0` ]; then
gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH 4/4] gtk-immodules-cache.bbclass:fix support postrm at image creation time
2013-01-17 7:07 ` [PATCH 4/4] gtk-immodules-cache.bbclass:fix support postrm " Hongxu Jia
@ 2013-01-17 9:52 ` Burton, Ross
2013-01-17 10:38 ` Hongxu Jia
0 siblings, 1 reply; 15+ messages in thread
From: Burton, Ross @ 2013-01-17 9:52 UTC (permalink / raw)
To: Hongxu Jia; +Cc: openembedded-core
On 17 January 2013 07:07, Hongxu Jia <hongxu.jia@windriver.com> wrote:
> Let gtk_immodule_cache_postrm exit with ok at image creation time
>
> [YOCTO #3633]
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
> meta/classes/gtk-immodules-cache.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/gtk-immodules-cache.bbclass b/meta/classes/gtk-immodules-cache.bbclass
> index 9ffb03b..6e1f5ef 100644
> --- a/meta/classes/gtk-immodules-cache.bbclass
> +++ b/meta/classes/gtk-immodules-cache.bbclass
> @@ -31,7 +31,7 @@ fi
>
> gtk_immodule_cache_postrm() {
> if [ "x$D" != "x" ]; then
> - exit 1
> + exit 0
> fi
> if [ ! -z `which gtk-query-immodules-2.0` ]; then
> gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
Surely you still want to run the postrm, and by exiting with 0 you're
not deferring it. Can't this use the same logic as the postinst to
run on both build machine and target?
Ross
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH 4/4] gtk-immodules-cache.bbclass:fix support postrm at image creation time
2013-01-17 9:52 ` Burton, Ross
@ 2013-01-17 10:38 ` Hongxu Jia
0 siblings, 0 replies; 15+ messages in thread
From: Hongxu Jia @ 2013-01-17 10:38 UTC (permalink / raw)
To: Burton, Ross; +Cc: openembedded-core
On 01/17/2013 05:52 PM, Burton, Ross wrote:
> On 17 January 2013 07:07, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>> Let gtk_immodule_cache_postrm exit with ok at image creation time
>>
>> [YOCTO #3633]
>>
>> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
>> ---
>> meta/classes/gtk-immodules-cache.bbclass | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/gtk-immodules-cache.bbclass b/meta/classes/gtk-immodules-cache.bbclass
>> index 9ffb03b..6e1f5ef 100644
>> --- a/meta/classes/gtk-immodules-cache.bbclass
>> +++ b/meta/classes/gtk-immodules-cache.bbclass
>> @@ -31,7 +31,7 @@ fi
>>
>> gtk_immodule_cache_postrm() {
>> if [ "x$D" != "x" ]; then
>> - exit 1
>> + exit 0
>> fi
>> if [ ! -z `which gtk-query-immodules-2.0` ]; then
>> gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
> Surely you still want to run the postrm, and by exiting with 0 you're
> not deferring it. Can't this use the same logic as the postinst to
> run on both build machine and target?
>
> Ross
No problem, I will use the same logic as the postinst to do that.
Thanks,
Hongxu
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH V2 0/4]fix support postrm/prerm at image creation time
@ 2013-01-17 12:56 Hongxu Jia
2013-01-17 12:56 ` [PATCH 3/4] libnss-mdns:fix support prerm " Hongxu Jia
0 siblings, 1 reply; 15+ messages in thread
From: Hongxu Jia @ 2013-01-17 12:56 UTC (permalink / raw)
To: openembedded-core
There are defects to support prerm/postrm at image creation time.
Change with V1:
1) gtk-icon-cache.bbclass: install hook instead of calling
gtk-update-icon-cache directly.
2) libnss-mdns: delete test $D, directly use $D/etc/nsswitch.conf.
3) gtk-immodules-cache.bbclass: postrm use the same logic as the
postinst.
[YOCTO #3633] is about 1) gtk-icon-cache.bbclass
The following changes since commit 9f263a60e3521b800121a6f527a7b30dc9b62432:
oprofile: add AArch64 support (2013-01-16 16:10:39 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/fix-postrm
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-postrm
Hongxu Jia (4):
gtk-icon-cache.bbclass:fix support postrm at image creation time
update-rc.d:fix support postrm at image creation time
libnss-mdns:fix support prerm at image creation time
gtk-immodules-cache.bbclass:fix support postrm at image creation time
meta/classes/gtk-icon-cache.bbclass | 18 ++++++++++++++++++
meta/classes/gtk-immodules-cache.bbclass | 13 ++++++++++++-
meta/classes/update-rc.d.bbclass | 6 +++++-
.../libnss-mdns/libnss-mdns_0.10.bb | 4 ++--
4 files changed, 37 insertions(+), 4 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 15+ messages in thread* [PATCH 3/4] libnss-mdns:fix support prerm at image creation time
2013-01-17 12:56 [PATCH V2 0/4]fix support postrm/prerm " Hongxu Jia
@ 2013-01-17 12:56 ` Hongxu Jia
0 siblings, 0 replies; 15+ messages in thread
From: Hongxu Jia @ 2013-01-17 12:56 UTC (permalink / raw)
To: openembedded-core
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 | 4 ++--
1 file changed, 2 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..a2712c9 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"
@@ -32,5 +32,5 @@ pkg_postinst_${PN} () {
pkg_prerm_${PN} () {
sed -e '/^hosts:/s/\s*\<mdns4\>//' \
-e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \
- -i /etc/nsswitch.conf
+ -i $D/etc/nsswitch.conf
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2013-01-17 13:12 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-17 7:07 [PATCH 0/4]fix support postrm/prerm at image creation time Hongxu Jia
2013-01-17 7:07 ` [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm " Hongxu Jia
2013-01-17 9:10 ` Laurentiu Palcu
2013-01-17 9:39 ` Hongxu Jia
2013-01-17 9:51 ` Laurentiu Palcu
2013-01-17 9:26 ` Martin Jansa
2013-01-17 7:07 ` [PATCH 2/4] update-rc.d:fix " Hongxu Jia
2013-01-17 7:07 ` [PATCH 3/4] libnss-mdns:fix support prerm " Hongxu Jia
2013-01-17 9:28 ` Martin Jansa
2013-01-17 10:48 ` Hongxu Jia
2013-01-17 12:35 ` Martin Jansa
2013-01-17 7:07 ` [PATCH 4/4] gtk-immodules-cache.bbclass:fix support postrm " Hongxu Jia
2013-01-17 9:52 ` Burton, Ross
2013-01-17 10:38 ` Hongxu Jia
-- strict thread matches above, loose matches on Subject: below --
2013-01-17 12:56 [PATCH V2 0/4]fix support postrm/prerm " Hongxu Jia
2013-01-17 12:56 ` [PATCH 3/4] libnss-mdns:fix support prerm " Hongxu Jia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox