<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15469</bug_id>
          
          <creation_ts>2024-04-11 11:35:55 +0000</creation_ts>
          <short_desc>oe-init-build-env uses unbound shell variables</short_desc>
          <delta_ts>2026-10-27 11:01:10 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>5.1</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>newcomer</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>98732</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-04-11 11:35:55 +0000</bug_when>
    <thetext>oe-init-build-env uses potentially unbound variables (that is, it expands variables without knowing that they&apos;re set).

This is quite conventional for shell scripts, but people writing scripts carefully may use &apos;set -u&apos; so that variables need to be assigned before use, and if those scripts call oe-init-build-env then bash will exit with errors.

$ set -u
$ . oe-init-build-env
-bash: BBSERVER: unbound variable
-bash: ZSH_NAME: unbound variable
-bash: OEROOT: unbound variable
-bash: OEROOT: unbound variable
-bash: OEROOT: unbound variable
-bash: BUILDDIR: unbound variable
$ echo $?
1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>