• Dependency meaning

    From Detlef Vollmann@21:1/5 to All on Thu Mar 21 10:10:02 2024
    This is essentially a follow-up on my question about the
    64bit time_t transition.
    I'm trying to upgrade some packages manually.
    For this, I'm trying to understand the dependencies.

    'apt-cache showpkg libssl3t64' gives me this:
    Dependencies:
    3.1.5-1.1 - libc6 (2 2.34) libssl3 (3 3.1.5-1.1) openssh-client (3 1:9.4p1) openssh-server (3 1:9.4p1) python3-m2crypto (3 0.38.0-4) libssl3 (0 (null)) libssl3:i386 (3 3.1.5-1.1) libssl3:i386 (0 (null)) openssh-client:i386 (3 1:9.4p1) openssh-server:
    i386 (3 1:9.4p1) python3-m2crypto:i386 (3 0.38.0-4) libssl3t64:i386 (35 3.1.5-1.1) libssl3t64:i386 (38 3.1.5-1.1)

    I'm trying to understand, what the numbers in parentheses mean.
    The second numbers are obviously version numbers.
    I guess the first numbers are dependency types, but I have no idea,
    what they mean.
    The man page says "For the specific meaning of the remainder of the
    output it is best to consult the apt source code."
    I'd like to avoid this. Can anybody point me to a list what these
    numbers mean?

    Detlef

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Wanderer@21:1/5 to Detlef Vollmann on Thu Mar 21 12:20:02 2024
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
    On 2024-03-21 at 05:02, Detlef Vollmann wrote:

    This is essentially a follow-up on my question about the
    64bit time_t transition.
    I'm trying to upgrade some packages manually.
    For this, I'm trying to understand the dependencies.

    'apt-cache showpkg libssl3t64' gives me this:

    You might also try 'apt-cache show libssl3t64', and compare the dependency-related parts of the results.

    Dependencies:
    3.1.5-1.1 - libc6 (2 2.34) libssl3 (3 3.1.5-1.1) openssh-client (3 1:9.4p1) openssh-server (3 1:9.4p1) python3-m2crypto (3 0.38.0-4) libssl3 (0 (null)) libssl3:i386 (3 3.1.5-1.1) libssl3:i386 (0 (null)) openssh-client:i386 (3 1:9.4p1) openssh-server:
    i386 (3 1:9.4p1) python3-m2crypto:i386 (3 0.38.0-4) libssl3t64:i386 (35 3.1.5-1.1) libssl3t64:i386 (38 3.1.5-1.1)

    I'm trying to understand, what the numbers in parentheses mean.
    The second numbers are obviously version numbers.
    I guess the first numbers are dependency types, but I have no idea,
    what they mean.
    The man page says "For the specific meaning of the remainder of the
    output it is best to consult the apt source code."
    I'd like to avoid this. Can anybody point me to a list what these
    numbers mean?

    I don't think I even knew 'showpkg' was a verb for apt-cache, before this.

    That said, by comparing against the output of 'apt-cache show' for the
    same package name: it looks as if '2' is 'Depends:' and '3' is
    'Breaks:'. I'm less sure about '35' and '38', but they might be
    'Replaces:' and 'Provides" in some order.

    I was actually running the commands against the non-'t64' version of
    the package, because the one with that suffix isn't available in my
    configured repositories yet. That one doesn't include the '0'
    dependencies. Based on the fact that those dependencies are listed for
    the 't64' version of the package, my guess is that '0' is 'Conflicts:'.

    --
    The Wanderer

    The reasonable man adapts himself to the world; the unreasonable one
    persists in trying to adapt the world to himself. Therefore all
    progress depends on the unreasonable man. -- George Bernard Shaw


    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEEJCOqsZEc2qVC44pUBKk1jTQoMmsFAmX8F6MACgkQBKk1jTQo Mms4JA/5AQkOhgFFloIiEmje/ATGFcEXNTEqWCo6XucKZ1Eu8CMynLmBjM8i52aE hU6CdDUn0od31Li1arUuZRycukRsHickNEMWu8hvzXbgdETP9GyKoU9t4m00QFPr CKUn3MP2feqZzCiUhZr3zzYwNftxYrrNxfo/4y2fi0Gz8AiziE7RWQSn9sUoAbQu EyPftTglaQNP8Kn/3ArkNCQ9SelxdLGFcDY00yiat7BN0Mo/uatpLUAXVsJNMtUf iddfkBFF/X2N6pngkLLEf6qqSklKJXUOfy9oA0gwssaApEZLKOdRRpt8Ew41rJ4V I7Py4FUR28DqUplhQsg9/pIdpi9YbSVmkdairA35PohpJGnoF6ukzKaHIfAkCrkt sApKd7O04SGDPRdoMffihX7PIcil8yea5IT4tv1nRM9QJqFCRgAUSXekyNYkz8Oc WrLQ28gPm86svOMqAj0OkfknMyFIcDnzKCv3Csg9nJr6m74JE/2e0RS/JBL8iLR5 2qjb24wVTyMtr+7WWFMhBSJsU5hSD8rziLHwe0FPE3Y4xk09kSKYnfd+cxWNvt6p +rrjFQnoHZryMhIBupiKgXmyFGxz8tiowYtu3BsfAgV0mI+dpDZYjdyOFU8lbxgO t++tuOYXmspR/PaRj2T8SpvdQVCp
  • From Sven Joachim@21:1/5 to Detlef Vollmann on Thu Mar 21 23:10:01 2024
    On 2024-03-21 10:02 +0100, Detlef Vollmann wrote:

    This is essentially a follow-up on my question about the
    64bit time_t transition.
    I'm trying to upgrade some packages manually.
    For this, I'm trying to understand the dependencies.

    'apt-cache showpkg libssl3t64' gives me this:
    Dependencies: 3.1.5-1.1 - libc6 (2 2.34) libssl3 (3 3.1.5-1.1)
    openssh-client (3 1:9.4p1) openssh-server (3 1:9.4p1)
    python3-m2crypto (3 0.38.0-4) libssl3 (0 (null)) libssl3:i386 (3
    3.1.5-1.1) libssl3:i386 (0 (null)) openssh-client:i386 (3 1:9.4p1)
    openssh-server:i386 (3 1:9.4p1) python3-m2crypto:i386 (3 0.38.0-4)
    libssl3t64:i386 (35 3.1.5-1.1) libssl3t64:i386 (38 3.1.5-1.1)

    I'm trying to understand, what the numbers in parentheses mean.
    The second numbers are obviously version numbers.
    I guess the first numbers are dependency types, but I have no idea,
    what they mean.
    The man page says "For the specific meaning of the remainder of the
    output it is best to consult the apt source code."
    I'd like to avoid this. Can anybody point me to a list what these
    numbers mean?

    No, but I can point you to the source code. In cmdline/apt-cache.cc we
    can find this passage where "Dependencies:" is printed:

    ,----
    | cout << "Dependencies: " << endl;
    | for (pkgCache::VerIterator Cur = Pkg.VersionList(); Cur.end() != true; ++Cur)
    | {
    | cout << Cur.VerStr() << " - ";
    | for (pkgCache::DepIterator Dep = Cur.DependsList(); Dep.end() != true; ++Dep)
    | cout << Dep.TargetPkg().FullName(true) << " (" << (int)Dep->CompareOp << " " << DeNull(Dep.TargetVer()) << ") ";
    | cout << endl;
    | }
    `----

    Don't worry if you do not understand everything, neither do I. The
    mysterious first number is (int)Dep->CompareOp, so we need to figure out
    what that is. The "Dep" structure is declared in apt-pkg/pkgcache.h:

    ,----
    | // These are all the constants used in the cache structures
    |
    | // WARNING - if you change these lists you must also edit
    | // the stringification in pkgcache.cc and also consider whether
    | // the cache file will become incompatible.
    | struct Dep
    | {
    | enum DepType {Depends=1,PreDepends=2,Suggests=3,Recommends=4,
    | Conflicts=5,Replaces=6,Obsoletes=7,DpkgBreaks=8,Enhances=9};
    | /** \brief available compare operators
    |
    | The lower 4 bits are used to indicate what operator is being specified and
    | the upper 4 bits are flags. OR indicates that the next package is
    | or'd with the current package. */
    | enum DepCompareOp {NoOp=0,LessEq=0x1,GreaterEq=0x2,Less=0x3,
    | Greater=0x4,Equals=0x5,NotEquals=0x6,
    | Or=0x10, /*!< or'ed with the next dependency */
    | MultiArchImplicit=0x20, /*!< generated internally, not spelled out in the index */
    | ArchSpecific=0x40 /*!< was decorated with an explicit architecture in index */
    | };
    | };
    `----

    Using that information it is possible to decipher the numbers. For
    example, "libc6 (2 2.34)" means that libssl3t64 has a relationship with
    libc6 (>= 2.34), "libssl3 (3 3.1.5-1.1)" means a relationship with
    libssl3 (<< 3.1.5-1.1), and the strange numbers 35 and 38 for
    libssl3t64:i386 appear because 0x20 (==32) is added (the
    MultiArchImplicit flag).

    How useful is all that? Probably not much, considering that we cannot
    even tell the type of relation. It is probably better to just use
    "apt-cache show".

    Cheers,
    Sven

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)