mottosso / bleeding-rez

Rez - Reproducible software environments for Windows, Linux and MacOS
GNU Lesser General Public License v3.0
72 stars 10 forks source link

platform_map and platform packages #52

Open mottosso opened 5 years ago

mottosso commented 5 years ago

Binding platform packages, and later adding a platform_map results in a mismatch between implicit and resulting packages.

# On Windows 10
$ rez bind os
$ rez env os
> $ exit
$ echo platform_map = {r"windows-10(.*)": r"windows-10"} >> rezconfig.py
$ rez env os
18:34:47 ERROR    PackageNotFoundError: Package could not be found: os==windows-10

Which is quite clear. The unclear message appears when a package depends on it.

rm rezconfig.py
mkdir mypackage
cd mypackage
echo name = "mypackage" >> package.py
echo version = "1.0" >> package.py
echo requires = ["os-windows-10"] >> package.py
echo build_command = False >> package.py
rez build --install
echo platform_map = {r"windows-10(.*)": r"windows-10"} >> rezconfig.py
rez env mypackage
The context failed to resolve:
The following package conflicts occurred: (os-windows-10 <--!--> ~os==windows-10)

Message is unclear as there is a package called windows-10.0.18648 following the call to rez bind