-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Have scripts/cmake/vcpkg_acquire_msys.cmake use the cache when available. #7617
Comments
It appears this is still an issue. Will there be any support for an offline version of vcpkg? I'm trying to update an air-gap network with the latest vcpkg but it doesn't seem like there is any support for building packages from cached libraries and tools. I'm still having to manually go in and modify vcpkg to skip downloading. |
@ASxa86, can you, please, try the following -- replace vcpkg/scripts/cmake/vcpkg_acquire_msys.cmake Line 168 in e792d1c
|
@emptyVoid I gave it a shot on a machine with no access to internet and it failed immediately with the following error:
Checking the msys-pacman-x64-windows-err.log:
|
Well that's a bit weird... I've just tried the same on my PC with Ethernet cable unplugged -- and the install succeeded. |
Yeah, I even confirmed I have all of the packages and the mingw32.db file on the machine. I wonder if my machine has some security restrictions applied that is preventing this from working. |
Hi @ASxa86 and @emptyVoid Thanks for posting this issue and joining in the discussion of this issue. Since it's similar to #11837. Let's track this issue and move our attention there. |
Is your feature request related to a problem? Please describe.
I am attempting to run vcpkg in an "offline" mode. By this, I mean I have all of the packages I need downloaded in my downloads folder. Then, on a machine with no internet connection, I run vcpkg install library. For the most part, this works well. There are a couple of libraries that depend on msys2 (ffmpeg, icu) and make use of the call vcpkg_acquire_msys(). The problem is this call will attempt to download msys2 packages from the internet even though I already have the msys2 packages downloaded and saved to a cache directory in $DOWNLOADS/tools/msys2/msys64/var/cache/pacman/pkg. This is preventing me from completing my builds with vcpkg.
Proposed solution
I propose that within vcpkg_acquire_msys.cmake:~106, before the call to vcpkg_execute_required_process() (this invokes the package query on the internet), there is a check made to the msys2 pacman cache to determine if the packages already exist. If they do, then there is nothing to do here.
Describe alternatives you've considered
My current work around is to comment out the call to vcpkg_execute_required_process() as I already have the msys2 packages installed but this becomes a maintenance issue whenever I need to update my offline version of vcpkg.
The text was updated successfully, but these errors were encountered: