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

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

    <bug>
          <bug_id>58830</bug_id>
          
          <creation_ts>2026-04-22 13:13:49 +0300</creation_ts>
          <short_desc>apt-cache whatdepends does not notice direct/alternative deps; selects only one instance for the named package</short_desc>
          <delta_ts>2026-04-22 13:25:25 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>apt</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>boyarsh</cc>
    
    <cc>glebfm</cc>
    
    <cc>imz</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>286149</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2026-04-22 13:13:49 +0300</bug_when>
    <thetext>$ ~/hasher/aptbox/apt-cache whatdepends librpmbuild7
librpmbuild7-4.13.0.1-alt44@1776845801
  librpmbuild7-debuginfo-4.13.0.1-alt44@1776845801
    Depends: librpmbuild7 = 4.13.0.1-alt44
  dnf5-plugins-5.4.0.0-alt1:sisyphus+411009.2.6.1@1773309762
    Depends: &lt;librpmbuild.so.7()(64bit)&gt;
      librpmbuild7-4.13.0.1-alt44@1776845801
$

&quot;whatdepends&quot; lists too little. At least, no direct dependencies, which are known to be shown by &quot;showpkg&quot;:

$ ~/hasher/aptbox/apt-cache showpkg librpmbuild7
Package: librpmbuild7
Versions: 
4.13.0.1-alt44@1776845801(/tmp/.private/imz/hasher/repo/x86_64/RPMS.hasher/)
4.13.0.1-alt44:sisyphus+405580.200.3.1@1768927476(/tmp/.private/imz/hasher/aptbox/var/lib/apt/lists/../../../../../apt-lists/ftp.altlinux.org_pub_distributions_ALTLinux_Sisyphus_x86%5f64_base_pkglist.classic)(/tmp/.private/imz/hasher/aptbox/var/lib/rpm/Packages)

Reverse Depends: 
  rpmspec,librpmbuild7 4.13.0.1-alt44:sisyphus+405580.200.3.1
  python3-module-rpm,librpmbuild7 4.13.0.1-alt44:sisyphus+405580.200.3.1
  python-module-rpm,librpmbuild7 4.13.0.1-alt44:sisyphus+405580.200.3.1
  librpm-devel,librpmbuild7 4.13.0.1-alt44:sisyphus+405580.200.3.1
  rpmspec,librpmbuild7 4.13.0.1-alt44
  librpm-devel,librpmbuild7 4.13.0.1-alt44
  python-module-rpm,librpmbuild7 4.13.0.1-alt44
  python3-module-rpm,librpmbuild7 4.13.0.1-alt44
  librpmbuild7-debuginfo,librpmbuild7 4.13.0.1-alt44
Dependencies: 
4.13.0.1-alt44@1776845801 - libc.so.6(GLIBC_2.15)(64bit) (0 (null)) libcap.so.2()(64bit) (2 set:kirQLhjUBY0) libmagic.so.1()(64bit) (2 set:ifeePaApd4op02) libpopt.so.0()(64bit) (2 set:jftck0pY4jRJWvaCunRMZrjSd) librpm7 (5 4.13.0.1-alt44) 
4.13.0.1-alt44:sisyphus+405580.200.3.1@1768927476 - libc.so.6(GLIBC_2.15)(64bit) (0 (null)) libcap.so.2()(64bit) (2 set:kirQLhjUBY0) libmagic.so.1()(64bit) (2 set:ifeePaApd4op02) libpopt.so.0()(64bit) (2 set:jftck0pY4jRJWvaCunRMZrjSd) librpm7 (5 4.13.0.1-alt44:sisyphus+405580.200.3.1) 
Provides: 
4.13.0.1-alt44@1776845801 - librpmbuild7 librpmbuild.so.7()(64bit) 
4.13.0.1-alt44:sisyphus+405580.200.3.1@1768927476 - librpmbuild7 librpmbuild.so.7()(64bit) 
Reverse Provides: 
librpmbuild7 4.13.0.1-alt44:sisyphus+405580.200.3.1@1768927476
librpmbuild7 4.13.0.1-alt44@1776845801
$

Actually, the results of &quot;whatdepends&quot; are quite different in the host system (with the same apt, but p11 as the sources):

# apt-cache whatdepends librpmbuild7
librpmbuild7-4.13.0.1-alt40:p11+348761.100.1.1@1716479364
  i586-librpmbuild7.32bit-4.13.0.1-alt40:p11+348761.100.1.1@1716481322
    Depends: librpmbuild7 = 4.13.0.1-alt40:p11+348761.100.1.1
  rpmspec-4.13.0.1-alt40:p11+348761.100.1.1@1716479364
    Depends: librpmbuild7 = 4.13.0.1-alt40:p11+348761.100.1.1
  python3-module-rpm-4.13.0.1-alt40:p11+348761.100.1.1@1716479364
    Depends: librpmbuild7 = 4.13.0.1-alt40:p11+348761.100.1.1
  python-module-rpm-4.13.0.1-alt40:p11+348761.100.1.1@1716479364
    Depends: librpmbuild7 = 4.13.0.1-alt40:p11+348761.100.1.1
  librpm-devel-4.13.0.1-alt40:p11+348761.100.1.1@1716479364
    Depends: librpmbuild7 = 4.13.0.1-alt40:p11+348761.100.1.1
