-
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
vcpkg remove
does not update the status database after package removal
#13097
Comments
this is normal, the status is not immediately updated |
I understand that it does not cause problems in terms of functionality, however I would disagree that the database being in an inconsistent state is normal, but that is for you to decide. |
it's always been that way for as long as I can remember |
This design also causes #10812 |
@BillyONeal I think it's a vcpkg bug, or it's by design? |
Seems like a bug to me. |
vcpkg remove
does not update the status database after package removal
This is not a bug: the status database is more nuanced than a single file. Specifically, during execution, vcpkg writes update files that contain "deltas" to the status db. At any given point in time, the database should be considered as the sum of the status file and all update files. On launch, when loading the status db, vcpkg first performs a compacting step that computes the entire consolidated status file and writes that back out (atomically) to the status database. This is why you observe that running The reason to not write the database out on every update is that it would make installing N packages an O(N^2) operation -- every install step would need to re-write the binary paragraph of every install step before it. The reason to consolidate is to avoid needing to access O(N) files on every execution. tldr; not a bug, by design. |
Right so, what is the problem with updating the database after every COMMAND, if a command installs multiple packages it can still do that. |
The compressed version of the database could be written as part of |
Duplicated to #10812. |
Is your feature request related to a problem? Please describe.
The
Status:
field of a package does not get updated frominstall ok installed
immediately after its removal, a subsequent operation such aslist
is required for the database to be updated.Proposed solution
It should get updated immediately on a
remove
.Additional context
Here is the log from my terminal illustrating the issue:
The text was updated successfully, but these errors were encountered: