Summary: | for old rpm+apt, arepo pkgs have unmet deps | ||
---|---|---|---|
Product: | Sisyphus | Reporter: | Ivan Zakharyaschev <imz> |
Component: | rpm-build | Assignee: | 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
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. 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) (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) $ 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 (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. (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 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 (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 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 . (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. 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... (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. (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 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 ? (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? (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. (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. 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. (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. (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 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. (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. 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) 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 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]$ (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. 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.) (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). (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. (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. (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 $ 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.
> 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;
(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. (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. 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; 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? (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.) (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... 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; I'd commit this fix to Sisyphus, but not to other stable branches -- not to affect their stable deps. (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. :( (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). |