[oe] [PATCH] packaged-staging.bbclass: fix issue with no SRC_URI

Chris Larson clarson at kergoth.com
Fri Jun 4 19:47:10 UTC 2010


Please change ${srcuri} to $srcuri, so its very clear that its expanded in
shell, rather than letting bitbake try to expand it and fail since its unset
:)

After that, Acked-by: Chris Larson <chris_larson at mentor.com>

On Fri, Jun 4, 2010 at 12:37 PM, Cliff Brake <cbrake at bec-systems.com> wrote:

> Below is the context for proposed patch.  Perhaps this will help
> people review it.  I would like to get this pushed, so acks
> appreciated.
>
> 4ad83f91 (Richard Purdie     2008-03-17 20:38:12 +0000 364)     echo
> "Package: ${PSTAGE_PKGPN}"         >
> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
> 38f04328 (Richard Purdie     2008-03-14 11:38:00 +0000 365)     echo
> "Version: ${PSTAGE_PKGVERSION}"    >>
> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
> 695ca198 (Richard Purdie     2008-02-19 12:08:38 +0000 366)     echo
> "Description: ${DESCRIPTION}"      >>
> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
> 695ca198 (Richard Purdie     2008-02-19 12:08:38 +0000 367)     echo
> "Section: ${SECTION}"              >>
> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
> 695ca198 (Richard Purdie     2008-02-19 12:08:38 +0000 368)     echo
> "Priority: Optional"               >>
> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
> 695ca198 (Richard Purdie     2008-02-19 12:08:38 +0000 369)     echo
> "Maintainer: ${MAINTAINER}"        >>
> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
> 38f04328 (Richard Purdie     2008-03-14 11:38:00 +0000 370)     echo
> "Architecture: ${PSTAGE_PKGARCH}"  >>
> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
> 239d4346 (Koen Kooi          2008-04-11 07:39:51 +0000 371)
> 239d4346 (Koen Kooi          2008-04-11 07:39:51 +0000 372)     #
> Protect against empty SRC_URI
> 3440328a (Joshua Lock        2010-03-31 11:22:02 +0100 373)
> srcuri="${SRC_URI}"
> 3440328a (Joshua Lock        2010-03-31 11:22:02 +0100 374)     if [
> "$srcuri" == "" ]; then
> 3440328a (Joshua Lock        2010-03-31 11:22:02 +0100 375)
>  srcuri="OpenEmbedded"
> 239d4346 (Koen Kooi          2008-04-11 07:39:51 +0000 376)     fi
> 3440328a (Joshua Lock        2010-03-31 11:22:02 +0100 377)     echo
> "Source: ${SRC_URI}"               >>
> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
> 3440328a (Joshua Lock        2010-03-31 11:22:02 +0100 378)
> 3440328a (Joshua Lock        2010-03-31 11:22:02 +0100 379)     # Deal
> with libtool not supporting sysroots
> 3440328a (Joshua Lock        2010-03-31 11:22:02 +0100 380)     # Need
> to remove hardcoded paths and fix these when we install the
> 3440328a (Joshua Lock        2010-03-31 11:22:02 +0100 381)     #
> staging packages.
>
> This is the change where the code got changed:
>
>        # Protect against empty SRC_URI
> -       if [ "${SRC_URI}" != "" ] ; then
> -               echo "Source: ${SRC_URI}"               >>
> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
> -       else
> -               echo "Source: OpenEmbedded"               >>
> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
> +       srcuri="${SRC_URI}"
> +       if [ "$srcuri" == "" ]; then
> +               srcuri="OpenEmbedded"
>        fi
> +       echo "Source: ${SRC_URI}"               >>
> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
>
> It appears that the above patch is what broke it.  The proposed fix is
> in the previous email below.
>
> Thanks,
> Cliff
>
>
> On Wed, Jun 2, 2010 at 2:46 PM, Cliff Brake <cliff.brake at gmail.com> wrote:
> > From: Cliff Brake <cbrake at bec-systems.com>
> >
> > Currently with srctree, we get errors like the following:
> > | + srcuri=
> > | + '[' '' == '' ']'
> > | + srcuri=OpenEmbedded
> > | + echo 'Source: '
> > | ++ find
> /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/work/armv5te-angstrom-linux-gnueabi/autotools-demo-1.0-28-g3a96627-r0/staging-pkg
> '(' -name '*.la' -o -name '*-config' ')' -type f
> > | + stage-manager-ipkg-build -o 0 -g 0
> /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/work/armv5te-angstrom-linux-gnueabi/autotools-demo-1.0-28-g3a96627-r0/staging-pkg
> /scratch/oe/oe-build/oe/build/angstrom-2008.1/tmp/pstage/angstromglibc
> > | *** Error: CONTROL/control is missing field Source
> > | The Source field contain the URL's or filenames of the source code and
> any patches
> > | used to build this package.  Either gnu-style tarballs or Debian source
> packages
> > | are acceptable.  Relative filenames may be used if they are distributed
> in the same
> > | directory as the .ipk file.
> > |
> > | ipkg-build: Please fix the above errors and try again.
> > | ERROR: Function staging_packager failed
> > NOTE: package autotools-demo-1.0-28-g3a96627-r0: task do_package_stage:
> Failed
> > ERROR: TaskFailed event exception, aborting
> >
> > This patch fixes that issue.
> >
> > Signed-off-by: Cliff Brake <cbrake at bec-systems.com>
> > ---
> >  classes/packaged-staging.bbclass |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/classes/packaged-staging.bbclass
> b/classes/packaged-staging.bbclass
> > index 83f3578..6413afb 100644
> > --- a/classes/packaged-staging.bbclass
> > +++ b/classes/packaged-staging.bbclass
> > @@ -374,7 +374,7 @@ staging_packager () {
> >        if [ "$srcuri" == "" ]; then
> >                srcuri="OpenEmbedded"
> >        fi
> > -       echo "Source: ${SRC_URI}"               >>
> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
> > +       echo "Source: ${srcuri}"               >>
> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
> >
> >        # Deal with libtool not supporting sysroots
> >        # Need to remove hardcoded paths and fix these when we install the
> > --
> > 1.7.0.4
> >
> >
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel at lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> >
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics



More information about the Openembedded-devel mailing list