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

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

    <bug>
          <bug_id>36180</bug_id>
          
          <creation_ts>2019-02-24 23:08:45 +0300</creation_ts>
          <short_desc>for old rpm+apt, arepo pkgs have unmet deps</short_desc>
          <delta_ts>2019-02-28 01:57:03 +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</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>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>35930</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>arseny</cc>
    
    <cc>glebfm</cc>
    
    <cc>imz</cc>
    
    <cc>iv</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>vitty</cc>
    
    <cc>vseleznv</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>178898</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-24 23:08:45 +0300</bug_when>
    <thetext>For old rpm+apt, arepo pkgs have unmet deps.

I believe the solution should be to put disttag into the Requires of the arepoized packages. That&apos;s sensible, and would help the old rpm+apt to upgrade the system.


Demonstration:

[user@prodesk0 ~]$ rpm -q rpm --lastchange
* Пт окт 05 2018 Gleb F-Malinovskiy &lt;glebfm@altlinux.org&gt; 4.13.0.1-alt4
- Add _allow_deps_with_beginning_dot macro to allow dependencies
  beginning with a dot character in spec file (vseleznv@).
[user@prodesk0 ~]$ hsh --apt-conf=/home/user/.hasher/sisyphus/apt.conf --without-stuff ~/hasher/ --ini
...
[user@prodesk0 ~]$ ~/hasher/aptbox/apt-cache unmet
Package i586-libbabel-devel.32bit version 2.0.0-alt2.qa1 has an unmet dep:
 Depends: i586-libbabel (= 2.0.0-alt2.qa1)
 Depends: i586-python-module-sidl (= 2.0.0-alt2.qa1)
Package i586-fcitx-qw.32bit version 4.2.9.6-alt1_4 has an unmet dep:
 Depends: i586-fcitx-libs (= 4.2.9.6-alt1_4)
Package i586-php7-pdo_mysql.32bit version 7.2.15-alt1 has an unmet dep:
 Depends: i586-php7-pdo (= 7.2.15-alt1)
Package kernel-modules-ipt-ratelimit-un-def#0.3-alt2.k.267032.1 version 0.3-alt2.k.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package kernel-modules-wireguard-std-def#0.0.20181218-alt1.265830.1 version 0.0.20181218-alt1.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 4.14.102-alt1)
Package i586-samba-test.32bit version 4.9.4-alt3 has an unmet dep:
 Depends: i586-libsmbclient (= 4.9.4-alt3)
Package kernel-modules-virtualbox-std-def#5.2.26-alt1.265830.1 version 5.2.26-alt1.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package i586-fcitx-qt4.32bit version 4.2.9.6-alt1_4 has an unmet dep:
 Depends: i586-fcitx-libs (= 4.2.9.6-alt1_4)
Package i586-fcitx-gtk2.32bit version 4.2.9.6-alt1_4 has an unmet dep:
 Depends: i586-fcitx-libs (= 4.2.9.6-alt1_4)
Package kernel-modules-kvdo-un-def#6.2.0.293-alt1.267032.1 version 6.2.0.293-alt1.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package kernel-modules-bcmwl-std-def#6.30.223.248-alt15.k.265830.1 version 6.30.223.248-alt15.k.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package kernel-modules-nvidia-std-def#410.93-alt1.265830.1 version 410.93-alt1.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
 Depends: kernel-modules-drm-std-def (= 1:4.14.102-alt1)
Package kernel-modules-asix-std-def#4.20.0-alt1.k.265830.1 version 4.20.0-alt1.k.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package kernel-modules-bbswitch-std-def#0.8-alt1.k.265830.1 version 0.8-alt1.k.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package kernel-modules-xtables-addons-un-def#2.14-alt1.k.267032.1 version 2.14-alt1.k.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 4.19.24-alt1)
Package kernel-modules-ipt-ratelimit-std-def#0.3-alt2.k.265830.1 version 0.3-alt2.k.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package kernel-modules-ipset-un-def#7.1-alt1.267032.1 version 7.1-alt1.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 4.19.24-alt1)
Package i586-libgnustep-BDB-devel.32bit version 0.2.1-alt5 has an unmet dep:
 Depends: i586-libgnustep-BDB (= 0.2.1-alt5)
Package i586-libgnustep-gorm-devel.32bit version 1.2.20-alt4.svn20140119 has an unmet dep:
 Depends: i586-libgnustep-gorm (= 1.2.20-alt4.svn20140119)
Package kernel-modules-acpi_call-un-def#0.1-alt5.k.267032.1 version 0.1-alt5.k.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package kernel-modules-rtl8723de-std-def#5.1.1.8-alt10.265830.1 version 5.1.1.8-alt10.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package kernel-modules-ipt-so-std-def#1.0-alt2.265830.1 version 1.0-alt2.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package kernel-modules-wireguard-un-def#0.0.20181218-alt1.267032.1 version 0.0.20181218-alt1.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 4.19.24-alt1)
Package kernel-modules-zfs-std-def#0.7.12-alt1.265830.1 version 0.7.12-alt1.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package i586-fcitx-gtk3.32bit version 4.2.9.6-alt1_4 has an unmet dep:
 Depends: i586-fcitx-libs (= 4.2.9.6-alt1_4)
Package kernel-modules-bbswitch-un-def#0.8-alt1.k.267032.1 version 0.8-alt1.k.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package kernel-modules-acpi_call-std-def#0.1-alt5.k.265830.1 version 0.1-alt5.k.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package i586-php7-pdo_sqlite.32bit version 7.2.15-alt1 has an unmet dep:
 Depends: i586-php7-pdo (= 7.2.15-alt1)
Package kernel-modules-rtl8723de-un-def#5.1.1.8-alt11.267032.1 version 5.1.1.8-alt11.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package i586-fcitx-pinyin.32bit version 4.2.9.6-alt1_4 has an unmet dep:
 Depends: i586-fcitx-libs (= 4.2.9.6-alt1_4)
Package kernel-modules-xtables-addons-std-def#2.14-alt1.k.265830.1 version 2.14-alt1.k.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 4.14.102-alt1)
Package kernel-modules-zfs-un-def#0.7.12-alt1.267032.1 version 0.7.12-alt1.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package kernel-modules-r8168-un-def#8.045.08-alt2.k.267032.1 version 8.045.08-alt2.k.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package kernel-modules-accel-ppp-un-def#1.11.2-alt2.k.267032.1 version 1.11.2-alt2.k.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package kernel-modules-LiME-un-def#1.7.8-alt1.k.267032.1 version 1.7.8-alt1.k.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package i586-php7-pdo_odbc.32bit version 7.2.15-alt1 has an unmet dep:
 Depends: i586-php7-pdo (= 7.2.15-alt1)
Package kernel-modules-kvdo-std-def#6.2.0.293-alt1.265830.1 version 6.2.0.293-alt1.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package kernel-modules-virtualbox-addition-std-def#5.2.26-alt1.265830.1 version 5.2.26-alt1.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package kernel-modules-LiME-std-def#1.7.8-alt1.k.265830.1 version 1.7.8-alt1.k.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package kernel-modules-accel-ppp-std-def#1.11.2-alt2.k.265830.1 version 1.11.2-alt2.k.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package kernel-modules-virtualbox-addition-un-def#5.2.26-alt1.267032.1 version 5.2.26-alt1.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package i586-libmpip-devel.32bit version 3.3-alt7.svn20140313 has an unmet dep:
 Depends: i586-libmpip (= 3.3-alt7.svn20140313)
Package kernel-modules-dm-secdel-std-def#1.0.3-alt1.265830.1 version 1.0.3-alt1.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package i586-python3-test.32bit version 3.6.8-alt1 has an unmet dep:
 Depends: i586-python3-modules-tkinter (= 3.6.8-alt1)
 Depends: i586-python3-modules-curses (= 3.6.8-alt1)
Package i586-libdw-devel-static.32bit version 0.176-alt1 has an unmet dep:
 Depends: i586-libdw-devel (= 0.176-alt1)
Package kernel-modules-vhba-un-def#20170610-alt1.k.267032.1 version 20170610-alt1.k.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package kernel-modules-e1000e-un-def#3.4.2.1-alt2.267032.1 version 3.4.2.1-alt2.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package kernel-modules-ipt_netflow-std-def#2.3-alt1.k.265830.1 version 2.3-alt1.k.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package kernel-modules-vhba-std-def#20170610-alt1.k.265830.1 version 20170610-alt1.k.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package i586-tracker-devel.32bit version 2.1.8-alt1 has an unmet dep:
 Depends: i586-libtracker (= 2.1.8-alt1)
Package kernel-modules-virtualbox-un-def#5.2.26-alt1.267032.1 version 5.2.26-alt1.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package kernel-modules-nvidia-un-def#410.93-alt1.267032.1 version 410.93-alt1.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
 Depends: kernel-modules-drm-un-def (= 1:4.19.24-alt1)
Package i586-gnustep-gui-devel.32bit version 0.24.0-alt8.svn20140223 has an unmet dep:
 Depends: i586-libgnustep-gui (= 0.24.0-alt8.svn20140223)
