Fix a bug in propagation of roll to highest version with LatestPatch (dotnet/core...
authorVitek Karas <vitek.karas@microsoft.com>
Wed, 5 Jun 2019 20:10:43 +0000 (13:10 -0700)
committerGitHub <noreply@github.com>
Wed, 5 Jun 2019 20:10:43 +0000 (13:10 -0700)
commitb3eed2d03cb66d264f37c4812d8c4bd04fbc8731
tree9145af44fbe537e13a8f8ced8b29c0d489e4978f
parentc02003420c2d816b6a0ed6df8b34a076f69c0c44
Fix a bug in propagation of roll to highest version with LatestPatch (dotnet/core-setup#6658)

* Fix a bug in propagation of roll to highest version when combined with LatestPatch.

LatestPatch setting should ignore "roll to highest version" semantics as it has its own rules:
* For release versions it will always roll to latest patch (regardless of roll_to_highest_version)
* For pre-release versions ti will roll to closest available (again regardless of roll_to_highest_version)

The bug was that the roll_to_highest_version was applied even for patch version compatibility range. For release versions this does not cause any trouble as it would always roll to latest patch anyway. But for pre-release this meant we would pick the latest available pre-release which is not desirable.

Co-Authored-By: Steve MacLean <stmaclea@microsoft.com>
Commit migrated from https://github.com/dotnet/core-setup/commit/8c95c49533f30d4b391e91ef088673dbf59451a2
src/installer/corehost/cli/fxr/fx_resolver.cpp
src/installer/test/HostActivationTests/FrameworkResolution/RollForwardMultipleFrameworks.cs