[haiku-development] System upgrade from medium - Questions

  • From: Niels Sascha Reedijk <niels.reedijk@xxxxxxxxx>
  • To: Haiku Development <haiku-development@xxxxxxxxxxxxx>
  • Date: Tue, 22 Sep 2020 17:37:57 +0100

Hi,

TL;DR Requesting Help on how to design System Updates from Medium

I have been playing around with the question around upgrading Haiku from a
medium. While for many users this is probably a feature that will not be
used too often, as they will most likely just use pkgman to update their
system, there is a class of users that may not have broadband or a network
connection that does not work, and that want to use a medium to keep up to
date.

I have a working WIP patch for pkgman which adds a command to do a full
sync from a Haiku installation medium, which will roughly be similar
behavior as the online pkgman route.

It does/will do the following steps:
1. Pre-check on the medium (does it have the system/packages and _packages_
directory, and system/settings/package_repositories directory, with at
least a Haiku and HaikuPorts file in it).
2. Pre-check: are we actually upgrading? (i.e. is installed Haiku version
older than the upgrade package)
3. Add the package directories to the solver, and do a local dist upgrade.
4. Copy the medium's package repositories to the system.

I have identified two gaps in this process. The first is that there will be
issues about new required system packages, that are not yet on the existing
system. Let's say that we decide to break out StyledEdit in a separate
package, but we still want it to be installed by default. I assume the
system upgrade route will not automatically install that package. I assume
this is also a gap in the current online system update. How would we solve
this? Would we introduce the possibility of a FullSync in the solver with a
list of required packages? Or do we solve this at the package level?

The second gap is that there are steps in the update/upgrade process that
have to do with updating a bootloader. So far it seem we have not made any
(incompatible) changes in our bootloader, but it seems to me like this is
potentially an issue with the online update.

Ideally, I feel like for consistency's sake, I would like to get to a stage
where the system upgrade can be actually done from the live medium. I don't
know if the package kit and/or package daemon currently would support the
logic of updating an existing system. That would be ideal.Any pointers here?

Regards,

N>

Other related posts: