<?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>16059</bug_id>
          
          <creation_ts>2025-11-11 16:29:34 +0000</creation_ts>
          <short_desc>bitbake-setup &quot;--non-interactive&quot; ignores &quot;top-dir-prefix&quot;</short_desc>
          <delta_ts>2025-11-14 05:09:47 +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>BitBake</product>
          <component>bitbake</component>
          <version>5.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Reyna">david.reyna</reporter>
          <assigned_to name="David Reyna">david.reyna</assigned_to>
          <cc>JPEWhacker</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103243</commentid>
    <comment_count>0</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2025-11-11 16:29:34 +0000</bug_when>
    <thetext>I want to use &quot;--non-interactive&quot; but absolutely not have it install &quot;bitbake-builds&quot; into my home directory.

I thought that the obvious solution was to use bitbake-setup to set &quot;top-dir-prefix&quot; to my desired directory, but &quot;--non-interactive&quot; ignored that setting.

REPRODUCER:
  $ git clone https://git.openembedded.org/bitbake/
  $ ./bitbake/bin/bitbake-setup settings set default top-dir-prefix $PWD
  $ ./bitbake/bin/bitbake-setup init --non-interactive ...

BUT THE SETUP STILL INSTALLED INTO MY HOME DIR.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103280</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2025-11-13 15:34:30 +0000</bug_when>
    <thetext>David,

I ran into the same problem. The issue is that top-dir-prefix only makes sense to be set globally, so your &quot;bitbake-setup settings set default top-dir-prefix $PWD&quot; doesn&apos;t do anything.

This was fixed just recently in 0c92c9ca4 (&quot;bitbake-setup: Only set top-dir-prefix and top-dir-name in global settings&quot;), please make sure you have that commit, then run your &quot;bitbake-setup settings&quot; command again and let us know if you still have a problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103283</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-11-13 15:40:13 +0000</bug_when>
    <thetext>Fixed, right David ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103293</commentid>
    <comment_count>3</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2025-11-14 05:08:10 +0000</bug_when>
    <thetext>I have these observations.

1) The new behavior is that &quot;top-dir-prefix&quot; for bitbake-setup will show the CWD.

  $ ./bitbake/bin/bitbake-setup settings list
  default top-dir-prefix /opt/dreyna/yp_5_3_no_interactive
  ...
  $ cd bitbake
  $ ./bin/bitbake-setup settings list
  default top-dir-prefix /opt/dreyna/yp_5_3_no_interactive/bitbake
  ...

This matches my expectation for &quot;least surprise&quot;.

2) If I explicitly set a new default value, that value sticks

  $ ./bitbake/bin/bitbake-setup settings set default top-dir-prefix $PWD/my_install
  $ ./bitbake/bin/bitbake-setup settings list
  default top-dir-prefix /opt/dreyna/yp_5_3_no_interactive/my_install
  ...
  $ cd bitbake
  $ ./bin/bitbake-setup settings list
  default top-dir-prefix /opt/dreyna/yp_5_3_no_interactive/my_install
  ...

This matches my expectation for &quot;least surprise&quot;.

3) If I now run &quot;bitbake-setup init --non-interactive&quot;, it installs where it is supposed to

  $ ./bitbake/bin/bitbake-setup init --non-interactive poky-master poky distro/poky machine/qemux86-64
  $ ls /opt/dreyna/yp_5_3_no_interactive/my_install/bitbake-builds/poky-master-poky-distro_poky-machine_qemux86-64/
  build  config  layers
  $

This passes my tests. I recommend that this case be moved to &quot;Resolved&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103294</commentid>
    <comment_count>4</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2025-11-14 05:09:47 +0000</bug_when>
    <thetext>It passed my tests. I am happy :-)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>