conan-io / conan-package-tools

Conan Package Tools. Helps with massive package creation and CI integration (Travis CI, Appveyor...)
MIT License
165 stars 70 forks source link

do not change the order of the remotes #614

Open Basti-D opened 1 year ago

Basti-D commented 1 year ago

Changelog: (Bugfix):

Fixes #613

Do not change the order of the remotes by using the default value from the Conan API instead of -1 in add_remotes_to_conan -> _add_remote

Probably in Remotesmanager._add_remote the default argument of insert should be changed to None instead of False. The ConanAPI uses None as a the default value. The default value False gets treated differently then None . False gets interpreted as not None , hence we go in the insert_by_index case. index = int(False) = 0`` Hence it will put always to the beginning. The current version usesindex=-1` which does *not* push to the end. It pushes toend -1, i.e. 1 BEFORE the last element. None` has it's own handling and adds the remote to the end of the remotes OrderedDict which should be the correct behavior [see remote_registry.py : Remotes._remotes].

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.