[yocto] Strange error from do_package_write_rpm

Hans Beckérus hans.beckerus at gmail.com
Tue Jun 4 08:31:43 PDT 2013


On Tue, Jun 4, 2013 at 3:02 PM, Gary Thomas <gary at mlbassoc.com> wrote:
> On 2013-06-04 05:41, Hans Beckérus wrote:
>>
>> Hello. After checking out poky:master
>> 0c0bb02f5104e3856c9d90088e1ece08652cc19f we suddenly experience the
>> following error coming from one of our recipes. We never observed this
>> before doing the poky uplift. Any hints to what might cause this?
>>
>> I can see this:
>>
>> Exception: ExpansionError: Failure expanding variable SUMMARY,
>> expression was ${SUMMARY} - Debugging files which triggered exception
>> Exception: variable SUMMARY references itself!
>>
>> But even if I somewhat understand what it is trying to tell me,at the
>> same time I do not really understand what can be done about it :(
>
>
> What does your SUMMARY line look like in your lmc_1.0.bb recipe?
>

That's an easy one ;) It is not set at all. But digging deeper into
this problem gave me the solution.
The lmc.bb is a recipe that does not actually build anything. It is
thus very similar to e.g. the package-index.bb.
So, what I did was to instead use that recipe as a base and now it works :)
More precisely, what we did before was

do_package[noexec] = "1"
do_packagedata[noexec] = "1"
do_populate_sysroot[noexec] = "1"

But it seems that is not enough, we also need to tell it not to run

do_package_write[noexec] = "1"
do_package_write_ipk[noexec] = "1"
do_package_write_rpm[noexec] = "1"
do_package_write_deb[noexec] = "1"

The incorrect assumption we made was that do_package[data] on top
level would also drag in all the sub-functions which seems not to be
the case. So with all these set to noexec the error is gone! I do have
one more question. I can see in package-index.bb the following being
set

INHIBIT_DEFAULT_DEPS = "1"
PACKAGES = ""
EXCLUDE_FROM_WORLD = "1"

Is this something that is recommended to be used for recipes like
this? Or can we safely leave them out?

Hans

