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

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

    <bug>
          <bug_id>47206</bug_id>
          
          <creation_ts>2023-08-11 17:01:43 +0300</creation_ts>
          <short_desc>python3-module-zeitgeist2.0 приобретает unmet при пересборке</short_desc>
          <delta_ts>2023-08-15 13:19:05 +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>rpm-build-python3</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="Ivan A. Melnikov">iv</reporter>
          <assigned_to name="Ivan Zakharyaschev">imz</assigned_to>
          <cc>aris</cc>
    
    <cc>asheplyakov</cc>
    
    <cc>darktemplar</cc>
    
    <cc>george</cc>
    
    <cc>glebfm</cc>
    
    <cc>imz</cc>
    
    <cc>kotopesutility</cc>
    
    <cc>lav</cc>
    
    <cc>ldv</cc>
    
    <cc>sin</cc>
    
    <cc>slev</cc>
    
    <cc>vitty</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>231258</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan A. Melnikov">iv</who>
    <bug_when>2023-08-11 17:01:43 +0300</bug_when>
    <thetext>При пересборке у python3-module-zeitgeist2.0 возникает зависимость на python3(datamodel), который никем не предоставляется:

https://git.altlinux.org/tasks/326944/logs/events.1.1.log

Это не даёт пересобрать zeitgeist под loongarch64.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>231259</commentid>
    <comment_count>1</comment_count>
    <who name="Ivan A. Melnikov">iv</who>
    <bug_when>2023-08-11 17:02:47 +0300</bug_when>
    <thetext>Похоже это из-за изменения поведения rpm-build-python3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>231260</commentid>
    <comment_count>2</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2023-08-11 17:07:55 +0300</bug_when>
    <thetext>(Ответ для Ivan A. Melnikov на комментарий #1)
&gt; Похоже это из-за изменения поведения rpm-build-python3.

Наверняка, так.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>231401</commentid>
    <comment_count>3</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2023-08-15 02:22:26 +0300</bug_when>
    <thetext>Это справедливо, что автоматический обработчик такую зависимость видит (запущенный без подсказок).


Если взять код из пакета, попробовать импортировать как модуль, то эта зависимость не найдётся:

[imz@altair imz]$ p=python3-module-zeitgeist2.0; hsh --without-stuff --ini ~/hasher2 &amp;&amp; hsh-install ~/hasher2/ &quot;$p&quot; tests-for-installed-python3-pkgs &amp;&amp; hsh-run ~/hasher2/ --mount=/proc,/dev/pts -- bash -c &quot;rpm -q $p; rpm -q $p --provides; echo &apos;Non-importable:&apos;; /usr/lib/rpm/check-python3-provs-importable $p&quot;
python3-module-zeitgeist2.0-1.0.4-alt1.noarch
python3(zeitgeist)
python3(zeitgeist._ontology)
python3(zeitgeist.client)
python3(zeitgeist.datamodel)
python3(zeitgeist.mimetypes)
python3-module-zeitgeist2.0 = 1.0.4-alt1:sisyphus+293446.100.1.1
Non-importable:
zeitgeist._ontology
zeitgeist.client
zeitgeist.mimetypes
[imz@altair imz]$ hsh-run ~/hasher2/ --mount=/proc,/dev/pts -- python3 -c &apos;import zeitgeist._ontology&apos;
Traceback (most recent call last):
  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/usr/lib/python3/site-packages/zeitgeist/_ontology.py&quot;, line 4, in &lt;module&gt;
    Symbol(&apos;ACCEPT_EVENT&apos;, parent={&apos;http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#EventInterpretation&apos;}, uri=&apos;http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#AcceptEvent&apos;, display_name=&apos;ACCEPT_EVENT&apos;, doc=&apos;Event triggered when the user accepts a request of some sort. Examples could be answering a phone call, accepting a file transfer, or accepting a friendship request over an IM protocol. See also DenyEvent for when the user denies a similar request&apos;, auto_resolve=False)
    ^^^^^^
NameError: name &apos;Symbol&apos; is not defined
[imz@altair imz]$ hsh-run ~/hasher2/ --mount=/proc,/dev/pts -- python3 -c &apos;import zeitgeist.client&apos;
Traceback (most recent call last):
  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/usr/lib/python3/site-packages/zeitgeist/client.py&quot;, line 1100, in &lt;module&gt;
    _FIND_EVENTS_FOR_TEMPLATES_ARGS = inspect.getargspec(
                                      ^^^^^^^^^^^^^^^^^^
AttributeError: module &apos;inspect&apos; has no attribute &apos;getargspec&apos;. Did you mean: &apos;getargs&apos;?
[imz@altair imz]$ hsh-run ~/hasher2/ --mount=/proc,/dev/pts -- python3 -c &apos;import zeitgeist.mimetypes&apos;
Traceback (most recent call last):
  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/usr/lib/python3/site-packages/zeitgeist/mimetypes.py&quot;, line 24, in &lt;module&gt;
    from datamodel import Interpretation, Manifestation
ModuleNotFoundError: No module named &apos;datamodel&apos;
[imz@altair imz]$ 


Ну там специфический код, который даже не загружается как модули, но разложен как модули в общедоступных местах. Можно было бы спрятать в другое место. (Предварительное замечание.)

Независимо от места, можно дать такие указания (с поправкой на новый путь, если оно будет туда спрятано), в таком духе (первое говорит, что есть модули по особому пути, второе разрешает удволетворять импорты по особому пути):

%add_python3_path /usr/lib/python3/site-packages/zeitgeist
%allow_python3_import_path /usr/lib/python3/site-packages/zeitgeist

или может новое указание (думаю, недавно было добавлено после отключения неточной обработки self-provides ради объезда таких всплывающих проблем):

%add_python3_self_prov_path /usr/lib/python3/site-packages/zeitgeist</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>231431</commentid>
    <comment_count>4</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2023-08-15 11:01:06 +0300</bug_when>
    <thetext>datamodel рядом лежит. Вот, если бы ваш rpm-build-python3 такие вещи ловил.

--- python/mimetypes.py.imp	2023-01-11 13:02:39.000000000 +0300
+++ python/mimetypes.py	2023-08-15 10:18:34.394845978 +0300
@@ -21,7 +21,7 @@
 
 import re
 
-from datamodel import Interpretation, Manifestation
+from zeitgeist.datamodel import Interpretation, Manifestation
 
 __all__ = [
     &quot;get_interpretation_for_mimetype&quot;,</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>231432</commentid>
    <comment_count>5</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2023-08-15 11:10:40 +0300</bug_when>
    <thetext>zeitgeist-1.0.4-alt2 -&gt; sisyphus:

 Tue Aug 15 2023 Yuri N. Sedunov &lt;aris@altlinux&gt; 1.0.4-alt2
 - updated to v1.0.4-2-g33ab4cce
 - fixed build against newer rpm-build-python3 (ALT #47206)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>231454</commentid>
    <comment_count>6</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2023-08-15 13:19:05 +0300</bug_when>
    <thetext>(Ответ для Yuri N. Sedunov на комментарий #4)
&gt; datamodel рядом лежит. Вот, если бы ваш rpm-build-python3 такие вещи ловил.

А что значит &quot;ловил&quot;? Он и поймал, в моём понимании. (Что ещё может быть нужно?)

Другой вопрос, являлся ли этот код неправильным или всё-таки так и было задумано и этот код мог бы в специфическом окружении работать...

&gt; --- python/mimetypes.py.imp	2023-01-11 13:02:39.000000000 +0300
&gt; +++ python/mimetypes.py	2023-08-15 10:18:34.394845978 +0300
&gt; @@ -21,7 +21,7 @@
&gt;  
&gt;  import re
&gt;  
&gt; -from datamodel import Interpretation, Manifestation
&gt; +from zeitgeist.datamodel import Interpretation, Manifestation
&gt;  
&gt;  __all__ = [
&gt;      &quot;get_interpretation_for_mimetype&quot;,</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>