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

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

    <bug>
          <bug_id>40990</bug_id>
          
          <creation_ts>2021-09-23 01:05:57 +0300</creation_ts>
          <short_desc>gear: сборка из git worktree</short_desc>
          <delta_ts>2022-01-14 19:22:51 +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>gear</component>
          <version>unstable</version>
          <rep_platform>all</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="Alexey Sheplyakov">asheplyakov</reporter>
          <assigned_to name="Dmitry V. Levin">ldv</assigned_to>
          <cc>glebfm</cc>
    
    <cc>iv</cc>
    
    <cc>ldv</cc>
    
    <cc>legion</cc>
    
    <cc>vseleznv</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>203114</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-09-23 01:05:57 +0300</bug_when>
    <thetext>При попытке запустить сборку из git worktree:

$ gear-hsh -v

выводится сообщение о якобы отсутствующем tag:

$ gear-hsh -v
mkdir: created directory &apos;/tmp/.private/asheplyakov/gear.2QhBFuXH/out&apos;
gear: .gear/rules line 1: Name &quot;xorg-server-20210922&quot; not found in tag list
gear: .gear/rules line 1: Failed to make archive

Хотя на самом деле он есть:

$ cat .gear/tags/list
735dbde48294f9d0a8c3d791c44df14da9b91fc0 xorg-server-20210922

$ git show 735dbde48294f9d0a8c3d791c44df14da9b91fc0 | sed -re &apos;/^diff --git/,$ { d }&apos;

commit 735dbde48294f9d0a8c3d791c44df14da9b91fc0
Author: Michel Dänzer &lt;mdaenzer@redhat.com&gt;
Date:   Fri Sep 17 11:55:52 2021 +0200

    xwayland/present: Move xwl_present_reset_timer call out of xwl_present_flip

    xwl_present_reset_timer checks if the pending flip is synchronous, so
    we need to call it after adding the pending flip to the flip queue.

    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1219
    Fixes: b2a06e0700fa &quot;xwayland/present: Drop sync_flip member of struct xwl_present_window&quot;
    Tested-by: Olivier Fourdan &lt;ofourdan@redhat.com&gt;
    Acked-by: Olivier Fourdan &lt;ofourdan@redhat.com&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203115</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2021-09-23 01:13:10 +0300</bug_when>
    <thetext>Пожалуйста, запушьте куда-нибудь этот репозиторий, и дайте на него ссылку.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203116</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-09-23 02:37:58 +0300</bug_when>
    <thetext>#285718 EPERM #2 sisyphus gear.git=2.5.1-alt1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203117</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2021-09-23 02:41:04 +0300</bug_when>
    <thetext>Попробуйте лучше http://git.altlinux.org/people/vseleznv/packages/?p=gear.git;a=commitdiff;h=worktree</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203118</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-09-23 02:54:09 +0300</bug_when>
    <thetext>(In reply to Dmitry V. Levin from comment #1)
&gt; Пожалуйста, запушьте куда-нибудь этот репозиторий, и дайте на него ссылку.

git clone -b p9 git://git.altlinux.org/gears/x/xorg-server.git
cd xorg-server
git worktree add --track -b sisyphus ../xorg-server-sisyphus origin/sisyphus
cd ../xorg-server-sisyphus
gear-hsh -v</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203120</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-09-23 03:05:49 +0300</bug_when>
    <thetext>(In reply to Dmitry V. Levin from comment #3)
&gt; Попробуйте лучше
&gt; http://git.altlinux.org/people/vseleznv/packages/?p=gear.git;a=commitdiff;
&gt; h=worktree

Сомневаюсь, что лучше.

Сходу видно, что при таком способе используется index от основной working copy:

http://git.altlinux.org/people/vseleznv/packages/?p=gear.git;a=blob;f=gear;h=05f1f1a0c6fbffe6d069532877b54a520447163c;hb=worktree#l847

echo $(git rev-parse --git-common-dir)/index
/home/asheplyakov/tmp/xorg-server/.git/index

А следовало бы использовать index текущего worktree:

echo $(git rev-parse --git-dir)/index
/home/asheplyakov/tmp/xorg-server/.git/worktrees/xorg-server-sisyphus/index</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203121</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-09-23 03:21:10 +0300</bug_when>
    <thetext>(In reply to Alexey Sheplyakov from comment #5)
&gt; (In reply to Dmitry V. Levin from comment #3)
&gt; &gt; Попробуйте лучше
&gt; &gt; http://git.altlinux.org/people/vseleznv/packages/?p=gear.git;a=commitdiff;
&gt; &gt; h=worktree
&gt; 
&gt; Сомневаюсь, что лучше.
&gt; 
&gt; Сходу видно, что при таком способе используется index от основной working
&gt; copy:

То есть мне-то без разницы, я не использую --commit, но вот тем, кто использует -- будет сюрприз.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203122</commentid>
    <comment_count>7</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2021-09-23 03:41:37 +0300</bug_when>
    <thetext>У меня не было возможности тольком посмотреть, но, может быть, тогда лучше использовать git rev-parse --git-path objects в create_temporary_git_object_directory()?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203232</commentid>
    <comment_count>8</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-09-24 19:40:40 +0300</bug_when>
    <thetext>(In reply to Dmitry V. Levin from comment #7)
&gt; У меня не было возможности тольком посмотреть, но, может быть, тогда лучше
&gt; использовать git rev-parse --git-path objects в
&gt; create_temporary_git_object_directory()?

Переделал, но не особо проще. В worktree выдаёт абсолютный путь:

$ pwd
/home/asheplyakov/work/xorg-sisyphus
$ git rev-parse --git-path objects
/home/asheplyakov/work/xorg-server/.git/objects

А в обычном репозитории (или основном worktree) - относительный:

$ pwd
/home/asheplyakov/work/xorg-server
$ git rev-parse  --git-path objects

.git/objects

Так что не особо проще</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>203469</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-10-04 14:50:02 +0300</bug_when>
    <thetext>Уважаемый сопровождающий пакета gear! Сделайте, будьте добры, что-нибудь с этим багом.

Если Вам не нравится исправление из задания 285718 - пожалуйста, объясните, что там не так, или предложите своё.

#285718 EPERM #6 sisyphus gear.git=2.5.1-alt1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206725</commentid>
    <comment_count>10</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2022-01-14 13:27:09 +0300</bug_when>
    <thetext>Прошу прощения за задержку.

На мой взгляд, git rev-parse --git-path objects всё-таки проще:
https://git.altlinux.org/people/ldv/packages/?p=gear.git;a=commit;h=2.5.0-alt1-5-gcbe4d61</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206758</commentid>
    <comment_count>11</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2022-01-14 19:22:51 +0300</bug_when>
    <thetext>gear-2.5.1-alt1 -&gt; sisyphus:

 Fri Jan 14 2022 Dmitry V. Levin &lt;ldv@altlinux&gt; 2.5.1-alt1
 - gear-rules.5: added references to git glob syntax (closes: #39804).
 - gear-store-tags: fixed the warning about specsubst directive (closes: #39898).
 - gear-edit-spec: do not invoke an editor when no spec file was found (closes: #40023).
 - gear: added git worktree support (closes: #40990).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>