Settings to automatically erase previous system states

The states are made of:

  • A textfile with the list of packages that should be activated
  • A backup of the packages that were removed in the next state

This information is enough to get back from one state to the previous one. You can then repeat that process and get as far back as you need.

So, the simple solution here is to only remove the oldest states and never add “holes” in the history. This way we can always go back to any one of the remaining states if needed.

I think it makes sense to start by setting up this simple strategy, and integrate it in Haiku (maybe initially with a manual trigger, something like “pkgman clean-old-states”).

Then we can see about doing further things later:

  • Merging states so we can keep an older one but delete intermediate versions,
  • Triggering this automatically in some way.
6 Likes

I believe the option to keep some old version, remove most of the following intermediary states until the last several ones is useful for Haiku developers. When somebody works on a ticket about some regression, he may want to keep the old state where the problem does not exist yet and then keep the last several problematic states.

Perhaps same tool could set/switch state and that will be the one when you boot.