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

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

    <bug>
          <bug_id>36298</bug_id>
          
          <creation_ts>2019-03-18 15:29:00 +0300</creation_ts>
          <short_desc>please do not add rogue provides: python3(codegen) &lt; 0</short_desc>
          <delta_ts>2019-04-16 14:30:26 +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>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dmitry V. Levin">ldv</reporter>
          <assigned_to name="Ivan Zakharyaschev">imz</assigned_to>
          <cc>aris</cc>
    
    <cc>darktemplar</cc>
    
    <cc>george</cc>
    
    <cc>glebfm</cc>
    
    <cc>imz</cc>
    
    <cc>kotopesutility</cc>
    
    <cc>ldv</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>179540</commentid>
    <comment_count>0</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-03-18 15:29:00 +0300</bug_when>
    <thetext>$ rpmquery --provides -p glib2-devel-2.58.3-alt1.x86_64.rpm |grep ^python3
python3(codegen) &lt; 0
python3(codegen) = set:edFi
python3(codegen_docbook) = set:edFi
python3(codegen_main) = set:edFi
python3(config) = set:edFi
python3(dbustypes) = set:edFi
python3(parser) = set:edFi
python3(utils) = set:edFi

Просьба не обманывать систему зависимостей и не добавлять &quot;python3(codegen) &lt; 0&quot; в provides.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179543</commentid>
    <comment_count>1</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2019-03-18 16:11:23 +0300</bug_when>
    <thetext>Система зависимостей не всегда была столь совершенна, как сейчас. Уберу в следующей версии-релизе.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180831</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-04-16 04:47:45 +0300</bug_when>
    <thetext>$ rpmquery --provides -p glib2-devel-2.60.0-alt1.x86_64.rpm |grep ^python3
