Patchwork [1/8] busybox: remove the postinst part of the recipe

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date June 7, 2013, 6:13 a.m.
Message ID <4caf51c1d2225dc66aeef8326ba0616d97f7c691.1370585547.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/51275/
State Accepted
Commit 6984890b2eef1da8d901f9f5b916f8762f6bd050
Headers show

Comments

Qi.Chen@windriver.com - June 7, 2013, 6:13 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

Remove the pkg_postinst_${PN} from this recipe, as it's redundant.
It basically wants to do the same thing as the update-alternatives
does. But it doesn't do it well.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/busybox/busybox.inc |    8 --------
 1 file changed, 8 deletions(-)
Otavio Salvador - June 7, 2013, 12:32 p.m.
On Fri, Jun 7, 2013 at 3:13 AM, <Qi.Chen@windriver.com> wrote:

> From: Chen Qi <Qi.Chen@windriver.com>
>
> Remove the pkg_postinst_${PN} from this recipe, as it's redundant.
> It basically wants to do the same thing as the update-alternatives
> does. But it doesn't do it well.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>

Instead of removing it, please convert it here for update-alternatives so
it keeps working on this commit and allow bisect in future if need.
Qi.Chen@windriver.com - June 8, 2013, 2:10 a.m.
On 06/07/2013 08:32 PM, Otavio Salvador wrote:
>
>
>
> On Fri, Jun 7, 2013 at 3:13 AM, <Qi.Chen@windriver.com 
> <mailto:Qi.Chen@windriver.com>> wrote:
>
>     From: Chen Qi <Qi.Chen@windriver.com <mailto:Qi.Chen@windriver.com>>
>
>     Remove the pkg_postinst_${PN} from this recipe, as it's redundant.
>     It basically wants to do the same thing as the update-alternatives
>     does. But it doesn't do it well.
>
>     Signed-off-by: Chen Qi <Qi.Chen@windriver.com
>     <mailto:Qi.Chen@windriver.com>>
>
>
> Instead of removing it, please convert it here for update-alternatives 
> so it keeps working on this commit and allow bisect in future if need.
>
Hi Otavio,

Thanks for your review and comments.
Sorry but I don't understand it :(
What do you mean by "convert it for update-alternatives"?
Could you please give me a little more explanation?

Best Regards,
Chen Qi

> -- 
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br http://projetos.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
Otavio Salvador - June 9, 2013, 12:03 p.m.
On Fri, Jun 7, 2013 at 11:10 PM, ChenQi <Qi.Chen@windriver.com> wrote:

>  On 06/07/2013 08:32 PM, Otavio Salvador wrote:
>
>
>
>
> On Fri, Jun 7, 2013 at 3:13 AM, <Qi.Chen@windriver.com> wrote:
>
>> From: Chen Qi <Qi.Chen@windriver.com>
>>
>> Remove the pkg_postinst_${PN} from this recipe, as it's redundant.
>> It basically wants to do the same thing as the update-alternatives
>> does. But it doesn't do it well.
>>
>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>>
>
>  Instead of removing it, please convert it here for update-alternatives
> so it keeps working on this commit and allow bisect in future if need.
>
>   Hi Otavio,
>
> Thanks for your review and comments.
> Sorry but I don't understand it :(
> What do you mean by "convert it for update-alternatives"?
> Could you please give me a little more explanation?
>

Yes, add the update-alternatives support here as well so we can remove the
postinst and add the  new code in same patch; it allows for bisect :)

Patch

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index c8908b0..f4efeb8 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -265,14 +265,6 @@  python do_package_prepend () {
     f.close()
 }
 
-pkg_postinst_${PN} () {
-	# If we are not making an image we create links for the utilities that doesn't exist
-	# so the update-alternatives script will get the utilities it needs
-	# (update-alternatives have no problem replacing links later anyway)
-	test -n 2> /dev/null || alias test='busybox test'
-	if test "x$D" = "x"; then while read link; do if test ! -h "$link"; then case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; busybox ln -s $to $link; fi; done </etc/busybox.links; fi
-}
-
 pkg_prerm_${PN} () {
 	# This is so you can make busybox commit suicide - removing busybox with no other packages
 	# providing its files, this will make update-alternatives work, but the update-rc.d part