<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>36527</bug_id>
          
          <creation_ts>2019-04-05 21:36:34 +0300</creation_ts>
          <short_desc>does not recognize &quot;time&quot; and TIMEFORMAT</short_desc>
          <delta_ts>2019-05-29 14:55:46 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>sh</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>alexey.tourbin</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>glebfm</cc>
    
    <cc>lav</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>rider</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>180451</commentid>
    <comment_count>0</comment_count>
    <who name="">alexey.tourbin</who>
    <bug_when>2019-04-05 21:36:34 +0300</bug_when>
    <thetext>Мужчины, после обновления bash у меня сломался скрипт, точнее появились в нем дефекты, который скачивает и перекодирует видео с иностранных сайтов.  В скрипте в частности написано:

TIMEFORMAT=&quot;${I//\%/%%}: time ffmpeg: %0lR elapsed %P%% cpu&quot;; time \
&quot;${ffmpeg[@]}&quot; -i $tmp-a.mp4 -r 25 -i &quot;$4&quot; -map 1:v -map 0:a -c:a copy \

Почему-то в вашем самосборном шелле time не распознается как особая конструкция, вместо нее всегда запускается /usr/bin/time.

$ strace -f -e trace=execve sh -c &apos;time echo X&apos; |grep execve
execve(&quot;/usr/bin/time&quot;, [&quot;time&quot;, &quot;echo&quot;, &quot;X&quot;], 0x13fea30 /* 63 vars */) = 0

Между тем time жестко зашито в определение шелл-синтаксиса.  Даже интересно, как это у вас такой битый шелл собрался.

$ info bash |grep &apos;time .*-p&apos;
     [time [-p]] [!] COMMAND1 [ | or |&amp; COMMAND2 ] ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180463</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-04-06 02:07:11 +0300</bug_when>
    <thetext>(In reply to comment #0)
&gt; Почему-то в вашем самосборном шелле time не распознается как особая
&gt; конструкция, вместо нее всегда запускается /usr/bin/time.

У нас традиционно bash собран c --disable-command-timing, примерно с 1999 года:
* Tue Jul 8 1999 Thierry Vignaud &lt;tvignaud@mandrakesoft.com&gt;
...
- disable built-in time command (incompatible with standard POSIX time command)

&gt; $ strace -f -e trace=execve sh -c &apos;time echo X&apos; |grep execve

Зачем этот grep?  strace выводит trace в stderr.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181759</commentid>
    <comment_count>2</comment_count>
    <who name="">alexey.tourbin</who>
    <bug_when>2019-05-22 17:40:44 +0300</bug_when>
    <thetext>Опция противоречит документированному поведению в &apos;info bash&apos;.  В других дистрибутивах bash собран без этой опции.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181760</commentid>
    <comment_count>3</comment_count>
    <who name="Vitaly Chikunov">vt</who>
    <bug_when>2019-05-22 17:53:59 +0300</bug_when>
    <thetext>Я за возвращение time built-in&apos;а в bash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181761</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-05-22 17:56:37 +0300</bug_when>
    <thetext>(In reply to comment #3)
&gt; Я за возвращение time built-in&apos;а в bash.

Только с поддержкой -f и -o из GNU time, иначе я против.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181762</commentid>
    <comment_count>5</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2019-05-22 18:01:26 +0300</bug_when>
    <thetext>А разве ты не можешь энфорсить запуск gnu time по пути ?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>