Skip to content

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

Merged
BillyONeal merged 7 commits intomicrosoft:mainfrom
BillyONeal:read-only-database
Dec 17, 2024
Merged

Avoid writing the status database for read-only commands.#1531
BillyONeal merged 7 commits intomicrosoft:mainfrom
BillyONeal:read-only-database

Conversation

@BillyONeal
Copy link
Copy Markdown
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
Comment thread src/vcpkg/vcpkglib.cpp Outdated
@BillyONeal BillyONeal merged commit b45524b into microsoft:main Dec 17, 2024
@BillyONeal BillyONeal deleted the read-only-database branch December 17, 2024 23:05
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

2 participants