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

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

    <bug>
          <bug_id>39207</bug_id>
          
          <creation_ts>2020-11-07 05:34:56 +0300</creation_ts>
          <short_desc>girar-show использует команду python, не имея зависимости</short_desc>
          <delta_ts>2023-07-15 16:44:31 +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>girar-utils</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>37313</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Vitaly Lipatov">lav</reporter>
          <assigned_to name="Andrey Cherepanov">cas</assigned_to>
          <cc>cas</cc>
    
    <cc>kaa</cc>
    
    <cc>rider</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>193855</commentid>
    <comment_count>0</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2020-11-07 05:34:56 +0300</bug_when>
    <thetext>$ GIT_ALT=gear.alt girar-show 261172@
/usr/bin/girar-show: строка 176: python: команда не найдена

$ rpm -q --requires girar-utils-1.5.10-alt1.noarch
/bin/sh
coreutils
curl
gear
git-core
grep
libshell
openssh-clients
sed
rpmlib(PayloadIsLzma)

$ grep python /usr/bin/girar-show
		try=&quot;$(curl -s http://git.altlinux.org/tasks/$task/info.json | python -c &apos;import json,sys;obj=json.load(sys.stdin);print &quot;%d.%d&quot; % (obj[&quot;try&quot;],obj[&quot;iter&quot;])&apos;)&quot;

Предлагаю переехать на python3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193858</commentid>
    <comment_count>1</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2020-11-07 09:24:57 +0300</bug_when>
    <thetext>вместо python json можно использовать jq</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>229575</commentid>
    <comment_count>2</comment_count>
    <who name="Aleksei Kalinin">kaa</who>
    <bug_when>2023-07-12 18:21:54 +0300</bug_when>
    <thetext>(In reply to Vitaly Lipatov from comment #0)
&gt; $ GIT_ALT=gear.alt girar-show 261172@
&gt; /usr/bin/girar-show: строка 176: python: команда не найдена
&gt; 
&gt; $ rpm -q --requires girar-utils-1.5.10-alt1.noarch
&gt; /bin/sh
&gt; coreutils
&gt; curl
&gt; gear
&gt; git-core
&gt; grep
&gt; libshell
&gt; openssh-clients
&gt; sed
&gt; rpmlib(PayloadIsLzma)
&gt; 
&gt; $ grep python /usr/bin/girar-show
&gt; 		try=&quot;$(curl -s http://git.altlinux.org/tasks/$task/info.json | python -c
&gt; &apos;import json,sys;obj=json.load(sys.stdin);print &quot;%d.%d&quot; %
&gt; (obj[&quot;try&quot;],obj[&quot;iter&quot;])&apos;)&quot;
&gt; 
&gt; Предлагаю переехать на python3.

Случайно наткнулся на задачу.
Подготовлены исправления https://git.altlinux.org/tasks/324696/
Если приемлемо прошу принять</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>229577</commentid>
    <comment_count>3</comment_count>
    <who name="Aleksei Kalinin">kaa</who>
    <bug_when>2023-07-12 18:26:54 +0300</bug_when>
    <thetext>(In reply to Anton Farygin from comment #1)
&gt; вместо python json можно использовать jq

Доброго дня!
не знаком с форматированием в jq, могу предложить такой вариант

$ curl -s http://git.altlinux.org/tasks/$task/info.json | jq -r &apos;[ .try, .iter ] | @sh&apos; | xargs printf &apos;%d.%d&apos;

Если принято решенее перейти на jq оформлю в задачу.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>229794</commentid>
    <comment_count>4</comment_count>
    <who name="Andrey Cherepanov">cas</who>
    <bug_when>2023-07-14 18:34:34 +0300</bug_when>
    <thetext>(Ответ для Anton Farygin на комментарий #1)
&gt; вместо python json можно использовать jq

А зачем? Задание одобрил и отправил.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>229795</commentid>
    <comment_count>5</comment_count>
    <who name="Andrey Cherepanov">cas</who>
    <bug_when>2023-07-14 18:35:20 +0300</bug_when>
    <thetext>(Ответ для Andrey Cherepanov на комментарий #4)
&gt; (Ответ для Anton Farygin на комментарий #1)
&gt; &gt; вместо python json можно использовать jq
&gt; 
&gt; А зачем? Задание одобрил и отправил.

А, нет. tested не запускается. Запускайте.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>229814</commentid>
    <comment_count>6</comment_count>
    <who name="Aleksei Kalinin">kaa</who>
    <bug_when>2023-07-15 02:54:56 +0300</bug_when>
    <thetext>(In reply to Andrey Cherepanov from comment #5)

&gt; А, нет. tested не запускается. Запускайте.
Andrey, Спасибо. Пакет &quot;ушел&quot; в sisyphus.


(In reply to Vitaly Lipatov from comment #0)

Vitaly, изменения применены
Зависимость python добавлена 
$ rpm -q --requires girar-utils
python3(json)
/bin/sh
/usr/bin/ssh
coreutils
curl
gear-sh-functions
git-core
grep
libshell
sed
rpmlib(PayloadIsLzma)

&gt; Предлагаю переехать на python3.
На данный момент для версии girar-utils-1.5.13-alt1
$ grep python /usr/bin/girar-show
                try=&quot;$(curl -s http://git.altlinux.org/tasks/$task/info.json | python3 -c &apos;import json,sys;obj=json.load(sys.stdin);print(&quot;%d.%d&quot; % (obj[&quot;try&quot;],obj[&quot;iter&quot;]))&apos;)&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>229841</commentid>
    <comment_count>7</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2023-07-15 16:44:31 +0300</bug_when>
    <thetext>Спасибо!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>