Bug 36180

Summary: for old rpm+apt, arepo pkgs have unmet deps
Product: Sisyphus Reporter: Ivan Zakharyaschev <imz>
Component: rpm-buildAssignee: placeholder <placeholder>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P3 CC: arseny, glebfm, imz, iv, ldv, placeholder, vitty, vseleznv, vt
Version: unstable   
Hardware: all   
OS: Linux   
Bug Depends on:    
Bug Blocks: 35930    

Description Ivan Zakharyaschev 2019-02-24 23:08:45 MSK
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'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 <glebfm@altlinux.org> 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 ~]$
Comment 1 Ivan Zakharyaschev 2019-02-24 23:15:28 MSK
Hmm, rpmrebuild-arepo-3.1.8-alt1 already has this feature:

commit 77311559b830079448161b71c77640889c06bdb4
Author: Dmitry V. Levin <ldv@altlinux.org>
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 [ "$AREPO_MODE" = "lib" ]; then
 		if [ -f "$AREPO_NATIVE" ]; then
-			# add Requires: strict or %name=EVR for the native package
-			echo "Requires: $(rpmquery --provides -p "$AREPO_NATIVE" |grep "^[.]" ||
-			rpmquery --qf "%{NAME} = %|EPOCH?{%{EPOCH}:}|%{VERSION}-%{RELEASE}" -p "$AREPO_NATIVE")"
+			# add strict Requires: for the native package
+			rpmquery --qf 'Requires: %{NAME} = %|EPOCH?{%{EPOCH}:}|%{VERSION}-%{RELEASE}%|DISTTAG?{:%{DISTTAG}}|\n' -p "$AREPO_NATIVE"
 		fi
 	fi
 

Perhaps, it's a strange interaction in the internals of apt and rpm interaction.

I'll have a closer look at these cases.
Comment 2 Ivan Zakharyaschev 2019-02-24 23:20:35 MSK
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)
Comment 3 Ivan Zakharyaschev 2019-02-25 00:27:23 MSK
(In reply to comment #2)
> 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)

