What takes priority: build number or build string?

0 views
Skip to first unread message

Stuart Berg

unread,
May 29, 2015, 2:43:19 PM5/29/15
to conda
Hi,

When multiple packages with identical version exist on binstar, which one will be selected?  The one with the highest build number (as extracted from index.json, not the package filename), or the one with the "highest" build string?

I thought the build string was merely for human-readable purposes and that the build number was the important item for dependency resolution, but I seem to be wrong about that.

Best,
Stuart

Ilan Schnell

unread,
May 29, 2015, 2:48:00 PM5/29/15
to Stuart Berg, conda
Hi Stuart,
you are correct.  The build string is merely for human readability, and the (integer) build number is the deciding factor when it comes to sorting conda packages which identical name and version.

- Ilan

--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+un...@continuum.io.
To post to this group, send email to co...@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.

Aaron Meurer

unread,
May 29, 2015, 3:04:35 PM5/29/15
to Ilan Schnell, Stuart Berg, conda
The build string is only used to break ties consistently if the package name, version, and build numbers are identical. If conda finds a package solution with two packages that differ only by build string it will print a message to the screen (something like 

Warning: 4 possible package resolutions (only showing differing packages):
['r-chron-2.3_45-r3.1.3_0.tar.bz2', 'r-data.table-1.9.4-r3.1.3_0.tar.bz2'],
['r-chron-2.3_45-0.tar.bz2', 'r-data.table-1.9.4-r3.1.3_0.tar.bz2'],
['r-chron-2.3_45-0.tar.bz2', 'r-data.table-1.9.4-0.tar.bz2'],
['r-chron-2.3_45-r3.1.3_0.tar.bz2', 'r-data.table-1.9.4-0.tar.bz2'],

You can see in this example there are two versions of both r-chron and r-data.table that differ only by build string. Conda does pick one, and it breaks the tie using the build string (so it will be consistent between runs), but it's best to avoid this situation if possible. Under normal circumstances, if a package has a newer build number, it will be chosen over the version with the lower build number. 

Aaron Meurer

Antoine Pitrou

unread,
May 29, 2015, 3:52:33 PM5/29/15
to co...@continuum.io
On Fri, 29 May 2015 13:47:59 -0500
Ilan Schnell <il...@continuum.io> wrote:

> Hi Stuart,
> you are correct. The build string is merely for human readability, and the
> (integer) build number is the deciding factor when it comes to sorting
> conda packages which identical name and version.

Would be nice to say so in the docs :)

Regards

Antoine.


Reply all
Reply to author
Forward
0 new messages