Package kernel-modules-ipt_netflow-un-def#2.3-alt1.k.267032.1 version 2.3-alt1.k.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package kernel-modules-ch34x-std-def#20180821-alt1.265830.1 version 20180821-alt1.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package i586-gnustep-base-devel.32bit version 1:1.24.6-alt8.svn20140226 has an unmet dep:
 Depends: i586-libgnustep-base (= 1:1.24.6-alt8.svn20140226)
Package kernel-modules-r8168-std-def#8.045.08-alt1.k.265830.1 version 8.045.08-alt1.k.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package kernel-modules-bcmwl-un-def#6.30.223.248-alt15.k.267032.1 version 6.30.223.248-alt15.k.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package i586-php7-ldap.32bit version 7.2.15-alt1 has an unmet dep:
 Depends: i586-php7-libs (= 7.2.15-alt1)
Package kernel-modules-e1000e-std-def#3.4.2.1-alt2.265830.1 version 3.4.2.1-alt2.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package i586-libyaafe-devel.32bit version 0.64-alt3.git20130420 has an unmet dep:
 Depends: i586-libyaafe (= 0.64-alt3.git20130420)
Package kernel-modules-ch34x-un-def#20180821-alt1.267032.1 version 20180821-alt1.267032.1 has an unmet dep:
 PreDepends: kernel-image-un-def (= 1:4.19.24-alt1)
Package i586-php7-xmlreader.32bit version 7.2.15-alt1 has an unmet dep:
 Depends: i586-php7-dom (= 7.2.15-alt1)
Package kernel-modules-ipset-std-def#7.1-alt1.265830.1 version 7.1-alt1.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 4.14.102-alt1)
Package kernel-modules-tripso-std-def#1.0-alt1.k.265830.1 version 1.0-alt1.k.265830.1 has an unmet dep:
 PreDepends: kernel-image-std-def (= 1:4.14.102-alt1)
Package i586-samba-winbind.32bit version 4.9.4-alt3 has an unmet dep:
 Depends: i586-samba-libs (= 4.9.4-alt3)
[user@prodesk0 ~]$ cat ~/hasher/aptbox/etc/apt/sources.list
#rpm-dir file:/tmp/.private/user/hasher/repo x86_64 hasher
rpm [alt] file:/ALT Sisyphus/x86_64 classic
rpm [alt] file:/ALT Sisyphus/noarch classic
rpm [alt] file:/ALT Sisyphus/x86_64-i586 classic
[user@prodesk0 ~]$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178899</commentid>
    <comment_count>1</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-24 23:15:28 +0300</bug_when>
    <thetext>Hmm, rpmrebuild-arepo-3.1.8-alt1 already has this feature:

commit 77311559b830079448161b71c77640889c06bdb4
Author: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
Date:   Sat Jan 12 15:37:15 2019 +0000

    arepo.sh (filter_requires): Generate strict requirements in [E:]V-R[:D] format
    
    This complements the change made in rpm-build-4.0.4-alt122.