#

I&apos;d say they are complete (as expected):

# apt-cache showpkg librpmbuild7
Package: librpmbuild7
Versions: 
4.13.0.1-alt40:p11+348761.100.1.1@1716479364(/var/lib/apt/lists/ftp.altlinux.org_pub_distributions_ALTLinux_p11_branch_x86%5f64_base_pkglist.classic)(/var/lib/rpm/Packages)

Reverse Depends: 
  i586-librpmbuild7.32bit,librpmbuild7 4.13.0.1-alt40:p11+348761.100.1.1
  rpmspec,librpmbuild7 4.13.0.1-alt40:p11+348761.100.1.1
  python3-module-rpm,librpmbuild7 4.13.0.1-alt40:p11+348761.100.1.1
  python-module-rpm,librpmbuild7 4.13.0.1-alt40:p11+348761.100.1.1
  librpm-devel,librpmbuild7 4.13.0.1-alt40:p11+348761.100.1.1
Dependencies: 
4.13.0.1-alt40:p11+348761.100.1.1@1716479364 - libc.so.6(GLIBC_2.15)(64bit) (0 (null)) libcap.so.2()(64bit) (2 set:kirQLhjUBY0) libmagic.so.1()(64bit) (2 set:ifeePaApd4op02) libpopt.so.0()(64bit) (2 set:jftck0pY4jRJWvaCunRMZrjSd) librpm7 (5 4.13.0.1-alt40:p11+348761.100.1.1) 
Provides: 
4.13.0.1-alt40:p11+348761.100.1.1@1716479364 - librpmbuild7 librpmbuild.so.7()(64bit) 
Reverse Provides: 
librpmbuild7 4.13.0.1-alt40:p11+348761.100.1.1@1716479364
#

How to reproduce:

apt-0.5.15lorg2-alt100.x86_64
hasher-1.7.4-alt1.noarch


In this case, I rebuilt rpm from sisyphus in hasher first.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286152</commentid>
    <comment_count>1</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2026-04-22 13:25:25 +0300</bug_when>
    <thetext>Now I see a part of the reason. The reason is that a specific instance of the named package is selected (in this case, the rebuilt one):

$ ~/hasher/aptbox/apt-cache whatdepends librpmbuild7
librpmbuild7-4.13.0.1-alt44@1776845801

but it&apos;s impossible to specify a different one on the command line: 4.13.0.1-alt44:sisyphus+405580.200.3.1@1768927476

[imz@cheval ~]$ ~/hasher/aptbox/apt-cache whatdepends librpmbuild7=&apos;4.13.0.1-alt44:sisyphus+405580.200.3.1@1768927476&apos;
W: Unable to locate package librpmbuild7=4.13.0.1-alt44:sisyphus+405580.200.3.1@1768927476
[imz@cheval ~]$ ~/hasher/aptbox/apt-cache whatdepends librpmbuild7-&apos;4.13.0.1-alt44:sisyphus+405580.200.3.1@1768927476&apos;
W: Unable to locate package librpmbuild7-4.13.0.1-alt44:sisyphus+405580.200.3.1@1768927476
[imz@cheval ~]$ ~/hasher/aptbox/apt-cache whatdepends librpmbuild7-&apos;4.13.0.1-alt44:sisyphus+405580.200.3.1&apos;
W: Unable to locate package librpmbuild7-4.13.0.1-alt44:sisyphus+405580.200.3.1
[imz@cheval ~]$ ~/hasher/aptbox/apt-cache whatdepends librpmbuild7=&apos;4.13.0.1-alt44:sisyphus+405580.200.3.1&apos;
W: Unable to locate package librpmbuild7=4.13.0.1-alt44:sisyphus+405580.200.3.1
[imz@cheval ~]$ ~/hasher/aptbox/apt-cache whatdepends librpmbuild7=&apos;4.13.0.1-alt44&apos;
W: Unable to locate package librpmbuild7=4.13.0.1-alt44
[imz@cheval ~]$ ~/hasher/aptbox/apt-cache whatdepends librpmbuild7-&apos;4.13.0.1-alt44&apos;
W: Unable to locate package librpmbuild7-4.13.0.1-alt44
[imz@cheval ~]$ 

And this doesn&apos;t justify it not showing the direct deps from the newly rebuilt packages, like this one:

$ ~/hasher/aptbox/apt-cache depends rpmspec
rpmspec-4.13.0.1-alt44@1776845801
  Depends: &lt;/lib64/ld-linux-x86-64.so.2&gt;
    glibc-core-6:2.40.0.224.573a-alt1:sisyphus+413851.100.2.1@1775135301
  Depends: &lt;libpopt.so.0()(64bit)&gt;
    libpopt-1:1.18-alt1:sisyphus+283609.300.5.1@1630003299
  Depends: librpmbuild7 = 4.13.0.1-alt44
  Conflicts: rpm &lt; 4.13.0-alt6
$

Maybe it doesn&apos;t show it because there is an alternative way to satisfy it (not only librpmbuild7-4.13.0.1-alt44@1776845801 , but also librpmbuild7 4.13.0.1-alt44:sisyphus+405580.200.3.1@1768927476)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>