python3(codegen) &lt; 0
python3(codegen) = set:edFi
python3(codegen_docbook) = set:edFi
python3(codegen_main) = set:edFi
python3(config) = set:edFi
python3(dbustypes) = set:edFi
python3(parser) = set:edFi
python3(utils) = set:edFi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180837</commentid>
    <comment_count>3</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2019-04-16 10:04:47 +0300</bug_when>
    <thetext>[#227210] FAILED srpm=glib2-2.60.1-alt1.src.rpm
x86_64: NEW unmet dependencies detected:
libgio-devel#2.60.1-alt1	python3(codegen) &lt; 0
	i586: NEW unmet dependencies detected:
libgio-devel#2.60.1-alt1	python3(codegen) &lt; 0
	aarch64: NEW unmet dependencies detected:
libgio-devel#2.60.1-alt1	python3(codegen) &lt; 0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180845</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-04-16 13:53:59 +0300</bug_when>
    <thetext>(In reply to comment #3)
&gt; [#227210] FAILED srpm=glib2-2.60.1-alt1.src.rpm
&gt; x86_64: NEW unmet dependencies detected:
&gt; libgio-devel#2.60.1-alt1    python3(codegen) &lt; 0
&gt;     i586: NEW unmet dependencies detected:
&gt; libgio-devel#2.60.1-alt1    python3(codegen) &lt; 0
&gt;     aarch64: NEW unmet dependencies detected:
&gt; libgio-devel#2.60.1-alt1    python3(codegen) &lt; 0

Конечно, потому что /usr/share/glib-2.0/codegen, python3 там не ищет.
Если не перекладывать, то нужен какой-нибудь
%add_python3_path /usr/share/glib-2.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180846</commentid>
    <comment_count>5</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-04-16 13:58:42 +0300</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; [#227210] FAILED srpm=glib2-2.60.1-alt1.src.rpm
&gt; &gt; x86_64: NEW unmet dependencies detected:
&gt; &gt; libgio-devel#2.60.1-alt1    python3(codegen) &lt; 0
&gt; &gt;     i586: NEW unmet dependencies detected:
&gt; &gt; libgio-devel#2.60.1-alt1    python3(codegen) &lt; 0
&gt; &gt;     aarch64: NEW unmet dependencies detected:
&gt; &gt; libgio-devel#2.60.1-alt1    python3(codegen) &lt; 0
&gt; 
&gt; Конечно, потому что /usr/share/glib-2.0/codegen, python3 там не ищет.
&gt; Если не перекладывать, то нужен какой-нибудь
&gt; %add_python3_path /usr/share/glib-2.0

Если известно, что модули будут искаться где-то в нестандартных местах, то это можно сообщить в спеке с помощью

%allow_python3_import_path

(при сборке тех пакетов, которые умеют искать в нестандартном месте).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180847</commentid>
    <comment_count>6</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2019-04-16 14:02:16 +0300</bug_when>
    <thetext>(В ответ на комментарий №4)
&gt; (In reply to comment #3)
&gt; &gt; [#227210] FAILED srpm=glib2-2.60.1-alt1.src.rpm
&gt; &gt; x86_64: NEW unmet dependencies detected:
&gt; &gt; libgio-devel#2.60.1-alt1    python3(codegen) &lt; 0
&gt; &gt;     i586: NEW unmet dependencies detected:
&gt; &gt; libgio-devel#2.60.1-alt1    python3(codegen) &lt; 0
&gt; &gt;     aarch64: NEW unmet dependencies detected:
&gt; &gt; libgio-devel#2.60.1-alt1    python3(codegen) &lt; 0
&gt; 
&gt; Конечно, потому что /usr/share/glib-2.0/codegen, python3 там не ищет.
&gt; Если не перекладывать, то нужен какой-нибудь
&gt; %add_python3_path /usr/share/glib-2.0

Ищет, ищет, -- не находит.
Давно прописано. 
%add_python3_path %_datadir/glib-2.0/codegen</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180848</commentid>
    <comment_count>7</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2019-04-16 14:03:39 +0300</bug_when>
    <thetext>(В ответ на комментарий №5)
&gt; Если известно, что модули будут искаться где-то в нестандартных местах, то это
&gt; можно сообщить в спеке с помощью
&gt; 
&gt; %allow_python3_import_path

%add_python3_path уже недостаточно?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180849</commentid>
    <comment_count>8</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-04-16 14:11:36 +0300</bug_when>
    <thetext>Да, /usr/bin/gdbus-codegen из libgio-devel умеет искать в нестандартном месте. Было бы хорошо указать его с помощью %allow_python3_import_path

$ cat /usr/bin/gdbus-codegen
#!/usr/bin/env python3

# GDBus - GLib D-Bus Library
#
# Copyright (C) 2008-2011 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General
# Public License along with this library; if not, see &lt;http://www.gnu.org/licenses/&gt;.
#
# Author: David Zeuthen &lt;davidz@redhat.com&gt;


import os
import sys

srcdir = os.getenv(&apos;UNINSTALLED_GLIB_SRCDIR&apos;, None)
filedir = os.path.dirname(__file__)

if srcdir is not None:
    path = os.path.join(srcdir, &apos;gio&apos;, &apos;gdbus-2.0&apos;)
elif os.path.basename(filedir) == &apos;bin&apos;:
    # Make the prefix containing gdbus-codegen &apos;relocatable&apos; at runtime by
    # adding /some/prefix/bin/../share/glib-2.0 to the python path
    path = os.path.join(filedir, &apos;..&apos;, &apos;share&apos;, &apos;glib-2.0&apos;)
else:
    # Assume that the modules we need are in the current directory and add the
    # parent directory to the python path.
    path = os.path.join(filedir, &apos;..&apos;)

# Canonicalize, then do further testing
path = os.path.abspath(path)

# If the above path detection failed, use the hard-coded datadir. This can
# happen when, for instance, bindir and datadir are not in the same prefix or
# on Windows where we cannot make any guarantees about the directory structure.
#
# In these cases our installation cannot be relocatable, but at least we should
# be able to find the codegen module.
if not os.path.isfile(os.path.join(path, &apos;codegen&apos;, &apos;codegen_main.py&apos;)):
    path = os.path.join(&apos;/usr/share&apos;, &apos;glib-2.0&apos;)

sys.path.insert(0, path)
from codegen import codegen_main

sys.exit(codegen_main.codegen_main())</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180850</commentid>
    <comment_count>9</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-04-16 14:17:50 +0300</bug_when>
    <thetext>(In reply to comment #7)
&gt; (В ответ на комментарий №5)
&gt; &gt; Если известно, что модули будут искаться где-то в нестандартных местах, то это
&gt; &gt; можно сообщить в спеке с помощью
&gt; &gt; 
&gt; &gt; %allow_python3_import_path
&gt; 
&gt; %add_python3_path уже недостаточно?

Да, я когда-то разделил: %add_python3_path повлияет на Provides; на Requires повлияет %allow_python3_import_path

Теперь вот задумался, удачно ли это. Если пакет несёт в себе модули в нестандартном месте, то и использовать он, вероятно, их может. Если же не несёт модули в нестандартном месте, то %add_python3_path всё равно не сможет повредить, кажется. Наверное, можно было бы эти действия объединить в одном макросе. Даже не знаю, почему мне это рассуждение сразу в голову не пришло, могут ли быть какие-то противопоказания.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180851</commentid>
    <comment_count>10</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2019-04-16 14:22:30 +0300</bug_when>
    <thetext>(В ответ на комментарий №9)
&gt; (In
&gt; могут ли быть какие-то противопоказания.

Нет противопоказаний. Можете  придумать очередной макрос, чтобы запретить провайдить из нестандартных мест, а %add_python3_path вернуть прежнее поведение.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180852</commentid>
    <comment_count>11</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-04-16 14:24:38 +0300</bug_when>
    <thetext>Теперь мне кажется, что можно было бы в %add_python3_path добавить действие %allow_python3_import_path; %allow_python3_import_path для совместимости оставить  таким же или сделать синонимом %add_python3_path

Не уверен, что решусь это сделать, пока собирают python3 сейчас.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180853</commentid>
    <comment_count>12</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-04-16 14:26:11 +0300</bug_when>
    <thetext>(In reply to comment #10)
&gt; (В ответ на комментарий №9)
&gt; &gt; (In
&gt; &gt; могут ли быть какие-то противопоказания.
&gt; 
&gt; Нет противопоказаний. Можете  придумать очередной макрос, чтобы запретить
&gt; провайдить из нестандартных мест,

Думаю, в этом нет особой необходимости, потому что они всё равно эти Provides не сомгут удовлетворить обычные Requires.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>180854</commentid>
    <comment_count>13</comment_count>
    <who name="Yuri N. Sedunov">aris</who>
    <bug_when>2019-04-16 14:30:26 +0300</bug_when>
    <thetext>(В ответ на комментарий №11)
&gt; Теперь мне кажется, что можно было бы в %add_python3_path добавить действие
&gt; %allow_python3_import_path; %allow_python3_import_path для совместимости
&gt; оставить  таким же или сделать синонимом %add_python3_path

Чудесно, перевешиваю на rpm-build-python3. В glib2 этот %allow прописал.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>