diff --git a/arepo.sh b/arepo.sh
index e6a7bf4..e26283e 100755
--- a/arepo.sh
+++ b/arepo.sh
@@ -205,9 +205,8 @@ filter_requires()
 {
 	if [ &quot;$AREPO_MODE&quot; = &quot;lib&quot; ]; then
 		if [ -f &quot;$AREPO_NATIVE&quot; ]; then
-			# add Requires: strict or %name=EVR for the native package
-			echo &quot;Requires: $(rpmquery --provides -p &quot;$AREPO_NATIVE&quot; |grep &quot;^[.]&quot; ||
-			rpmquery --qf &quot;%{NAME} = %|EPOCH?{%{EPOCH}:}|%{VERSION}-%{RELEASE}&quot; -p &quot;$AREPO_NATIVE&quot;)&quot;
+			# add strict Requires: for the native package
+			rpmquery --qf &apos;Requires: %{NAME} = %|EPOCH?{%{EPOCH}:}|%{VERSION}-%{RELEASE}%|DISTTAG?{:%{DISTTAG}}|\n&apos; -p &quot;$AREPO_NATIVE&quot;
 		fi
 	fi
 

Perhaps, it&apos;s a strange interaction in the internals of apt and rpm interaction.

I&apos;ll have a closer look at these cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178900</commentid>
    <comment_count>2</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-24 23:20:35 +0300</bug_when>
    <thetext>These are the dependencies not on the same original package, but on the other subpkgs from the same build which are also arepoized (but in a separate invocation of rpmrebuild):

Package i586-libbabel-devel.32bit version 2.0.0-alt2.qa1 has an unmet dep:
 Depends: i586-libbabel (= 2.0.0-alt2.qa1)
 Depends: i586-python-module-sidl (= 2.0.0-alt2.qa1)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178901</commentid>
    <comment_count>3</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-25 00:27:23 +0300</bug_when>
    <thetext>(In reply to comment #2)
&gt; These are the dependencies not on the same original package, but on the other
&gt; subpkgs from the same build which are also arepoized (but in a separate
&gt; invocation of rpmrebuild):
&gt; 
&gt; Package i586-libbabel-devel.32bit version 2.0.0-alt2.qa1 has an unmet dep:
&gt;  Depends: i586-libbabel (= 2.0.0-alt2.qa1)
&gt;  Depends: i586-python-module-sidl (= 2.0.0-alt2.qa1)

This is explained by the fact that rpm-build-4.0.4-alt127 didn&apos;t add them as strict deps when building the main packages. (The reason of this is not yet known to me.) The logs and the results of 3 previous builds with different rpm-build:


$ fgrep libbabel-devel /tasks/archive/done/_$(( 160296 / 1024 ))/160296/build/100/i586/log /tasks/archive/done/_$(( 217155 / 1024 ))/217155/build/100/i586/log /tasks/archive/done/_$(( 222711 / 1024 ))/222711/build/100/i586/log
/tasks/archive/done/_156/160296/build/100/i586/log:Requires: babel-common = 2.0.0-alt2, libbabel = 2.0.0-alt2, libbabel-devel = 2.0.0-alt2, babel-j = 2.0.0-alt2, python-module-sidl = 2.0.0-alt2, python-module-sidlx = 2.0.0-alt2, /bin/sh, /usr/bin/emacs, /usr/bin/file, coreutils, gawk, sed
/tasks/archive/done/_156/160296/build/100/i586/log:Processing files: libbabel-devel-2.0.0-alt2
/tasks/archive/done/_156/160296/build/100/i586/log:Removing 8 extra deps from libbabel-devel due to dependency on libbabel
/tasks/archive/done/_156/160296/build/100/i586/log:Removing 4 extra deps from babel due to repentancy on libbabel-devel
/tasks/archive/done/_156/160296/build/100/i586/log:Removing 1 extra deps from libbabel-devel due to repentancy on python-module-sidl
/tasks/archive/done/_156/160296/build/100/i586/log:Wrote: /usr/src/RPM/RPMS/i586/libbabel-devel-2.0.0-alt2.i586.rpm

$ rpm -qp /ALT/repo/sisyphus/date/2018/10/01/i586/RPMS.classic/libbabel-devel-2.0.0-alt2.i586.rpm --requires
babel = 2.0.0-alt2
babel-common = 2.0.0-alt2
babel-j = 2.0.0-alt2
python-module-sidl = 2.0.0-alt2
/usr/lib/pkgconfig
python-dev
rpmlib(PayloadIsLzma)
$ 

/tasks/archive/done/_212/217155/build/100/i586/log:Requires: babel-common = 2.0.0-alt2.qa1, libbabel = 2.0.0-alt2.qa1, libbabel-devel = 2.0.0-alt2.qa1, babel-j = 2.0.0-alt2.qa1, python-module-sidl = 2.0.0-alt2.qa1, python-module-sidlx = 2.0.0-alt2.qa1, /bin/sh, /usr/bin/emacs, /usr/bin/file, coreutils, gawk, sed
/tasks/archive/done/_212/217155/build/100/i586/log:Processing files: libbabel-devel-2.0.0-alt2.qa1
/tasks/archive/done/_212/217155/build/100/i586/log:Removing 8 extra deps from libbabel-devel due to dependency on libbabel
/tasks/archive/done/_212/217155/build/100/i586/log:Removing 4 extra deps from babel due to repentancy on libbabel-devel
/tasks/archive/done/_212/217155/build/100/i586/log:Removing 1 extra deps from libbabel-devel due to repentancy on python-module-sidl
/tasks/archive/done/_212/217155/build/100/i586/log:libbabel-devel: replacing strict dependency on babel with .sisyphus.217155.100.1.1-babel-2.0.0-alt2.qa1
/tasks/archive/done/_212/217155/build/100/i586/log:babel: replacing strict dependency on libbabel-devel with .sisyphus.217155.100.1.1-libbabel-devel-2.0.0-alt2.qa1
/tasks/archive/done/_212/217155/build/100/i586/log:libbabel-devel: adding .sisyphus.217155.100.1.1-libbabel-devel-2.0.0-alt2.qa1 to provides
/tasks/archive/done/_212/217155/build/100/i586/log:libbabel-devel: replacing strict dependency on python-module-sidl with .sisyphus.217155.100.1.1-python-module-sidl-2.0.0-alt2.qa1
/tasks/archive/done/_212/217155/build/100/i586/log:libbabel-devel: replacing strict dependency on babel-j with .sisyphus.217155.100.1.1-babel-j-2.0.0-alt2.qa1
/tasks/archive/done/_212/217155/build/100/i586/log:libbabel-devel: replacing strict dependency on babel-common with .sisyphus.217155.100.1.1-babel-common-2.0.0-alt2.qa1
/tasks/archive/done/_212/217155/build/100/i586/log:Wrote: /usr/src/RPM/RPMS/i586/libbabel-devel-2.0.0-alt2.qa1.i586.rpm

$ rpm -qp /ALT/repo/sisyphus/date/2018/12/01/i586/RPMS.classic/libbabel-devel-2.0.0-alt2.qa1.i586.rpm --requires
.sisyphus.217155.100.1.1-babel-2.0.0-alt2.qa1
.sisyphus.217155.100.1.1-babel-common-2.0.0-alt2.qa1
.sisyphus.217155.100.1.1-babel-j-2.0.0-alt2.qa1
.sisyphus.217155.100.1.1-python-module-sidl-2.0.0-alt2.qa1
/usr/lib/pkgconfig
python-dev
rpmlib(PayloadIsLzma)
$ 

/tasks/archive/done/_217/222711/build/100/i586/log:Requires: babel-common = 2.0.0-alt2.qa1, libbabel = 2.0.0-alt2.qa1, libbabel-devel = 2.0.0-alt2.qa1, babel-j = 2.0.0-alt2.qa1, python-module-sidl = 2.0.0-alt2.qa1, python-module-sidlx = 2.0.0-alt2.qa1, /bin/sh, /usr/bin/emacs, /usr/bin/file, coreutils, gawk, sed
/tasks/archive/done/_217/222711/build/100/i586/log:Processing files: libbabel-devel-2.0.0-alt2.qa1
/tasks/archive/done/_217/222711/build/100/i586/log:Adding to babel a strict dependency on libbabel-devel
/tasks/archive/done/_217/222711/build/100/i586/log:Adding to libbabel-devel a strict dependency on babel
/tasks/archive/done/_217/222711/build/100/i586/log:Removing 8 extra deps from libbabel-devel due to dependency on libbabel
/tasks/archive/done/_217/222711/build/100/i586/log:Wrote: /usr/src/RPM/RPMS/i586/libbabel-devel-2.0.0-alt2.qa1.i586.rpm

$ rpm -qp /ALT/Sisyphus/i586/RPMS.classic/libbabel-devel-2.0.0-alt2.qa1.i586.rpm --requires
babel-common = 2.0.0-alt2.qa1
libbabel = 2.0.0-alt2.qa1
babel-j = 2.0.0-alt2.qa1
python-module-sidl = 2.0.0-alt2.qa1
/usr/lib/pkgconfig
python-dev
babel = 2.0.0-alt2.qa1:sisyphus+222711.100.1.1
rpmlib(PayloadIsLzma)
$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178902</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-02-25 00:37:39 +0300</bug_when>
    <thetext>I see the following warning in the build log:
warning [x86_64]: babel=2.0.0-alt2.qa1: circular dependencies on libbabel-devel=2.0.0-alt2.qa1

http://git.altlinux.org/tasks/archive/done/_217/222711/logs/events.1.1.log</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178903</commentid>
    <comment_count>5</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-02-25 00:40:47 +0300</bug_when>
    <thetext>(In reply to comment #4)
&gt; I see the following warning in the build log:
&gt; warning [x86_64]: babel=2.0.0-alt2.qa1: circular dependencies on
&gt; libbabel-devel=2.0.0-alt2.qa1
&gt; 
&gt; http://git.altlinux.org/tasks/archive/done/_217/222711/logs/events.1.1.log

Although the problem does not have to be related to circular dependencies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178904</commentid>
    <comment_count>6</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-02-25 00:41:51 +0300</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; I see the following warning in the build log:
&gt; &gt; warning [x86_64]: babel=2.0.0-alt2.qa1: circular dependencies on
&gt; &gt; libbabel-devel=2.0.0-alt2.qa1
&gt; &gt; 
&gt; &gt; http://git.altlinux.org/tasks/archive/done/_217/222711/logs/events.1.1.log
&gt; 
&gt; Although the problem does not have to be related to circular dependencies.

Another case with circular deps but without disttag loss:
http://git.altlinux.org/tasks/archive/done/_217/222640/logs/events.1.1.log</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178912</commentid>
    <comment_count>7</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-02-25 01:19:38 +0300</bug_when>
    <thetext>Is it fixed already?

$ rpmquery -Rp /ALT/Sisyphus/files/i586/RPMS/babel-2.0.0-alt2.qa1.i586.rpm |grep 2.0.0-alt2.qa1
libbabel-devel = 2.0.0-alt2.qa1:sisyphus+222711.100.1.1
python-module-sidl = 2.0.0-alt2.qa1:sisyphus+222711.100.1.1
python-module-sidlx = 2.0.0-alt2.qa1:sisyphus+222711.100.1.1
babel-j = 2.0.0-alt2.qa1:sisyphus+222711.100.1.1
babel-common = 2.0.0-alt2.qa1:sisyphus+222711.100.1.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178913</commentid>
    <comment_count>8</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-25 01:22:30 +0300</bug_when>
    <thetext>(In reply to comment #7)
&gt; Is it fixed already?

No, look at libbabel-devel

$ rpmquery -Rp /ALT/Sisyphus/files/i586/RPMS/libbabel-devel-2.0.0-alt2.qa1.i586.rpm |grep 2.0.0-alt2.qa1
babel-common = 2.0.0-alt2.qa1
libbabel = 2.0.0-alt2.qa1
babel-j = 2.0.0-alt2.qa1
python-module-sidl = 2.0.0-alt2.qa1
babel = 2.0.0-alt2.qa1:sisyphus+222711.100.1.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178914</commentid>
    <comment_count>9</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-25 01:24:18 +0300</bug_when>
    <thetext>Cherry-picking the disttag-comparison code from rpm also doesn&apos;t improve the situation -- http://git.altlinux.org/people/imz/packages/rpm.git?p=rpm.git;a=shortlog;h=refs/heads/_BUILD/disttag-cmp .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178915</commentid>
    <comment_count>10</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-02-25 01:24:38 +0300</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #7)
&gt; &gt; Is it fixed already?
&gt; 
&gt; No, look at libbabel-devel
&gt; 
&gt; $ rpmquery -Rp
&gt; /ALT/Sisyphus/files/i586/RPMS/libbabel-devel-2.0.0-alt2.qa1.i586.rpm |grep
&gt; 2.0.0-alt2.qa1
&gt; babel-common = 2.0.0-alt2.qa1
&gt; libbabel = 2.0.0-alt2.qa1
&gt; babel-j = 2.0.0-alt2.qa1
&gt; python-module-sidl = 2.0.0-alt2.qa1
&gt; babel = 2.0.0-alt2.qa1:sisyphus+222711.100.1.1

Then it&apos;s definitely due to circular deps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178916</commentid>
    <comment_count>11</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-25 01:27:28 +0300</bug_when>
    <thetext>In a sense, it&apos;s not dangerous: there is at least one strict dep.

But in the times of .sisyphus* strict deps (with replaceDeps()), they all got changed into strict deps...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178917</commentid>
    <comment_count>12</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-25 01:29:04 +0300</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #8)
&gt; &gt; (In reply to comment #7)
&gt; &gt; &gt; Is it fixed already?
&gt; &gt; 
&gt; &gt; No, look at libbabel-devel
&gt; &gt; 
&gt; &gt; $ rpmquery -Rp
&gt; &gt; /ALT/Sisyphus/files/i586/RPMS/libbabel-devel-2.0.0-alt2.qa1.i586.rpm |grep
&gt; &gt; 2.0.0-alt2.qa1
&gt; &gt; babel-common = 2.0.0-alt2.qa1
&gt; &gt; libbabel = 2.0.0-alt2.qa1
&gt; &gt; babel-j = 2.0.0-alt2.qa1
&gt; &gt; python-module-sidl = 2.0.0-alt2.qa1
&gt; &gt; babel = 2.0.0-alt2.qa1:sisyphus+222711.100.1.1
&gt; 
&gt; Then it&apos;s definitely due to circular deps.

Yes, that sounds logical.

Otherwise there is no essential difference between the original deps on babel or other subpackages.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178918</commentid>
    <comment_count>13</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-25 01:31:31 +0300</bug_when>
    <thetext>(In reply to comment #12)
&gt; (In reply to comment #10)
&gt; &gt; (In reply to comment #8)
&gt; &gt; &gt; (In reply to comment #7)
&gt; &gt; &gt; &gt; Is it fixed already?
&gt; &gt; &gt; 
&gt; &gt; &gt; No, look at libbabel-devel
&gt; &gt; &gt; 
&gt; &gt; &gt; $ rpmquery -Rp
&gt; &gt; &gt; /ALT/Sisyphus/files/i586/RPMS/libbabel-devel-2.0.0-alt2.qa1.i586.rpm |grep
&gt; &gt; &gt; 2.0.0-alt2.qa1
&gt; &gt; &gt; babel-common = 2.0.0-alt2.qa1
&gt; &gt; &gt; libbabel = 2.0.0-alt2.qa1
&gt; &gt; &gt; babel-j = 2.0.0-alt2.qa1
&gt; &gt; &gt; python-module-sidl = 2.0.0-alt2.qa1
&gt; &gt; &gt; babel = 2.0.0-alt2.qa1:sisyphus+222711.100.1.1
&gt; &gt; 
&gt; &gt; Then it&apos;s definitely due to circular deps.
&gt; 
&gt; Yes, that sounds logical.
&gt; 
&gt; Otherwise there is no essential difference between the original deps on babel
&gt; or other subpackages.

Processing files: libbabel-devel-2.0.0-alt2.qa1
...
Requires: babel = 2.0.0-alt2.qa1, babel-common = 2.0.0-alt2.qa1, libbabel = 2.0.0-alt2.qa1, babel-j = 2.0.0-alt2.qa1, python-module-sidl = 2.0.0-alt2.qa1, /usr/lib64/libchasmlite-2.0.0.so, /usr/lib64/libsidl-2.0.0.so, /usr/lib64/libsidlstub_cxx-2.0.0.so, /usr/lib64/libsidlstub_f03-2.0.0.so, /usr/lib64/libsidlstub_f77-2.0.0.so, /usr/lib64/libsidlstub_f90-2.0.0.so, /usr/lib64/libsidlstub_java-2.0.0.so, /usr/lib64/libsidlx-2.0.0.so, /usr/lib64/pkgconfig, python-dev</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178919</commentid>
    <comment_count>14</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-02-25 01:36:18 +0300</bug_when>
    <thetext>How could you explain this:

http://git.altlinux.org/beehive/logs/Sisyphus-x86_64/archive/2018/1129/success/babel-2.0.0-alt2.zst
http://git.altlinux.org/beehive/logs/Sisyphus-x86_64/archive/2018/1201/success/babel-2.0.0-alt2.qa1.zst

?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178920</commentid>
    <comment_count>15</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-25 01:45:43 +0300</bug_when>
    <thetext>(In reply to comment #14)
&gt; How could you explain this:
&gt; 
&gt; http://git.altlinux.org/beehive/logs/Sisyphus-x86_64/archive/2018/1129/success/babel-2.0.0-alt2.zst
&gt; http://git.altlinux.org/beehive/logs/Sisyphus-x86_64/archive/2018/1201/success/babel-2.0.0-alt2.qa1.zst
&gt; 
&gt; ?

What are the interesting differences?

beehive doesn&apos;t set disttag, does it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178921</commentid>
    <comment_count>16</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-02-25 01:46:05 +0300</bug_when>
    <thetext>(In reply to comment #14)
&gt; How could you explain this:
&gt; 
&gt; http://git.altlinux.org/beehive/logs/Sisyphus-x86_64/archive/2018/1129/success/babel-2.0.0-alt2.zst
&gt; http://git.altlinux.org/beehive/logs/Sisyphus-x86_64/archive/2018/1201/success/babel-2.0.0-alt2.qa1.zst
&gt; 
&gt; ?

Oops, I forgot that disttags were added there just a few days ago.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178925</commentid>
    <comment_count>17</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-25 02:08:12 +0300</bug_when>
    <thetext>(In reply to comment #12)
&gt; (In reply to comment #10)
&gt; &gt; (In reply to comment #8)
&gt; &gt; &gt; (In reply to comment #7)
&gt; &gt; &gt; &gt; Is it fixed already?
&gt; &gt; &gt; 
&gt; &gt; &gt; No, look at libbabel-devel
&gt; &gt; &gt; 
&gt; &gt; &gt; $ rpmquery -Rp
&gt; &gt; &gt; /ALT/Sisyphus/files/i586/RPMS/libbabel-devel-2.0.0-alt2.qa1.i586.rpm |grep
&gt; &gt; &gt; 2.0.0-alt2.qa1
&gt; &gt; &gt; babel-common = 2.0.0-alt2.qa1
&gt; &gt; &gt; libbabel = 2.0.0-alt2.qa1
&gt; &gt; &gt; babel-j = 2.0.0-alt2.qa1
&gt; &gt; &gt; python-module-sidl = 2.0.0-alt2.qa1
&gt; &gt; &gt; babel = 2.0.0-alt2.qa1:sisyphus+222711.100.1.1
&gt; &gt; 
&gt; &gt; Then it&apos;s definitely due to circular deps.
&gt; 
&gt; Yes, that sounds logical.
&gt; 
&gt; Otherwise there is no essential difference between the original deps on babel
&gt; or other subpackages.

Or perhaps the order of processing:

$ fgrep Processing /tasks/archive/done/_217/222711/build/100/i586/log
Processing files: babel-2.0.0-alt2.qa1
Processing files: libbabel-2.0.0-alt2.qa1
Processing files: libbabel-devel-2.0.0-alt2.qa1
Processing files: python-module-sidl-2.0.0-alt2.qa1
Processing files: python-module-sidlx-2.0.0-alt2.qa1
Processing files: babel-j-2.0.0-alt2.qa1
Processing files: babel-common-2.0.0-alt2.qa1
Processing files: babel-javadoc-2.0.0-alt2.qa1
Processing files: babel-manual-2.0.0-alt2.qa1
Processing files: libbabel-debuginfo-2.0.0-alt2.qa1
Processing files: python-module-sidl-debuginfo-2.0.0-alt2.qa1
Processing files: python-module-sidlx-debuginfo-2.0.0-alt2.qa1

But libbabel also comes before libbabel-devel. So probably not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178926</commentid>
    <comment_count>18</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-25 02:15:48 +0300</bug_when>
    <thetext>rpm -vv output:

D: libbabel-devel: dependency on babel needs disttag

D: libbabel-devel: dependency on libbabel needs disttag

D: libbabel-devel: dependency on python-module-sidl needs disttag
D: libbabel-devel: dependency on babel-j needs disttag
D: libbabel-devel: dependency on babel-common needs disttag

So, addDeps1() is actually called for these dependencies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178927</commentid>
    <comment_count>19</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-02-25 02:22:29 +0300</bug_when>
    <thetext>(In reply to comment #18)
&gt; rpm -vv output:
&gt; 
&gt; D: libbabel-devel: dependency on babel needs disttag
&gt; 
&gt; D: libbabel-devel: dependency on libbabel needs disttag
&gt; 
&gt; D: libbabel-devel: dependency on python-module-sidl needs disttag
&gt; D: libbabel-devel: dependency on babel-j needs disttag
&gt; D: libbabel-devel: dependency on babel-common needs disttag
&gt; 
&gt; So, addDeps1() is actually called for these dependencies.

Yes, but I suppose Requires() returned true and addDeps1() returned early.
Why Requires() returned true?  Because of propagateRequires() and circular deps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178928</commentid>
    <comment_count>20</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-25 02:24:52 +0300</bug_when>
    <thetext>(In reply to comment #18)
&gt; rpm -vv output:
&gt; 
&gt; D: libbabel-devel: dependency on babel needs disttag
&gt; 
&gt; D: libbabel-devel: dependency on libbabel needs disttag
&gt; 
&gt; D: libbabel-devel: dependency on python-module-sidl needs disttag
&gt; D: libbabel-devel: dependency on babel-j needs disttag
&gt; D: libbabel-devel: dependency on babel-common needs disttag
&gt; 
&gt; So, addDeps1() is actually called for these dependencies.

D: libbabel-devel: dependency on babel needs disttag
D: The usual way of parsing the test part for %|?:|
D: The usual way of parsing the test part for %|?:|
D: cmp e=(null), v=2.0.0, r=alt2.qa1
 and e=(null), v=2.0.0, r=alt2.qa1
 D: 1 old deps to be optimized out
D: old dep &quot;babel&quot; optimized out
D: 1 old deps optimized out, 14 left
Adding to libbabel-devel a strict dependency on babel

D: libbabel-devel: dependency on libbabel needs disttag
D: python-module-sidl: dependency on libbabel needs disttag
D: The usual way of parsing the test part for %|?:|
D: The usual way of parsing the test part for %|?:|
D: cmp e=(null), v=2.0.0, r=alt2.qa1
 and e=(null), v=2.0.0, r=alt2.qa1
 D: 1 old deps to be optimized out
D: old dep &quot;libbabel&quot; optimized out

But no &quot;Adding ...&quot;.

D: libbabel-devel: dependency on python-module-sidl needs disttag
D: libbabel-devel: dependency on babel-j needs disttag
D: libbabel-devel: dependency on babel-common needs disttag

But no comparison messages.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178929</commentid>
    <comment_count>21</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-25 02:30:34 +0300</bug_when>
    <thetext>(In reply to comment #20)
&gt; (In reply to comment #18)
&gt; &gt; rpm -vv output:
&gt; &gt; 
&gt; &gt; D: libbabel-devel: dependency on babel needs disttag
&gt; &gt; 
&gt; &gt; D: libbabel-devel: dependency on libbabel needs disttag
&gt; &gt; 
&gt; &gt; D: libbabel-devel: dependency on python-module-sidl needs disttag
&gt; &gt; D: libbabel-devel: dependency on babel-j needs disttag
&gt; &gt; D: libbabel-devel: dependency on babel-common needs disttag
&gt; &gt; 
&gt; &gt; So, addDeps1() is actually called for these dependencies.
&gt; 
&gt; D: libbabel-devel: dependency on babel needs disttag
&gt; D: The usual way of parsing the test part for %|?:|
&gt; D: The usual way of parsing the test part for %|?:|
&gt; D: cmp e=(null), v=2.0.0, r=alt2.qa1
&gt;  and e=(null), v=2.0.0, r=alt2.qa1
&gt;  D: 1 old deps to be optimized out
&gt; D: old dep &quot;babel&quot; optimized out
&gt; D: 1 old deps optimized out, 14 left
&gt; Adding to libbabel-devel a strict dependency on babel
&gt; 
&gt; D: libbabel-devel: dependency on libbabel needs disttag
&gt; D: python-module-sidl: dependency on libbabel needs disttag
&gt; D: The usual way of parsing the test part for %|?:|
&gt; D: The usual way of parsing the test part for %|?:|
&gt; D: cmp e=(null), v=2.0.0, r=alt2.qa1
&gt;  and e=(null), v=2.0.0, r=alt2.qa1
&gt;  D: 1 old deps to be optimized out
&gt; D: old dep &quot;libbabel&quot; optimized out
&gt; 
&gt; But no &quot;Adding ...&quot;.
&gt; 
&gt; D: libbabel-devel: dependency on python-module-sidl needs disttag
&gt; D: libbabel-devel: dependency on babel-j needs disttag
&gt; D: libbabel-devel: dependency on babel-common needs disttag
&gt; 
&gt; But no comparison messages.

In the last 3 cases, yes, it looks like this:

&gt; Yes, but I suppose Requires() returned true and addDeps1() returned early.

Not in the case of libbabel-devel -&gt; libbabel. There, addReqProv(NULL, pkg1-&gt;header, flags, name, evrd, 0) must have returned non-0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178930</commentid>
    <comment_count>22</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-25 02:37:01 +0300</bug_when>
    <thetext>(In reply to comment #21)
&gt; (In reply to comment #20)
&gt; &gt; (In reply to comment #18)
&gt; &gt; &gt; rpm -vv output:
&gt; &gt; &gt; 
&gt; &gt; &gt; D: libbabel-devel: dependency on babel needs disttag
&gt; &gt; &gt; 
&gt; &gt; &gt; D: libbabel-devel: dependency on libbabel needs disttag
&gt; &gt; &gt; 
&gt; &gt; &gt; D: libbabel-devel: dependency on python-module-sidl needs disttag
&gt; &gt; &gt; D: libbabel-devel: dependency on babel-j needs disttag
&gt; &gt; &gt; D: libbabel-devel: dependency on babel-common needs disttag
&gt; &gt; &gt; 
&gt; &gt; &gt; So, addDeps1() is actually called for these dependencies.
&gt; &gt; 
&gt; &gt; D: libbabel-devel: dependency on babel needs disttag
&gt; &gt; D: The usual way of parsing the test part for %|?:|
&gt; &gt; D: The usual way of parsing the test part for %|?:|
&gt; &gt; D: cmp e=(null), v=2.0.0, r=alt2.qa1
&gt; &gt;  and e=(null), v=2.0.0, r=alt2.qa1
&gt; &gt;  D: 1 old deps to be optimized out
&gt; &gt; D: old dep &quot;babel&quot; optimized out
&gt; &gt; D: 1 old deps optimized out, 14 left
&gt; &gt; Adding to libbabel-devel a strict dependency on babel
&gt; &gt; 
&gt; &gt; D: libbabel-devel: dependency on libbabel needs disttag

Sorry, I didn&apos;t notice that the following messages are about another subpackage:

&gt; &gt; D: python-module-sidl: dependency on libbabel needs disttag
&gt; &gt; D: The usual way of parsing the test part for %|?:|
&gt; &gt; D: The usual way of parsing the test part for %|?:|
&gt; &gt; D: cmp e=(null), v=2.0.0, r=alt2.qa1
&gt; &gt;  and e=(null), v=2.0.0, r=alt2.qa1
&gt; &gt;  D: 1 old deps to be optimized out
&gt; &gt; D: old dep &quot;libbabel&quot; optimized out
&gt; &gt; 
&gt; &gt; But no &quot;Adding ...&quot;.
&gt; &gt; 
&gt; &gt; D: libbabel-devel: dependency on python-module-sidl needs disttag
&gt; &gt; D: libbabel-devel: dependency on babel-j needs disttag
&gt; &gt; D: libbabel-devel: dependency on babel-common needs disttag
&gt; &gt; 
&gt; &gt; But no comparison messages.
&gt; 
&gt; In the last 3 cases, yes, it looks like this:
&gt; 
&gt; &gt; Yes, but I suppose Requires() returned true and addDeps1() returned early.
&gt; 
&gt; Not in the case of libbabel-devel -&gt; libbabel. There, addReqProv(NULL,
&gt; pkg1-&gt;header, flags, name, evrd, 0) must have returned non-0.

All cases are similar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179015</commentid>
    <comment_count>23</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2019-02-27 01:36:58 +0300</bug_when>
    <thetext>rpm-build-4.0.4-alt128 -&gt; sisyphus:

Mon Feb 25 2019 Ivan Zakharyaschev &lt;imz@altlinux&gt; 4.0.4-alt128
- Reverted one of the changes (for disttag-unaware tools compatibility)
  from 4.0.4-alt127 (useful in rare cases, but bad for external dependencies
  on virtual Provides when interpreted by the old rpm):
  + %EVR macro (for intersubpackage deps) upgraded to include %disttag
- Always fix interpackage deps that need Epoch or Disttag (ALT#36180).
  (This completes the improvement of 4.0.4-alt100.63.)
- Made deps optimization more aware of disttag:
  + build/reqprov.c: made addReqProv() aware of the disttag of
    the package (affects deps optimization).
  + add disttag to struct availablePackage (like buildtime; affects
    rpm -U &amp; interdep.c)
  [rpm-4.13.0.1-alt5 alike]
  + Implemented DistTag support when comparing package versions (with
    help by Vladimir D. Seleznev).
  [rpm-4.13.0.1-alt6 alike]
  + rpmEVRcmp() (and hence rpmRangesOverlap()) made asymmetric w.r.t.
    underspecified release. (Provides: N = V can&apos;t anymore satisfy
    Requires: N = V-R.) (with help of Vladimir D. Seleznev)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179016</commentid>
    <comment_count>24</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 01:58:09 +0300</bug_when>
    <thetext>I&apos;ve understood why apt-cache unmet (with old rpm) didn&apos;t list the original packages from x86_64 or i586 with deps that lack a disttag, but listed the corresponding x86_64-i586 packages:

for example, for libbabel, apt dynamically decides (based on its NEVR) that it can satisfy Requires: libbabel = 2.0.0-alt2.qa1,

but for i586-libbabel, apt thinks that the name is a bit different:

$ ~/hasher/aptbox/apt-cache show i586-libbabel | head -60
E: Package i586-libbabel is a virtual package provided by:
  i586-libbabel.32bit 2.0.0-alt2.qa1
Package i586-libbabel is a virtual package with multiple providers.You should explicitly select one to show.

$ 

so the dynamically contrcuted N = E:V-R (i586-libbabel.32bit = 2.0.0-alt2.qa1) would not match Requires: i586-libbabel = 2.0.0-alt2.qa1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179017</commentid>
    <comment_count>25</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 03:42:27 +0300</bug_when>
    <thetext>To fix (make compatible) this kind of deps, I&apos;d like to rebuild the following packages.

The scripts are in git.altlinux.org/people/imz/public/check-unmet.git

[user@prodesk0 check-unmet]$ cat ~/hasher/aptbox/etc/apt/sources.list
#rpm-dir file:/tmp/.private/user/hasher/repo x86_64 hasher
#rpm [alt] file:/ALT Sisyphus/x86_64 classic
rpm [alt] file:/ALT Sisyphus/noarch classic
#rpm [alt] file:/ALT Sisyphus/x86_64-i586 classic
rpm [alt] file:/ALT Sisyphus/i586 classic
[user@prodesk0 check-unmet]$ ~/hasher/aptbox/apt-get update
Reading Package Lists... Done 
Building Dependency Tree... Done
[user@prodesk0 check-unmet]$ ./srcname-for-i586-unmet.sh | egrep -v -e &apos;^kernel-modules-&apos; | tee srcname-for-i586-unmet   
boost
elfutils
fcitx
gnustep-BDB
gnustep-base
gnustep-gorm
gnustep-gui
libwebkitgtk2
libwebkitgtk3
libwebkitgtk4
mono
mpip
php7-pdo_mysql
php7-pdo_odbc
php7-pdo_sqlite
php7-xmlreader
python3
samba
tracker
yaafe
[user@prodesk0 check-unmet]$ cat ~/hasher/aptbox/etc/apt/sources.list
#rpm-dir file:/tmp/.private/user/hasher/repo x86_64 hasher
rpm [alt] file:/ALT Sisyphus/x86_64 classic
rpm [alt] file:/ALT Sisyphus/noarch classic
rpm [alt] file:/ALT Sisyphus/x86_64-i586 classic
#rpm [alt] file:/ALT Sisyphus/i586 classic
[user@prodesk0 check-unmet]$ ~/hasher/aptbox/apt-get update
Reading Package Lists... Done    
Building Dependency Tree... Done
[user@prodesk0 check-unmet]$ ./srcname-for-x86_64-i586-unmet.sh | tee srcname-for-x86_64-i586-unmet   
boost
elfutils
fcitx
gnustep-BDB
gnustep-base
gnustep-gorm
gnustep-gui
mpip
php7-ldap
php7-pdo_mysql
php7-pdo_odbc
php7-pdo_sqlite
php7-xmlreader
python3
samba
tracker
yaafe
[user@prodesk0 check-unmet]$ sort -u srcname-for-i586-unmet srcname-for-x86_64-i586-unmet &gt;srcname-for-i586-and-x86_64-i586-unmet
[user@prodesk0 check-unmet]$ diff srcname-for-i586-unmet srcname-for-i586-and-x86_64-i586-unmet
12a13
&gt; php7-ldap
[user@prodesk0 check-unmet]$ rpm -q rpm --lastchange
* Fri Oct 05 2018 Gleb F-Malinovskiy &lt;glebfm@altlinux.org&gt; 4.13.0.1-alt4
- Add _allow_deps_with_beginning_dot macro to allow dependencies
  beginning with a dot character in spec file (vseleznv@).
[user@prodesk0 check-unmet]$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179018</commentid>
    <comment_count>26</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-02-27 03:53:39 +0300</bug_when>
    <thetext>(In reply to comment #25)
&gt; To fix (make compatible) this kind of deps, I&apos;d like to rebuild the following
&gt; packages.
[...]
&gt; boost
&gt; elfutils
&gt; python3
&gt; samba

Something is wrong if e.g. elfutils has to be rebuilt.
If elfutils has a packaging problem, I&apos;d rather fix it in the first place.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179019</commentid>
    <comment_count>27</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 03:54:37 +0300</bug_when>
    <thetext>As for the php7-ldap anomality, it&apos;s caused by php7-libs providing both variants:

[user@prodesk0 check-unmet]$ ~/hasher/aptbox/apt-cache unmet | fgrep -A1 php7-ldap
Package i586-php7-ldap.32bit version 7.2.15-alt1 has an unmet dep:
 Depends: i586-php7-libs (= 7.2.15-alt1)
[user@prodesk0 check-unmet]$ rpm -qp /ALT/Sisyphus/i586/RPMS.classic/php7-libs-7.2.15-alt1.i586.rpm --provides | fgrep php7-libs
php7-libs = 7.2.15-alt1
php7-libs = 7.2.15-alt1:sisyphus+221501.100.1.1
[user@prodesk0 check-unmet]$ 

So, it&apos;s true that it should be rebuilt for this reason, too. (For the compatibility of the deps in x86_64-i586.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179020</commentid>
    <comment_count>28</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 04:01:58 +0300</bug_when>
    <thetext>(In reply to comment #26)
&gt; (In reply to comment #25)
&gt; &gt; To fix (make compatible) this kind of deps, I&apos;d like to rebuild the following
&gt; &gt; packages.
&gt; [...]
&gt; &gt; boost
&gt; &gt; elfutils
&gt; &gt; python3
&gt; &gt; samba
&gt; 
&gt; Something is wrong if e.g. elfutils has to be rebuilt.
&gt; If elfutils has a packaging problem, I&apos;d rather fix it in the first place.

The situation with deps is the same there:

[user@prodesk0 ~]$ altlinux-repolist-src-names-to-bin-names --arch=i586 elfutils
elfutils
elfutils-debuginfo
libasm
libasm-debuginfo
libasm-devel
libasm-devel-static
libdw
libdw-debuginfo
libdw-devel
libdw-devel-static
libelf
libelf-debuginfo
libelf-devel
libelf-devel-static
[user@prodesk0 ~]$ ~/hasher/aptbox/apt-cache unmet | egrep -A1 &apos;elfutils|libasm|libdw|libelf&apos;
Package i586-libdw-devel-static.32bit version 0.176-alt1 has an unmet dep:
 Depends: i586-libdw-devel (= 0.176-alt1)
Package i586-boost-devel-static.32bit version 1:1.67.0-alt5 has an unmet dep:
[user@prodesk0 ~]$ rpm -qp /ALT/Sisyphus/i586/RPMS.classic/libdw-devel-
libdw-devel-0.176-alt1.i586.rpm         libdw-devel-static-0.176-alt1.i586.rpm  
[user@prodesk0 ~]$ rpm -qp /ALT/Sisyphus/i586/RPMS.classic/libdw-devel-0.176-alt1.i586.rpm --provides | fgrep libdw-devel
libdw-devel = 0.176-alt1:sisyphus+221496.100.1.1
[user@prodesk0 ~]$ rpm -qp /ALT/Sisyphus/i586/RPMS.classic/libdw-devel-static-0.176-alt1.i586.rpm --requires | fgrep 0.176-alt1
libdw-devel = 0.176-alt1
libasm-devel = 0.176-alt1:sisyphus+221496.100.1.1
libelf-devel-static = 0.176-alt1:sisyphus+221496.100.1.1
[user@prodesk0 ~]$ 

As for packaging, I haven&apos;t yet looked into the possible reason for why this dep was not handled (replaced with a strict one).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179021</commentid>
    <comment_count>29</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 04:15:04 +0300</bug_when>
    <thetext>(In reply to comment #28)
&gt; (In reply to comment #26)
&gt; &gt; (In reply to comment #25)
&gt; &gt; &gt; To fix (make compatible) this kind of deps, I&apos;d like to rebuild the following
&gt; &gt; &gt; packages.
&gt; &gt; [...]
&gt; &gt; &gt; boost
&gt; &gt; &gt; elfutils
&gt; &gt; &gt; python3
&gt; &gt; &gt; samba
&gt; &gt; 
&gt; &gt; Something is wrong if e.g. elfutils has to be rebuilt.
&gt; &gt; If elfutils has a packaging problem, I&apos;d rather fix it in the first place.
&gt; 
&gt; The situation with deps is the same there:
&gt; 
&gt; [user@prodesk0 ~]$ altlinux-repolist-src-names-to-bin-names --arch=i586
&gt; elfutils
&gt; elfutils
&gt; elfutils-debuginfo
&gt; libasm
&gt; libasm-debuginfo
&gt; libasm-devel
&gt; libasm-devel-static
&gt; libdw
&gt; libdw-debuginfo
&gt; libdw-devel
&gt; libdw-devel-static
&gt; libelf
&gt; libelf-debuginfo
&gt; libelf-devel
&gt; libelf-devel-static
&gt; [user@prodesk0 ~]$ ~/hasher/aptbox/apt-cache unmet | egrep -A1
&gt; &apos;elfutils|libasm|libdw|libelf&apos;
&gt; Package i586-libdw-devel-static.32bit version 0.176-alt1 has an unmet dep:
&gt;  Depends: i586-libdw-devel (= 0.176-alt1)
&gt; Package i586-boost-devel-static.32bit version 1:1.67.0-alt5 has an unmet dep:
&gt; [user@prodesk0 ~]$ rpm -qp /ALT/Sisyphus/i586/RPMS.classic/libdw-devel-
&gt; libdw-devel-0.176-alt1.i586.rpm         libdw-devel-static-0.176-alt1.i586.rpm  
&gt; [user@prodesk0 ~]$ rpm -qp
&gt; /ALT/Sisyphus/i586/RPMS.classic/libdw-devel-0.176-alt1.i586.rpm --provides |
&gt; fgrep libdw-devel
&gt; libdw-devel = 0.176-alt1:sisyphus+221496.100.1.1
&gt; [user@prodesk0 ~]$ rpm -qp
&gt; /ALT/Sisyphus/i586/RPMS.classic/libdw-devel-static-0.176-alt1.i586.rpm
&gt; --requires | fgrep 0.176-alt1
&gt; libdw-devel = 0.176-alt1

libdw-devel must have been optimized out due to libasm-devel:

$ rpm -qp /ALT/Sisyphus/i586/RPMS.classic/libasm-devel-0.176-alt1.i586.rpm --requires | fgrep 0.176-alt1
libasm = 0.176-alt1:sisyphus+221496.100.1.1
libdw-devel = 0.176-alt1:sisyphus+221496.100.1.1

&gt; libasm-devel = 0.176-alt1:sisyphus+221496.100.1.1
&gt; libelf-devel-static = 0.176-alt1:sisyphus+221496.100.1.1
&gt; [user@prodesk0 ~]$ 

But it wasn&apos;t. Probably because rpmbuild had difficulties with optimizing out in the presence of disttags...

I saw a similar situation with libbabel-devel -&gt; libbabel. After the changes in rpm-4.0.4-alt128, it got optimized out.

This particular problem seems to have nothing to do with circular deps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179022</commentid>
    <comment_count>30</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-02-27 04:18:34 +0300</bug_when>
    <thetext>(In reply to comment #28)
[...]
&gt; [user@prodesk0 ~]$ rpm -qp
&gt; /ALT/Sisyphus/i586/RPMS.classic/libdw-devel-static-0.176-alt1.i586.rpm
&gt; --requires | fgrep 0.176-alt1
&gt; libdw-devel = 0.176-alt1
&gt; libasm-devel = 0.176-alt1:sisyphus+221496.100.1.1
&gt; libelf-devel-static = 0.176-alt1:sisyphus+221496.100.1.1
&gt; [user@prodesk0 ~]$ 
&gt; 
&gt; As for packaging, I haven&apos;t yet looked into the possible reason for why this
&gt; dep was not handled (replaced with a strict one).

The spec defines it this way:

%package -n libasm-devel
Summary: Development libasm library and header files
License: GPLv2+ or LGPLv3+
Group: Development/C
Requires: libasm = %EVR
Requires: libelf-devel = %EVR, libdw-devel = %EVR

%package -n libdw-devel-static
Summary: Static libdw library
License: GPLv2+ or LGPLv3+
Group: Development/C
Requires: libasm-devel = %EVR, libdw-devel = %EVR
Requires: libelf-devel-static = %EVR

I see nothing wrong in it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179023</commentid>
    <comment_count>31</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 04:43:45 +0300</bug_when>
    <thetext>(In reply to comment #29)

&gt; &gt; [user@prodesk0 ~]$ ~/hasher/aptbox/apt-cache unmet | egrep -A1
&gt; &gt; &apos;elfutils|libasm|libdw|libelf&apos;
&gt; &gt; Package i586-libdw-devel-static.32bit version 0.176-alt1 has an unmet dep:
&gt; &gt;  Depends: i586-libdw-devel (= 0.176-alt1)
&gt; &gt; Package i586-boost-devel-static.32bit version 1:1.67.0-alt5 has an unmet dep:
&gt; &gt; [user@prodesk0 ~]$ rpm -qp /ALT/Sisyphus/i586/RPMS.classic/libdw-devel-
&gt; &gt; libdw-devel-0.176-alt1.i586.rpm         libdw-devel-static-0.176-alt1.i586.rpm  
&gt; &gt; [user@prodesk0 ~]$ rpm -qp
&gt; &gt; /ALT/Sisyphus/i586/RPMS.classic/libdw-devel-0.176-alt1.i586.rpm --provides |
&gt; &gt; fgrep libdw-devel
&gt; &gt; libdw-devel = 0.176-alt1:sisyphus+221496.100.1.1
&gt; &gt; [user@prodesk0 ~]$ rpm -qp
&gt; &gt; /ALT/Sisyphus/i586/RPMS.classic/libdw-devel-static-0.176-alt1.i586.rpm
&gt; &gt; --requires | fgrep 0.176-alt1
&gt; &gt; libdw-devel = 0.176-alt1
&gt; 
&gt; libdw-devel must have been optimized out due to libasm-devel:
&gt; 
&gt; $ rpm -qp /ALT/Sisyphus/i586/RPMS.classic/libasm-devel-0.176-alt1.i586.rpm
&gt; --requires | fgrep 0.176-alt1
&gt; libasm = 0.176-alt1:sisyphus+221496.100.1.1
&gt; libdw-devel = 0.176-alt1:sisyphus+221496.100.1.1
&gt; 
&gt; &gt; libasm-devel = 0.176-alt1:sisyphus+221496.100.1.1
&gt; &gt; libelf-devel-static = 0.176-alt1:sisyphus+221496.100.1.1
&gt; &gt; [user@prodesk0 ~]$ 
&gt; 
&gt; But it wasn&apos;t. Probably because rpmbuild had difficulties with optimizing out
&gt; in the presence of disttags...
&gt; 
&gt; I saw a similar situation with libbabel-devel -&gt; libbabel. After the changes in
&gt; rpm-4.0.4-alt128, it got optimized out.
&gt; 
&gt; This particular problem seems to have nothing to do with circular deps.

$ egrep &apos;libdw-devel-static.*libasm-devel&apos; /tasks/archive/done/_$(( 221496 / 1024 ))/221496/build/100/i586/log /tasks/223115/build/100/i586/log 
/tasks/archive/done/_216/221496/build/100/i586/log:Adding to libdw-devel-static a strict dependency on libasm-devel
/tasks/223115/build/100/i586/log:Adding to libdw-devel-static a strict dependency on libasm-devel
/tasks/223115/build/100/i586/log:Removing 1 extra deps from libdw-devel-static due to repentancy on libasm-devel
$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179024</commentid>
    <comment_count>32</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 04:51:51 +0300</bug_when>
    <thetext>I believe there is an error in this code (now masked in rpm-4.0.4-alt128 by the versions being equal):

	/* 10. EVRs with Epoch are stronger. */
	if (cmp_rc == DEP_EQ)
	{
		if ((aE &amp;&amp; *aE) &amp;&amp; !(bE &amp;&amp; *bE))
			cmp_rc = DEP_ST;
		else if ((bE &amp;&amp; *bE) &amp;&amp; !(aE &amp;&amp; *aE))
			cmp_rc = DEP_WK;
	}
	/* 11. EVRs with DistTag are stronger. */
	if (cmp_rc == DEP_EQ)
	{
	    if ((aD &amp;&amp; *aD) &amp;&amp; !(bD &amp;&amp; *bD))
		cmp_rc = DEP_ST;
	    else if ((bD &amp;&amp; *bD) &amp;&amp; !(aD &amp;&amp; *aD))
		cmp_rc = DEP_WK;
	}

	aEVR = _free(aEVR);
	bEVR = _free(bEVR);

#if 0
	fprintf(stderr, &quot;D: compare_sense_flags=%d: tag=%d, sense=%d, wcmp=%d, Asense=%#x, Bsense=%#x\n&quot;,
		cmp_rc, tag, sense, wcmp, Asense, Bsense);
#endif

	/* 11. compare expected with received. */
	if (cmp_rc == DEP_UN || rc == DEP_UN)
		return cmp_rc;

	if (cmp_rc != rc &amp;&amp; cmp_rc != DEP_EQ)
		return DEP_UN;

	return rc;

cmp_rc is set to interesting values in 10 and 11, but it is rc which is returned. So the interesting values are lost.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179025</commentid>
    <comment_count>33</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 04:55:04 +0300</bug_when>
    <thetext>
&gt;     if (cmp_rc != rc &amp;&amp; cmp_rc != DEP_EQ)
&gt;         return DEP_UN;
&gt; 
&gt;     return rc;
&gt; 
&gt; cmp_rc is set to interesting values in 10 and 11, but it is rc which is
&gt; returned. So the interesting values are lost.

I&apos;d rewrite it like this:

	if (cmp_rc != rc &amp;&amp; !(cmp_rc == DEP_EQ || rc == DEP_EQ))
		return DEP_UN;

	return rc;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179026</commentid>
    <comment_count>34</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 04:59:26 +0300</bug_when>
    <thetext>(In reply to comment #33)
&gt; &gt;     if (cmp_rc != rc &amp;&amp; cmp_rc != DEP_EQ)
&gt; &gt;         return DEP_UN;
&gt; &gt; 
&gt; &gt;     return rc;
&gt; &gt; 
&gt; &gt; cmp_rc is set to interesting values in 10 and 11, but it is rc which is
&gt; &gt; returned. So the interesting values are lost.
&gt; 
&gt; I&apos;d rewrite it like this:
&gt; 
&gt;     if (cmp_rc != rc &amp;&amp; !(cmp_rc == DEP_EQ || rc == DEP_EQ))
&gt;         return DEP_UN;
&gt; 
&gt;     return rc;

That&apos;s not complete. We should then return the non-DEP_EQ value of the two.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179027</commentid>
    <comment_count>35</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-02-27 05:01:13 +0300</bug_when>
    <thetext>(In reply to comment #32)
&gt;     if (cmp_rc != rc &amp;&amp; cmp_rc != DEP_EQ)
&gt;         return DEP_UN;
&gt; 
&gt;     return rc;
&gt; 
&gt; cmp_rc is set to interesting values in 10 and 11, but it is rc which is
&gt; returned. So the interesting values are lost.

What&apos;s wrong here?  rc is returned iff cmp_rc == rc || cmp_rc == DEP_EQ.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179028</commentid>
    <comment_count>36</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 05:05:59 +0300</bug_when>
    <thetext>diff --git a/build/reqprov.c b/build/reqprov.c
index d9dfa3ba7..575ea170a 100644
--- a/build/reqprov.c
+++ b/build/reqprov.c
@@ -244,7 +244,13 @@ compare_deps (rpmTag tag, const char *Aevr, rpmsenseFlags Aflags,
 	if (cmp_rc == DEP_UN || rc == DEP_UN)
 		return cmp_rc;
 
-	if (cmp_rc != rc &amp;&amp; cmp_rc != DEP_EQ)
+	if (cmp_rc == DEP_EQ)
+		return rc;
+
+	if (rc == DEP_EQ)
+		return cmp_rc;
+
+	if (cmp_rc != rc)
 		return DEP_UN;
 
 	return rc;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179029</commentid>
    <comment_count>37</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2019-02-27 05:07:09 +0300</bug_when>
    <thetext>if (cmp_rc == rc)
  return rc;
if (cmp_rc == DEP_EQ)
  return rc;
if (rc == DEP_EQ)
  return cmp_rc;
return DEP_UN;

Did you mean this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179030</commentid>
    <comment_count>38</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 06:06:22 +0300</bug_when>
    <thetext>(In reply to comment #36)
&gt; diff --git a/build/reqprov.c b/build/reqprov.c
&gt; index d9dfa3ba7..575ea170a 100644
&gt; --- a/build/reqprov.c
&gt; +++ b/build/reqprov.c
&gt; @@ -244,7 +244,13 @@ compare_deps (rpmTag tag, const char *Aevr, rpmsenseFlags
&gt; Aflags,
&gt;      if (cmp_rc == DEP_UN || rc == DEP_UN)
&gt;          return cmp_rc;
&gt; 
&gt; -    if (cmp_rc != rc &amp;&amp; cmp_rc != DEP_EQ)
&gt; +    if (cmp_rc == DEP_EQ)
&gt; +        return rc;
&gt; +
&gt; +    if (rc == DEP_EQ)
&gt; +        return cmp_rc;
&gt; +
&gt; +    if (cmp_rc != rc)
&gt;          return DEP_UN;
&gt; 
&gt;      return rc;

No, this can&apos;t fix anything. rc can&apos;t be DEP_EQ. (It can be DEP_UN or DEP_ST or DEP_ST.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179031</commentid>
    <comment_count>39</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 06:09:18 +0300</bug_when>
    <thetext>(In reply to comment #37)
&gt; if (cmp_rc == rc)
&gt;   return rc;
&gt; if (cmp_rc == DEP_EQ)
&gt;   return rc;
&gt; if (rc == DEP_EQ)
&gt;   return cmp_rc;
&gt; return DEP_UN;
&gt; 
&gt; Did you mean this?

Yes, probably I meant this (this seems to be equivalent to my code), but this can&apos;t fix anything, because rc can&apos;t be DEP_EQ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179032</commentid>
    <comment_count>40</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 07:10:55 +0300</bug_when>
    <thetext>commit 492396b532660f4debc46e96eb306f07a3261d66 (HEAD -&gt; predisttag-fixes, @ALT/predisttag-fixes)
Author: Ivan Zakharyaschev &lt;imz@altlinux.org&gt;
Date:   Wed Feb 27 04:56:24 2019 +0300

    interdep.c: fix the optimization (&quot;due to repentancy&quot;) of a non-identical dep
    
    compare_deps() was simply called with a wrong argument (an illegal value
    for this parameter); so it returned a meaningful result only if
    the compared deps were identical. (Always, since the inception in f5ed7f870a .)
    
    Example where the dep was not optimized out:
    
    Name: test-epoch-repentancy
    Version: 1
    Release: alt1
    
    Summary: test-epoch-repentancy
    
    License: public domain
    Group: Other
    
    Requires: %name-sub = %EVR
    Requires: foo = 1-alt1
    
    BuildArch: noarch
    
    %description
    %summary
    
    %package sub
    Summary: sub
    Group: Other
    
    Requires: foo = 0:1-alt1
    
    %description sub
    %summary
    
    %files
    %files sub
    
    %changelog
    * Wed Feb 27 2019 Ivan Zakharyaschev &lt;imz@altlinux.org&gt; 1-alt1
    - initial build for ALT Linux Sisyphus.

diff --git a/build/interdep.c b/build/interdep.c
index 321bef5d8..eadc12086 100644
--- a/build/interdep.c
+++ b/build/interdep.c
@@ -713,7 +713,7 @@ void pruneRDeps1(struct Req *r, Spec spec, Package pkg1, Package pkg2)
 	    return;
 	if (cycle &amp;&amp; (reqFv[i] &amp; RPMSENSE_SENSEMASK) == RPMSENSE_EQUAL)
 	    return;
-	dep_compare_t cmp = compare_deps(RPMTAG_REQUIRENAME,
+	dep_compare_t cmp = compare_deps(RPMTAG_REQUIREFLAGS,
 		provVv[j], provFv[j], reqVv[i], reqFv[i]);
 	if (!(cmp == DEP_ST || cmp == DEP_EQ))
 	    return;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179033</commentid>
    <comment_count>41</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-27 07:15:23 +0300</bug_when>
    <thetext>I&apos;d commit this fix to Sisyphus, but not to other stable branches -- not to affect their stable deps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179049</commentid>
    <comment_count>42</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-28 01:54:24 +0300</bug_when>
    <thetext>(In reply to comment #27)
&gt; As for the php7-ldap anomality, it&apos;s caused by php7-libs providing both
&gt; variants:
&gt; 
&gt; [user@prodesk0 check-unmet]$ ~/hasher/aptbox/apt-cache unmet | fgrep -A1
&gt; php7-ldap
&gt; Package i586-php7-ldap.32bit version 7.2.15-alt1 has an unmet dep:
&gt;  Depends: i586-php7-libs (= 7.2.15-alt1)
&gt; [user@prodesk0 check-unmet]$ rpm -qp
&gt; /ALT/Sisyphus/i586/RPMS.classic/php7-libs-7.2.15-alt1.i586.rpm --provides |
&gt; fgrep php7-libs
&gt; php7-libs = 7.2.15-alt1
&gt; php7-libs = 7.2.15-alt1:sisyphus+221501.100.1.1
&gt; [user@prodesk0 check-unmet]$ 
&gt; 
&gt; So, it&apos;s true that it should be rebuilt for this reason, too. (For the
&gt; compatibility of the deps in x86_64-i586.)

No, everything is not that simple. There is no such simple solution for compatibility with old rpm.

And this case can be a general example of the problem.

php7-ldap and php7-libs are built from different srpms.

Therefore the dependency can&apos;t become strict (with a disttag).

Even if in the i586 or x86_64 repo apt can dynamically construct an old-style disttag-less Provides, so that apt doesn&apos;t see an unmet dependency php7-ldap-&gt;php7-libs, rpm won&apos;t do this (I suppose).

Old rpm would see this as an unmet dependency: the Provides has a disttag in the version string, but the Requires doesn&apos;t.

(Only the generation of two Provides (one for compatibility) would make possible the use of old rpm with a repo with new packages.)

The tests that rider@ mentioned probably were not a dist-upgrade that was committed; one ran &quot;apt-get dist-upgrade&quot;, saw that there are no unmets and unwanted deletions suggested by apt, but if it was committed, the old rpm would probably not tolerate this.

A rebuild of packages for strict intersubpackage deps would still make sense (at least, no harm), but that&apos;s not so for external interpackage deps from the list above. :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179050</commentid>
    <comment_count>43</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2019-02-28 01:57:03 +0300</bug_when>
    <thetext>(In reply to comment #42)
&gt; (In reply to comment #27)
&gt; &gt; As for the php7-ldap anomality, it&apos;s caused by php7-libs providing both
&gt; &gt; variants:
&gt; &gt; 
&gt; &gt; [user@prodesk0 check-unmet]$ ~/hasher/aptbox/apt-cache unmet | fgrep -A1
&gt; &gt; php7-ldap
&gt; &gt; Package i586-php7-ldap.32bit version 7.2.15-alt1 has an unmet dep:
&gt; &gt;  Depends: i586-php7-libs (= 7.2.15-alt1)
&gt; &gt; [user@prodesk0 check-unmet]$ rpm -qp
&gt; &gt; /ALT/Sisyphus/i586/RPMS.classic/php7-libs-7.2.15-alt1.i586.rpm --provides |
&gt; &gt; fgrep php7-libs
&gt; &gt; php7-libs = 7.2.15-alt1
&gt; &gt; php7-libs = 7.2.15-alt1:sisyphus+221501.100.1.1
&gt; &gt; [user@prodesk0 check-unmet]$ 
&gt; &gt; 
&gt; &gt; So, it&apos;s true that it should be rebuilt for this reason, too. (For the
&gt; &gt; compatibility of the deps in x86_64-i586.)
&gt; 
&gt; No, everything is not that simple. There is no such simple solution for
&gt; compatibility with old rpm.
&gt; 
&gt; And this case can be a general example of the problem.

This particular example is not clean: php7-libs manually provides the old style E:V-R. But anyway, the idea must be clear. (Imagine that php7-libs doesn&apos;t have this manual Provides.)

&gt; php7-ldap and php7-libs are built from different srpms.
&gt; 
&gt; Therefore the dependency can&apos;t become strict (with a disttag).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>