<?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>14405</bug_id>
          
          <creation_ts>2021-05-22 01:06:24 +0000</creation_ts>
          <short_desc>Currently running task&apos;s carriage return disabled at specified situation. Is there any workaround?</short_desc>
          <delta_ts>2021-05-27 14:56:00 +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>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>kouheiaoki</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</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>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>90465</commentid>
    <comment_count>0</comment_count>
    <who name="">kouheiaoki</who>
    <bug_when>2021-05-22 01:06:24 +0000</bug_when>
    <thetext>I&apos;d like to get maximum used thread number,
so I guess bitbake showing log is useful for me,
but I have a trouble on getting bitbake log output.
Could you tell me workaround of this?

I executed the script below.
I use a docker container based Ubuntu16.04 for bitbake.
I&apos;d like to run bitbake as a general user(not root user) in the container.

sudo docker run --rm -v /work:/work -it -w /work vaddio/yocto-16.04:16.04-latest /bin/bash -c &quot;adduser --disabled-password --gecos \&quot;\&quot; general &amp;&amp; \
su general &lt;&lt;EOF
cd /work/poky
. oe-init-build-env
time bitbake core-image-minimal
EOF&quot;

And I got the output below.
This seems CR(Carriage return) is disabled.

NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 79 of 2470 (virtual:native:/work/poky/meta/recipes-support/gmp/gmp_6.1.2.bb:do_configure)
NOTE: Running task 100 of 2470 (virtual:native:/work/poky/meta/recipes-devtools/bison/bison_3.0.4.bb:do_configure)
NOTE: Running task 120 of 2470 (virtual:native:/work/poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_configure)
NOTE: Running task 228 of 2470 (virtual:native:/work/poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb:do_configure)
NOTE: Running task 249 of 2470 (virtual:native:/work/poky/meta/recipes-support/db/db_5.3.28.bb:do_configure)
NOTE: Running task 278 of 2470 (virtual:native:/work/poky/meta/recipes-devtools/file/file_5.31.bb:do_configure)
NOTE: Running task 284 of 2470 (virtual:native:/work/poky/meta/recipes-support/nspr/nspr_4.16.bb:do_compile)
NOTE: Running task 286 of 2470 (virtual:native:/work/poky/meta/recipes-support/popt/popt_1.16.bb:do_configure)
NOTE: recipe gmp-native-6.1.2-r0: task do_configure: Started
NOTE: recipe pkgconfig-native-0.29.2+gitAUTOINC+edf8e6f0ea-r0: task do_configure: Started
NOTE: recipe bison-native-3.0.4-r0: task do_configure: Started

I expect the output like below.
Currently running task number on the top and running tasks on the bottom.

Initialising tasks: 100% |###############################################################################| Time: 0:00:03
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
Currently  8 running tasks (574 of 2470)  23% |################                                                        |
0: bison-native-3.0.4-r0 do_configure - 6s (pid 129)
1: pkgconfig-native-0.29.2+gitAUTOINC+edf8e6f0ea-r0 do_configure - 6s (pid 130)
2: gettext-native-0.19.8.1-r0 do_configure - 6s (pid 131)
3: cross-localedef-native-2.26-r0 do_configure - 5s (pid 136)
4: shadow-native-4.2.1-r0 do_configure - 5s (pid 132)
5: gdbm-native-1.13-r0 do_configure - 5s (pid 142)
6: perl-5.24.1-r0 do_patch - 3s (pid 2185)
7: mpfr-native-3.1.5-r0 do_configure - 0s (pid 757

When I typed commands below manually, I got the output above.

sudo docker run --rm -v /work:/work -it -w /work vaddio/yocto-16.04:16.04-latest /bin/bash
adduser --disabled-password --gecos &quot;&quot; general
su general
cd /work/poky
. oe-init-build-env
time bitbake core-image-minimal</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90497</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-05-27 14:53:02 +0000</bug_when>
    <thetext>bitbake is trying to figure out if it&apos;s being run interactively.
You can figure out what is causing the confusion in your container.

The problem could be fixed by piping output to &apos;cat&apos; but that doesn&apos;t address your request.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90499</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2021-05-27 14:56:00 +0000</bug_when>
    <thetext>bitbake is doing what it is supposed to in this case. Because you are using a HEREDOC to pipe a script into su, it&apos;s running as a non-interactive shell, which causes bitbake to show the &quot;non-interactive&quot; output (this is not a bug, it&apos;s on purpose for e.g. when scripting). When you run the commands manually, you&apos;re running them from an interactive shell, which makes bitbake show the interactive shell output (e.g. progress bars).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>