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

Avoid writing the status database for read-only commands. #1531

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

BillyONeal
Copy link
Member

Resolves microsoft/vcpkg#10812

Depends on #1529
Extracted from #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

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
src/vcpkg/vcpkglib.cpp Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot load status db when filesystem is readonly
1 participant