On Sat, Jul 2, 2011 at 7:24 AM, Marko Saukko <[email protected]> wrote: > On Fri, Jul 1, 2011 at 11:15 AM, zhengwu <[email protected]> wrote: >> - >> - >> +%post >> +/sbin/ldconfig >> +if [ -e /sbin/boardname ]; then >> + BOARDNAME_REVISION=`/sbin/boardname` >> + BOARDNAME=`echo $BOARDNAME_REVISION | sed 's!_[0-9]*$!!g'` >> + if [ $BOARDNAME = ia32_oemtablet ]; then >> + if [ -e %{_sysconfdir}/bluetooth/audio.conf ]; then >> + rm -f %{_sysconfdir}/bluetooth/audio.conf >> + fi >> + mv %{_sysconfdir}/bluetooth/ia32_oemtable_audio.conf >> %{_sysconfdir}/bluetooth/audio.conf >> + else >> + if [ -e %{_sysconfdir}/bluetooth/ia32_oemtable_audio.conf ]; then >> + rm -f %{_sysconfdir}/bluetooth/ia32_oemtable_audio.conf >> + fi >> + fi >> +else >> + if [ -e %{_sysconfdir}/bluetooth/ia32_oemtable_audio.conf ]; then >> + rm -f %{_sysconfdir}/bluetooth/ia32_oemtable_audio.conf >> + fi >> +fi >> > > DO NOT add hardware specific conditions to the core packages. This is > exactly what is tried to avoid with boardname package. If you need to > have device specific setting do it like > > BOARDNAME=`cat /etc/boardname` > if [ -e /dir/to/config/${BOARDNAME}.conf ]; then > use /dir/to/config/${BOARDNAME}.conf > else > use default config > fi > > Regards, > Marko
on top of this, using boardname in %post is entirely incorrect in the first place. You should never run boardname as part of a package install/update routine, as the %post script runs in the image generator host which is different from the target. this needs to be something that is run on the target device only, and it needs to run every boot, not just once. Auke _______________________________________________ MeeGo-packaging mailing list [email protected] http://lists.meego.com/listinfo/meego-packaging
