Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg-acquire-msys] Allow TOOLPATH to be detected/configured if MSYS2 installation is already present in the environment #11837

Open
julianxhokaxhiu opened this issue Jun 8, 2020 · 3 comments
Assignees
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly

Comments

@julianxhokaxhiu
Copy link
Contributor

julianxhokaxhiu commented Jun 8, 2020


Is your feature request related to a problem? Please describe.
At the current status, using vcpkg in CI environments is an issue as vcpkg expects to download an entire MSYS2 installation and configure it on each run. Not only this is a waste of resources ( CPU, Disk, Bandwidth ) but it wastes time as well as jobs will take longer to be completed.

AppVeyor, as CI provider, solved this by providing an already pre-configured MSYS2 environment in their agents, although it is currently not detected by vcpkg.

Proposed solution
The overall idea is allow vcpkg to configure the TOOLPATH externally, or ideally autodetect existing installations.

Describe alternatives you've considered
At the current state I'm simply overriding the vcpkg_acquire_msys.cmake file with a custom patched one which changes only this line: https://github.com/julianxhokaxhiu/ffmpegCI/blob/master/patch/scripts/cmake/vcpkg_acquire_msys.cmake#L39

Additional context

@ASxa86
Copy link

ASxa86 commented Jun 8, 2020

I believe this is similar if not the same thing I've been dealing with and had an issue made #7617. Major difference is, I don't have access to the internet.

@JackBoosY JackBoosY self-assigned this Jun 8, 2020
@JackBoosY
Copy link
Contributor

msys version will also be considered.
@emptyVoid What do you think?

@emptyVoid
Copy link
Contributor

We could add an environment variable VCPKG_MSYS2_ROOT (or VCPKG_MSYS2_PATH) overridable in a triplet, which if present would leverage user-supplied MSYS2 installation.

I haven't found any means to get MSYS2 version, and according to this stackoverflow answer we could only operate on pacman version or version of some other core package (e.g. msys2-runtime). I would take 5.0.2 as a minimally viable pacman version throwing an error if user provided MSYS2 is older (as the new core system upgrade scheme is supported since 5.0.1.6403). And 5.2 as the required pacman version making a core system upgrade if needed.

@JackBoosY JackBoosY added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label Jun 10, 2020
@JackBoosY JackBoosY added category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly and removed category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed labels May 11, 2021
@Cheney-W Cheney-W assigned Cheney-W and unassigned JackBoosY Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly
Projects
None yet
Development

No branches or pull requests

5 participants