>>
>>
>> Build Configuration:
>> BB_VERSION        = "1.19.0"
>> BUILD_SYS         = "x86_64-linux"
>> NATIVELSBSTRING   = "SUSE-LINUX-11"
>> TARGET_SYS        = "arm-poky-linux-gnueabi"
>> MACHINE           = "zynq-zc706"
>> DISTRO            = "poky-chris"
>> DISTRO_VERSION    = "1.4+snapshot-20130604"
>> TUNE_FEATURES     = "armv7a vfp cortexa9"
>> TARGET_FPU        = "vfp"
>> meta
>> meta-yocto
>> meta-yocto-bsp    = "master:0c0bb02f5104e3856c9d90088e1ece08652cc19f"
>> meta-oe           = "master:7c292ce28756824b1fa377d516aedd979fa41f19"
>>
>> Ant the error:
>>
>> ERROR: Error executing a python function in
>> /home/qhanbec/poky/meta-chris/recipes-core/lmc/lmc.bb:
>>
>> The stack trace of python calls that resulted in this exception/failure
>> was:
>> File: 'write_specfile', lineno: 505, function: <module>
>>       0501:
>>       0502:    specfile.close()
>>       0503:
>>       0504:
>>   *** 0505:write_specfile(d)
>>       0506:
>> File: 'write_specfile', lineno: 209, function: write_specfile
>>       0205:        conffiles = (localdata.getVar('CONFFILES', True) or
>> "").split()
>>       0206:
>>       0207:        splitname    = strip_multilib(pkgname, d)
>>       0208:
>>   *** 0209:        splitsummary = (localdata.getVar('SUMMARY', True) or
>> localdata.getVar('DESCRIPTION', True) or ".")
>>       0210:        splitversion = (localdata.getVar('PKGV', True) or
>> "").replace('-', '+')
>>       0211:        splitrelease = (localdata.getVar('PKGR', True) or "")
>>       0212:        splitepoch   = (localdata.getVar('PKGE', True) or "")
>>       0213:        splitlicense = (localdata.getVar('LICENSE', True) or
>> "")
>> File: '/home/qhanbec/poky/bitbake/lib/bb/data_smart.py', lineno: 503,
>> function: getVar
>>       0499:        value = self.getVarFlag(var, "_content", False,
>> noweakdefault)
>>       0500:
>>       0501:        # Call expand() separately to make use of the expand
>> cache
>>       0502:        if expand and value:
>>   *** 0503:            return self.expand(value, var)
>>       0504:        return value
>>       0505:
>>       0506:    def renameVar(self, key, newkey, **loginfo):
>>       0507:        """
>> File: '/home/qhanbec/poky/bitbake/lib/bb/data_smart.py', lineno: 336,
>> function: expand
>>       0332:
>>       0333:        return varparse
>>       0334:
>>       0335:    def expand(self, s, varname = None):
>>   *** 0336:        return self.expandWithRefs(s, varname).value
>>       0337:
>>       0338:
>>       0339:    def finalize(self, parent = False):
>>       0340:        """Performs final steps upon the datastore,
>> including application of overrides"""
>> File: '/home/qhanbec/poky/bitbake/lib/bb/data_smart.py', lineno: 326,
>> function: expandWithRefs
>>       0322:                raise
>>       0323:            except bb.parse.SkipPackage:
>>       0324:                raise
>>       0325:            except Exception as exc:
>>   *** 0326:                raise ExpansionError(varname, s, exc)
>>       0327:
>>       0328:        varparse.value = s
>>       0329:
>>       0330:        if varname:
>> Exception: ExpansionError: Failure expanding variable SUMMARY,
>> expression was ${SUMMARY} - Debugging files which triggered exception
>> Exception: variable SUMMARY references itself!
>>
>> ERROR: Function failed: write_specfile
>> ERROR: Logfile of failure stored in:
>>
>> /home/qhanbec/poky/build/tmp/work/cortexa9-vfp-poky-linux-gnueabi/lmc/1.0-r0/temp/log.do_package_write_rpm.3408
>> ERROR: Task 12 (/home/qhanbec/poky/meta-chris/recipes-core/lmc/lmc.bb,
>> do_package_write_rpm) failed with exit code '1'
>> NOTE: Tasks Summary: Attempted 845 tasks of which 827 didn't need to
>> be rerun and 1 failed.
>> _______________________________________________
>> yocto mailing list
>> yocto at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>
> --
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

On Tue, Jun 4, 2013 at 3:02 PM, Gary Thomas <gary at mlbassoc.com> wrote:
> On 2013-06-04 05:41, Hans Beckérus wrote:
>>
>> Hello. After checking out poky:master
>> 0c0bb02f5104e3856c9d90088e1ece08652cc19f we suddenly experience the
>> following error coming from one of our recipes. We never observed this
>> before doing the poky uplift. Any hints to what might cause this?
>>
>> I can see this:
>>
>> Exception: ExpansionError: Failure expanding variable SUMMARY,
>> expression was ${SUMMARY} - Debugging files which triggered exception
>> Exception: variable SUMMARY references itself!
>>
>> But even if I somewhat understand what it is trying to tell me,at the
>> same time I do not really understand what can be done about it :(
>
>
> What does your SUMMARY line look like in your lmc_1.0.bb recipe?
>
>>
>> Hans
>>
>>
>>
>> Build Configuration:
>> BB_VERSION        = "1.19.0"
>> BUILD_SYS         = "x86_64-linux"
>> NATIVELSBSTRING   = "SUSE-LINUX-11"
>> TARGET_SYS        = "arm-poky-linux-gnueabi"
>> MACHINE           = "zynq-zc706"
>> DISTRO            = "poky-chris"
>> DISTRO_VERSION    = "1.4+snapshot-20130604"
>> TUNE_FEATURES     = "armv7a vfp cortexa9"
>> TARGET_FPU        = "vfp"
>> meta
>> meta-yocto
>> meta-yocto-bsp    = "master:0c0bb02f5104e3856c9d90088e1ece08652cc19f"
>> meta-oe           = "master:7c292ce28756824b1fa377d516aedd979fa41f19"
>>
>> Ant the error:
>>
>> ERROR: Error executing a python function in
>> /home/qhanbec/poky/meta-chris/recipes-core/lmc/lmc.bb:
>>
>> The stack trace of python calls that resulted in this exception/failure
>> was:
>> File: 'write_specfile', lineno: 505, function: <module>
>>       0501:
>>       0502:    specfile.close()
>>       0503:
>>       0504:
>>   *** 0505:write_specfile(d)
>>       0506:
>> File: 'write_specfile', lineno: 209, function: write_specfile
>>       0205:        conffiles = (localdata.getVar('CONFFILES', True) or
>> "").split()
>>       0206:
>>       0207:        splitname    = strip_multilib(pkgname, d)
>>       0208:
>>   *** 0209:        splitsummary = (localdata.getVar('SUMMARY', True) or
>> localdata.getVar('DESCRIPTION', True) or ".")
>>       0210:        splitversion = (localdata.getVar('PKGV', True) or
>> "").replace('-', '+')
>>       0211:        splitrelease = (localdata.getVar('PKGR', True) or "")
>>       0212:        splitepoch   = (localdata.getVar('PKGE', True) or "")
>>       0213:        splitlicense = (localdata.getVar('LICENSE', True) or
>> "")
>> File: '/home/qhanbec/poky/bitbake/lib/bb/data_smart.py', lineno: 503,
>> function: getVar
>>       0499:        value = self.getVarFlag(var, "_content", False,
>> noweakdefault)
>>       0500:
>>       0501:        # Call expand() separately to make use of the expand
>> cache
>>       0502:        if expand and value:
>>   *** 0503:            return self.expand(value, var)
>>       0504:        return value
>>       0505:
>>       0506:    def renameVar(self, key, newkey, **loginfo):
>>       0507:        """
>> File: '/home/qhanbec/poky/bitbake/lib/bb/data_smart.py', lineno: 336,
>> function: expand
>>       0332:
>>       0333:        return varparse
>>       0334:
>>       0335:    def expand(self, s, varname = None):
>>   *** 0336:        return self.expandWithRefs(s, varname).value
>>       0337:
>>       0338:
>>       0339:    def finalize(self, parent = False):
>>       0340:        """Performs final steps upon the datastore,
>> including application of overrides"""
>> File: '/home/qhanbec/poky/bitbake/lib/bb/data_smart.py', lineno: 326,
>> function: expandWithRefs
>>       0322:                raise
>>       0323:            except bb.parse.SkipPackage:
>>       0324:                raise
>>       0325:            except Exception as exc:
>>   *** 0326:                raise ExpansionError(varname, s, exc)
>>       0327:
>>       0328:        varparse.value = s
>>       0329:
>>       0330:        if varname:
>> Exception: ExpansionError: Failure expanding variable SUMMARY,
>> expression was ${SUMMARY} - Debugging files which triggered exception
>> Exception: variable SUMMARY references itself!
>>
>> ERROR: Function failed: write_specfile
>> ERROR: Logfile of failure stored in:
>>
>> /home/qhanbec/poky/build/tmp/work/cortexa9-vfp-poky-linux-gnueabi/lmc/1.0-r0/temp/log.do_package_write_rpm.3408
>> ERROR: Task 12 (/home/qhanbec/poky/meta-chris/recipes-core/lmc/lmc.bb,
>> do_package_write_rpm) failed with exit code '1'
>> NOTE: Tasks Summary: Attempted 845 tasks of which 827 didn't need to
>> be rerun and 1 failed.
>> _______________________________________________
>> yocto mailing list
>> yocto at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>
> --
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



More information about the yocto mailing list