-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Cannot load status db when filesystem is readonly #10812
Cannot load status db when filesystem is readonly #10812
Comments
@ras0219-msft @dan-shaw |
This is a vcpkg bug, but we'll need to fix other issues. |
This is by design but could use improvement. Vcpkg probably should compact the database on exit in addition to on startup. A workaround could be to issue a See #13097 (comment). |
Resolves microsoft/vcpkg#10812 Depends on microsoft#1529 Extracted from microsoft#1514 Splits database_load_check into database_load, which merely loads the current database, and database_load_collapse, which additionally smashes any outstanding update files. Splits get_installed_files into get_installed_files and get_installed_files_and_upgrade. The former avoids the format conversion and thus does not need to write. Reading commands database_load / get_installed_files: * export * list * owns * package_info * update Writing commands which use database_load_collapse / get_installed_files_and_upgrade. Also intend to call database_load_collapse at the end after successful completion so that the status file has all update records merged in where possible. * build * ci * install * remove * set-installed * upgrade
Describe the bug
Cannot load status db when filesystem is readonly
Environment
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error.
zlib:x64-windows 1.2.11-6 A compression library
Additional context
If
C:\vcpkg\installed\vcpkg\status
is written immediately beforevcpkg install
exits, instead of lazy write on subsequent load, it won't fail on a readonly filesystem.vcpkg update
andvcpkg upgrade
also fail.If you run
vcpkg list
once then make readonly, subsequentvcpkg list
will succeed.The text was updated successfully, but these errors were encountered: