[OE-core] [OE-Core][PATCH] base-files: do_install_basefilesissue error
Giuseppe Condorelli
giuseppe.condorelli at gmail.com
Tue Oct 23 07:56:48 UTC 2012
Yes, you are right.
The mistake was in local setting because DISTRO_VERSION was set to
"-${DATE}" and the minus created
the install error.
Locally solved, please discard the patch.
Thanks,
Giuseppe
2012/10/23 Martin Jansa <martin.jansa at gmail.com>
> On Mon, Oct 22, 2012 at 05:32:32PM +0200, Giuseppe CONDORELLI wrote:
> > Fixed error in do_install_basefilesissue, printf is now replaced by echo.
>
> Looks like partial revert of
>
> commit a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3
> Author: Andrei Gherzan <andrei at gherzan.ro>
> Date: Thu Sep 20 12:56:59 2012 +0300
>
> Replace "echo -e" with "printf" to have the same behavior in dash or
> bash
>
> oe-core removed the prerequisite to have sh as bash. POSIX doesn't
> define
> any options and furthermore allows 'echo -e' to be the default
> behavior.
> This means that in dash 'echo -e' will actually print '-e' and
> interpret
> backslashes by default. We use instead 'printf' builtin command with or
> without '\n' to simulate 'echo -e' or 'echo -n'.
> 'printf' needs format while 'echo' can be used without any arguments.
> So
> 'echo >' was replaced by 'printf "" >'.
> 'echo' without '-n' flag adds a new line by default so to keep the same
> behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is
> used.
>
> [YOCTO #3138]
>
> with very weak explanation why..
>
> >
> > Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli at st.com>
> > ---
> > meta/recipes-core/base-files/base-files_3.0.14.bb | 8 ++++----
> > 1 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bbb/meta/recipes-core/base-files/
> base-files_3.0.14.bb
> > index ba355ee..766b0e5 100644
> > --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> > +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > @@ -117,11 +117,11 @@ do_install_basefilesissue () {
> >
> > install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir}
> > if [ -n "${DISTRO_NAME}" ]; then
> > - printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
> > - printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
> > + echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
> > + echo "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
> > if [ -n "${DISTRO_VERSION}" ]; then
> > - printf "${DISTRO_VERSION} " >>
> ${D}${sysconfdir}/issue
> > - printf "${DISTRO_VERSION} " >> ${D}${sysconfdir}/
> issue.net
> > + echo "${DISTRO_VERSION} " >>
> ${D}${sysconfdir}/issue
> > + echo "${DISTRO_VERSION} " >> ${D}${sysconfdir}/
> issue.net
> > fi
> > echo "\n \l" >> ${D}${sysconfdir}/issue
> > echo >> ${D}${sysconfdir}/issue
> > --
> > 1.7.4.4
> >
> >
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core at lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
> --
> Martin 'JaMa' Jansa jabber: Martin.Jansa at gmail.com
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20121023/dcd01805/attachment-0002.html>
More information about the Openembedded-core
mailing list