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

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

    <bug>
          <bug_id>48503</bug_id>
          
          <creation_ts>2023-11-18 20:43:27 +0300</creation_ts>
          <short_desc>Не добавляет модель лица во время мастер настройки</short_desc>
          <delta_ts>2023-12-05 15:03:32 +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>howdy</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Evgeny Shesteperov">alimektor</reporter>
          <assigned_to name="Leontiy Volodin">lvol</assigned_to>
          <cc>lvol</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>237482</commentid>
    <comment_count>0</comment_count>
    <who name="Evgeny Shesteperov">alimektor</who>
    <bug_when>2023-11-18 20:43:27 +0300</bug_when>
    <thetext>Версия

-   howdy-3.0.0-alt10.beta1.gitc5b1766

Шаги воспроизведения

Настроить sudo для пользователя.

    # apt-get install -y howdy-gtk
    $ sudo howdy-gtk

Продолжить настройку, выбрать корректную ИК-камеру, на шаге Добавление
образца лица нажать Начать сканирование лица.

Ожидаемый результат: Запрос на создание модели.

Фактический результат: ошибка в терминале

    howdy add output:
    Невозможно выполнить команду от имени пользователя root. Пожалуйста, запустите её с флагом --user
    Traceback (most recent call last):
      File &quot;/usr/libexec/howdy-gtk/onboarding.py&quot;, line 266, in run_add
        self.show_error(_(&quot;Can&apos;t save face model&quot;), output)
      File &quot;/usr/libexec/howdy-gtk/onboarding.py&quot;, line 318, in show_error
        self.exit()
    TypeError: exit() missing 2 required positional arguments: &apos;widget&apos; and &apos;contex

Выполнил следующий Grep:

    # grep howdy /usr/libexec/howdy-gtk/onboarding.py
            self.proc = subprocess.Popen(&quot;howdy set device_path &quot; + device_path, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
            status, output = subprocess.getstatusoutput([&quot;howdy add -y&quot;])
            print(&quot;howdy add output:&quot;)
            self.proc = subprocess.Popen(&quot;howdy set certainty &quot; + str(radio_certanty), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)

Заметил разницу subprocess.Popen(&quot;howdy set device_path &quot;... VS
status, output = subprocess.getstatusoutput([&quot;howdy add -y&quot;])

Workaround для отдельного пользователя:

sed -i &apos;s|howdy add -y|howdy --user test add -y|g&apos; /usr/libexec/howdy-gtk/onboarding.py</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>237483</commentid>
    <comment_count>1</comment_count>
    <who name="Evgeny Shesteperov">alimektor</who>
    <bug_when>2023-11-18 21:24:06 +0300</bug_when>
    <thetext>Этот же код отвечает и за добавление образца при нажатии кнопки Добавить.

1. Открыть после настройки Howdy GTK → Вкладка Добавить.
2. Нажать Добавить.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>237484</commentid>
    <comment_count>2</comment_count>
    <who name="Evgeny Shesteperov">alimektor</who>
    <bug_when>2023-11-18 21:27:46 +0300</bug_when>
    <thetext>(Ответ для Evgeny Shesteperov на комментарий #1)
&gt; Этот же код отвечает и за добавление образца при нажатии кнопки Добавить.
&gt; 
&gt; 1. Открыть после настройки Howdy GTK → Вкладка Добавить.
&gt; 2. Нажать Добавить.

Нет, я ошибся.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>238388</commentid>
    <comment_count>3</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2023-12-05 15:03:32 +0300</bug_when>
    <thetext>howdy-3.0.0-alt11.beta1.gitc5b1766 -&gt; sisyphus:

 Tue Dec 05 2023 Anton Golubev &lt;golubevan@altlinux&gt; 3.0.0-alt11.beta1.gitc5b1766
 - howdy-gtk: Add default args to exit functions (ALT #48543)
 - Don&apos;t pkexec if already root
 - Handle the case if there are no cameras via except (ALT #48544)
 - Show real camera ID in the &apos;Video&apos; tab (ALT #48542)
 - Don&apos;t add a model if the user list is empty (ALT #48529)
 - More correct preview when stretching the window (ALT #48527)
 - Remove reading of non-existent &apos;_variables&apos; file (ALT #48500)
 - Update the container when the slide changes (ALT #48502)
 - Also use PKEXEC_UID to get username (ALT #48503)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>