Skip to content

pmbootstrap init: release channel selection

Oliver Smith requested to merge channels into master

Find the detailed changes in the commit messages. Please look at each commit on its own while reviewing, as there are quite a few. I have created a release/20.04 branch in pmaports.git for testing purposes, currently it is almost the same as master except that the channel in pmaports.cfg was set to stable.

Please start reviewing, even if potentially tests are still failing. The earlier we get this in, the earlier we can get the first postmarketOS release going 😃

Closes: #1855 (closed)

Demo

After asking for the work dir and cloning pmaports.git...

$ pmbootstrap init
[15:29:26] Location of the 'work' path. Multiple chroots (native, device arch, device rootfs) will be created in there.
[15:29:26] Work path [/home/user/.local/var/pmbootstrap]: 
[15:29:27] NOTE: pmaports path: /home/user/.local/var/pmbootstrap/cache_git/pmaports

...pmbootstrap will now ask for the release channel. The currently active channel is read from pmaports.cfg (unless this is the first run, then it suggests the recommended channel from channels.cfg).

[15:29:27] Choose the postmarketOS release channel.
[15:29:27] Available (2):
[15:29:27] * edge: Rolling release channel
[15:29:27] * stable: Upcoming beta release (WIP, DO NOT USE!)
[15:29:27] Channel [edge]:

If the user selects a different channel, pmbootstrap proceeds to change the pmaports branch to the branch specified for the channel in channels.cfg.

[15:29:27] Channel [edge]: stable
[15:29:30] Currently checked out branch 'master' of pmaports.git is on channel 'edge'.
[15:29:30] Switching to branch 'release/20.04' on channel 'stable'...
[15:29:31] Unregister qemu binfmt (arm)
[15:29:31] Unregister qemu binfmt (aarch64)
Switched to a new branch 'release/20.04'
Branch 'release/20.04' set up to track remote branch 'release/20.04' from 'origin'.
[15:29:31] Choose your target device vendor (either an existing one, or a new one for porting).

This is how it looks like, when switching the branch fails (git checkout output is passed through):

[15:39:43] Channel [edge]: stable
[15:39:44] Currently checked out branch 'master' of pmaports.git is on channel 'edge'.
[15:39:44] Switching to branch 'release/20.04' on channel 'stable'...
error: Your local changes to the following files would be overwritten by checkout:
        pmaports.cfg
Please commit your changes or stash them before you switch branches.
Aborting
[15:39:44] ERROR: Failed to switch branch. Go to your pmaports and fix what git complained about, then try again: /home/user/.local/var/pmbootstrap/cache_git/pmaports
[15:39:44] See also: <https://postmarketos.org/troubleshooting>
Run 'pmbootstrap log' for details.
Edited by Oliver Smith

Merge request reports

Loading