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

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

    <bug>
          <bug_id>40613</bug_id>
          
          <creation_ts>2021-07-30 10:48:06 +0300</creation_ts>
          <short_desc>hsh-run --no-wait-lock option unclear</short_desc>
          <delta_ts>2021-08-03 07:00:37 +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>hasher</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>P5</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="ildar">ildar</reporter>
          <assigned_to name="Dmitry V. Levin">ldv</assigned_to>
          <cc>at</cc>
    
    <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>neurofreak-alt</cc>
    
    <cc>placeholder</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>201062</commentid>
    <comment_count>0</comment_count>
    <who name="ildar">ildar</who>
    <bug_when>2021-07-30 10:48:06 +0300</bug_when>
    <thetext>документация говорит:
&gt; --no-wait-lock
&gt;   do not wait for workdir and hasher-priv locks ($lock_nowait);

я сначала думал, что hsh-run будет просто игнорировать лок. Но оказалось, что он выбрасывает ошибку и не работает.

Надо бы исправить документацию, если я тут правильно всё понял.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201104</commentid>
    <comment_count>1</comment_count>
    <who name="neurofreak-alt@yandex.ru">neurofreak-alt</who>
    <bug_when>2021-07-31 04:42:39 +0300</bug_when>
    <thetext>А текст ошибки будет?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201136</commentid>
    <comment_count>2</comment_count>
    <who name="ildar">ildar</who>
    <bug_when>2021-08-02 10:23:39 +0300</bug_when>
    <thetext>да, извините,
&gt; $ hsh-run --no-wait-lock uname
&gt; hsh-run: working directory /tmp/.private/ildar/hasher&apos; is already locked by pid=4157078.
&gt; 4157078 pts/4 S+ 0:00 /bin/sh -ef /usr/bin/hsh-run --mountpoints=/proc,/d
&gt; hsh-run: Unable to lock working directory /tmp/.private/ildar/hasher&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201145</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2021-08-02 12:31:31 +0300</bug_when>
    <thetext>Изначально hasher работал в режиме --no-wait-lock, сами параметры --wait-lock и --no-wait-lock появились только в версии 1.2.8, а начиная с версии 1.3.0 поведение по-умолчанию поменялось с --no-wait-lock на --wait-lock.

У некоторых утилит hasher есть параметр --no-lock, он используется другими утилитами hasher, которые заботятся о блокировках первыми.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201151</commentid>
    <comment_count>4</comment_count>
    <who name="ildar">ildar</who>
    <bug_when>2021-08-02 14:46:49 +0300</bug_when>
    <thetext>окей, но это не проливает свет на то, как оно работает. А фактически опция не выключает блокировку, а только меняет поведение этой блокировки: ожидание или ошибка.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201153</commentid>
    <comment_count>5</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2021-08-02 15:25:37 +0300</bug_when>
    <thetext>Мне кажется логичным, что --wait-lock включает ожидание блокировки, а --no-wait-lock, наоборот, выключает ожидание блокировки.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>201162</commentid>
    <comment_count>6</comment_count>
    <who name="ildar">ildar</who>
    <bug_when>2021-08-03 07:00:37 +0300</bug_when>
    <thetext>(Ответ для Dmitry V. Levin на комментарий #5)
&gt; Мне кажется логичным, что --wait-lock включает ожидание блокировки, а
&gt; --no-wait-lock, наоборот, выключает ожидание блокировки.

мне тоже это кажется логичным.
Но мне не очевидно, что, выключив ожидание блокировки, hsh-run валится с ошибкой, а не выполняет данную ему команду.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>