Quoting Johannes Schauer Marin Rodrigues (2021-01-27 16:53:50) > Quoting Jonas Smedegaard (2021-01-27 16:15:17) > > I suspect that's not really the case - that instead apt tools might > > pick at random. > > no, apt does not pick at random. The apt solver prefers the first > alternative.
With the plural "apt tools" I mean not only /usr/bin/apt but all tools linked with /usr/lib/*/libapt-pkg.so.* (and tools implementing same interfaces in other ways, if such exist). Is there only one apt solver with only one possible configuration? Maybe the word "random" is the wrong one to use, but do all those tools always pick the first option in all cases? E.g. would they all _refuse_ to provide a solution that installed any packages if asked to install A, where A depends on B and C and B depends on "D1 or D2" and C depends on "D2 or D1"? - or which of those direct opposite "firsts" would in such scenario be deterministically picked? It is my (vague!) understanding that the resolver used by aptitude (and, I assume, all apt tools) has priority between direct alternatives as one factor but other factors exist as well and the order and weight of factors is configurable to some degree. > > It is my understanding that build daemons _ignore_ secondary entries > > exactly to avoid such ambiguity. > > More precisely: not only build daemons but sbuild (even if you run it > locally) strips out all but the first alternative for Build-Depends, > Build-Depends-Indep and Build-Depends-Arch, with the exception of > those alternatives that name the same package as the first > alternative. Thus, this does *not* have an effect on alternatives in > binary packages. Ah, I was unaware that _only_ build-dependencies was affected. Thanks! - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private
signature.asc
Description: signature