This is explained by the fact that rpm-build-4.0.4-alt127 didn'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)
$
Comment 4 Dmitry V. Levin 2019-02-25 00:37:39 MSK
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
Comment 5 Dmitry V. Levin 2019-02-25 00:40:47 MSK
(In reply to comment #4)
> 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

Although the problem does not have to be related to circular dependencies.
Comment 6 Dmitry V. Levin 2019-02-25 00:41:51 MSK
(In reply to comment #5)
> (In reply to comment #4)
> > 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
> 
> 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
Comment 7 Dmitry V. Levin 2019-02-25 01:19:38 MSK
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
Comment 8 Ivan Zakharyaschev 2019-02-25 01:22:30 MSK
(In reply to comment #7)
> 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
Comment 9 Ivan Zakharyaschev 2019-02-25 01:24:18 MSK
Cherry-picking the disttag-comparison code from rpm also doesn't improve the situation -- http://git.altlinux.org/people/imz/packages/rpm.git?p=rpm.git;a=shortlog;h=refs/heads/_BUILD/disttag-cmp .
Comment 10 Dmitry V. Levin 2019-02-25 01:24:38 MSK
(In reply to comment #8)
> (In reply to comment #7)
> > 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

Then it's definitely due to circular deps.
Comment 11 Ivan Zakharyaschev 2019-02-25 01:27:28 MSK
In a sense, it'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...
Comment 12 Ivan Zakharyaschev 2019-02-25 01:29:04 MSK
(In reply to comment #10)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > 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
> 
> Then it'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.
Comment 13 Ivan Zakharyaschev 2019-02-25 01:31:31 MSK
(In reply to comment #12)
> (In reply to comment #10)
> > (In reply to comment #8)
> > > (In reply to comment #7)
> > > > 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
> > 
> > Then it'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.

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
Comment 15 Ivan Zakharyaschev 2019-02-25 01:45:43 MSK
(In reply to comment #14)
> 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
> 
> ?

What are the interesting differences?

beehive doesn't set disttag, does it?
Comment 16 Dmitry V. Levin 2019-02-25 01:46:05 MSK
(In reply to comment #14)
> 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
> 
> ?

Oops, I forgot that disttags were added there just a few days ago.
Comment 17 Ivan Zakharyaschev 2019-02-25 02:08:12 MSK
(In reply to comment #12)
> (In reply to comment #10)
> > (In reply to comment #8)
> > > (In reply to comment #7)
> > > > 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
> > 
> > Then it'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.

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.
Comment 18 Ivan Zakharyaschev 2019-02-25 02:15:48 MSK
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.
Comment 19 Dmitry V. Levin 2019-02-25 02:22:29 MSK
(In reply to comment #18)
> 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.

Yes, but I suppose Requires() returned true and addDeps1() returned early.
Why Requires() returned true?  Because of propagateRequires() and circular deps.
Comment 20 Ivan Zakharyaschev 2019-02-25 02:24:52 MSK
(In reply to comment #18)
> 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.

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 "babel" 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 "libbabel" optimized out

But no "Adding ...".

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.
Comment 21 Ivan Zakharyaschev 2019-02-25 02:30:34 MSK
(In reply to comment #20)
> (In reply to comment #18)
> > 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.
> 
> 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 "babel" 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 "libbabel" optimized out
> 
> But no "Adding ...".
> 
> 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.

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

> Yes, but I suppose Requires() returned true and addDeps1() returned early.

Not in the case of libbabel-devel -> libbabel. There, addReqProv(NULL, pkg1->header, flags, name, evrd, 0) must have returned non-0.
Comment 22 Ivan Zakharyaschev 2019-02-25 02:37:01 MSK
(In reply to comment #21)
> (In reply to comment #20)
> > (In reply to comment #18)
> > > 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.
> > 
> > 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 "babel" 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

Sorry, I didn't notice that the following messages are about another subpackage:

> > 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 "libbabel" optimized out
> > 
> > But no "Adding ...".
> > 
> > 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.
> 
> In the last 3 cases, yes, it looks like this:
> 
> > Yes, but I suppose Requires() returned true and addDeps1() returned early.
> 
> Not in the case of libbabel-devel -> libbabel. There, addReqProv(NULL,
> pkg1->header, flags, name, evrd, 0) must have returned non-0.

All cases are similar.
Comment 23 Repository Robot 2019-02-27 01:36:58 MSK
rpm-build-4.0.4-alt128 -> sisyphus:

Mon Feb 25 2019 Ivan Zakharyaschev <imz@altlinux> 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 & 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't anymore satisfy
    Requires: N = V-R.) (with help of Vladimir D. Seleznev)
Comment 24 Ivan Zakharyaschev 2019-02-27 01:58:09 MSK
I've understood why apt-cache unmet (with old rpm) didn'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
Comment 25 Ivan Zakharyaschev 2019-02-27 03:42:27 MSK
To fix (make compatible) this kind of deps, I'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 '^kernel-modules-' | 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 >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
> php7-ldap
[user@prodesk0 check-unmet]$ rpm -q rpm --lastchange
* Fri Oct 05 2018 Gleb F-Malinovskiy <glebfm@altlinux.org> 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]$
Comment 26 Dmitry V. Levin 2019-02-27 03:53:39 MSK
(In reply to comment #25)
> To fix (make compatible) this kind of deps, I'd like to rebuild the following
> packages.
[...]
> boost
> elfutils
> python3
> samba

Something is wrong if e.g. elfutils has to be rebuilt.
If elfutils has a packaging problem, I'd rather fix it in the first place.
Comment 27 Ivan Zakharyaschev 2019-02-27 03:54:37 MSK
As for the php7-ldap anomality, it'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's true that it should be rebuilt for this reason, too. (For the compatibility of the deps in x86_64-i586.)
Comment 28 Ivan Zakharyaschev 2019-02-27 04:01:58 MSK
(In reply to comment #26)
> (In reply to comment #25)
> > To fix (make compatible) this kind of deps, I'd like to rebuild the following
> > packages.
> [...]
> > boost
> > elfutils
> > python3
> > samba
> 
> Something is wrong if e.g. elfutils has to be rebuilt.
> If elfutils has a packaging problem, I'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 'elfutils|libasm|libdw|libelf'
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't yet looked into the possible reason for why this dep was not handled (replaced with a strict one).
Comment 29 Ivan Zakharyaschev 2019-02-27 04:15:04 MSK
(In reply to comment #28)
> (In reply to comment #26)
> > (In reply to comment #25)
> > > To fix (make compatible) this kind of deps, I'd like to rebuild the following
> > > packages.
> > [...]
> > > boost
> > > elfutils
> > > python3
> > > samba
> > 
> > Something is wrong if e.g. elfutils has to be rebuilt.
> > If elfutils has a packaging problem, I'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
> 'elfutils|libasm|libdw|libelf'
> 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

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

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

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

I saw a similar situation with libbabel-devel -> 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.
Comment 30 Dmitry V. Levin 2019-02-27 04:18:34 MSK
(In reply to comment #28)
[...]
> [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't yet looked into the possible reason for why this
> 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.
Comment 31 Ivan Zakharyaschev 2019-02-27 04:43:45 MSK
(In reply to comment #29)

> > [user@prodesk0 ~]$ ~/hasher/aptbox/apt-cache unmet | egrep -A1
> > 'elfutils|libasm|libdw|libelf'
> > 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
> 
> 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
> 
> > libasm-devel = 0.176-alt1:sisyphus+221496.100.1.1
> > libelf-devel-static = 0.176-alt1:sisyphus+221496.100.1.1
> > [user@prodesk0 ~]$ 
> 
> But it wasn't. Probably because rpmbuild had difficulties with optimizing out
> in the presence of disttags...
> 
> I saw a similar situation with libbabel-devel -> 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.

$ egrep 'libdw-devel-static.*libasm-devel' /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
$
Comment 32 Ivan Zakharyaschev 2019-02-27 04:51:51 MSK
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 && *aE) && !(bE && *bE))
			cmp_rc = DEP_ST;
		else if ((bE && *bE) && !(aE && *aE))
			cmp_rc = DEP_WK;
	}
	/* 11. EVRs with DistTag are stronger. */
	if (cmp_rc == DEP_EQ)
	{
	    if ((aD && *aD) && !(bD && *bD))
		cmp_rc = DEP_ST;
	    else if ((bD && *bD) && !(aD && *aD))
		cmp_rc = DEP_WK;
	}

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

#if 0
	fprintf(stderr, "D: compare_sense_flags=%d: tag=%d, sense=%d, wcmp=%d, Asense=%#x, Bsense=%#x\n",
		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 && 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.
Comment 33 Ivan Zakharyaschev 2019-02-27 04:55:04 MSK
>     if (cmp_rc != rc && 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.

I'd rewrite it like this:

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

	return rc;
Comment 34 Ivan Zakharyaschev 2019-02-27 04:59:26 MSK
(In reply to comment #33)
> >     if (cmp_rc != rc && 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.
> 
> I'd rewrite it like this:
> 
>     if (cmp_rc != rc && !(cmp_rc == DEP_EQ || rc == DEP_EQ))
>         return DEP_UN;
> 
>     return rc;

That's not complete. We should then return the non-DEP_EQ value of the two.
Comment 35 Dmitry V. Levin 2019-02-27 05:01:13 MSK
(In reply to comment #32)
>     if (cmp_rc != rc && 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.

What's wrong here?  rc is returned iff cmp_rc == rc || cmp_rc == DEP_EQ.
Comment 36 Ivan Zakharyaschev 2019-02-27 05:05:59 MSK
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 && 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;
Comment 37 Dmitry V. Levin 2019-02-27 05:07:09 MSK
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?
Comment 38 Ivan Zakharyaschev 2019-02-27 06:06:22 MSK
(In reply to comment #36)
> 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 && 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;

No, this can't fix anything. rc can't be DEP_EQ. (It can be DEP_UN or DEP_ST or DEP_ST.)
Comment 39 Ivan Zakharyaschev 2019-02-27 06:09:18 MSK
(In reply to comment #37)
> 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?

Yes, probably I meant this (this seems to be equivalent to my code), but this can't fix anything, because rc can't be DEP_EQ...
Comment 40 Ivan Zakharyaschev 2019-02-27 07:10:55 MSK
commit 492396b532660f4debc46e96eb306f07a3261d66 (HEAD -> predisttag-fixes, @ALT/predisttag-fixes)
Author: Ivan Zakharyaschev <imz@altlinux.org>
Date:   Wed Feb 27 04:56:24 2019 +0300

    interdep.c: fix the optimization ("due to repentancy") 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 <imz@altlinux.org> 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 && (reqFv[i] & 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;
Comment 41 Ivan Zakharyaschev 2019-02-27 07:15:23 MSK
I'd commit this fix to Sisyphus, but not to other stable branches -- not to affect their stable deps.
Comment 42 Ivan Zakharyaschev 2019-02-28 01:54:24 MSK
(In reply to comment #27)
> As for the php7-ldap anomality, it'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's true that it should be rebuilt for this reason, too. (For the
> 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'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't see an unmet dependency php7-ldap->php7-libs, rpm won'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'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 "apt-get dist-upgrade", 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's not so for external interpackage deps from the list above. :(
Comment 43 Ivan Zakharyaschev 2019-02-28 01:57:03 MSK
(In reply to comment #42)
> (In reply to comment #27)
> > As for the php7-ldap anomality, it'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's true that it should be rebuilt for this reason, too. (For the
> > 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.

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't have this manual Provides.)

> php7-ldap and php7-libs are built from different srpms.
> 
> Therefore the dependency can't become strict (with a disttag).