1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 03:19:47 +03:00

pmb.helpers.git: parse channels.cfg (MR 1912)

Prepare to base postmarketOS on Alpine stable by parsing the new
channels.cfg file in pmaports.git, that describes which channel
needs which branches and mirror dirs from postmarketOS and Alpine.

Use the information in pmb.helpers.git.get_branches_official() first,
more is coming in follow-up commits.

Read the file from origin/master, so we get the latest fetched version
even if the last checked out master branch is not up-to-date (think of
currently checked out release branch instead of master, master will
never be updated to point to latest origin/master). Allow to override
the file with a new --config-channels parameter.

Related: https://postmarketos.org/channels.cfg
This commit is contained in:
Oliver Smith 2020-02-27 23:04:38 +01:00
parent ed16a9d080
commit c616874443
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
5 changed files with 102 additions and 5 deletions

View file

@ -3,6 +3,7 @@
import copy
import os
import pmb.config
import pmb.helpers.git
""" This file constructs the args variable, which is passed to almost all
functions in the pmbootstrap code base. Here's a listing of the kind of
@ -131,7 +132,8 @@ def add_cache(args):
"find_aport": {},
"pmb.helpers.package.depends_recurse": {},
"pmb.helpers.package.get": {},
"pmb.helpers.repo.update": repo_update})
"pmb.helpers.repo.update": repo_update,
"pmb.helpers.git.parse_channels_cfg": {}})
def add_deviceinfo(args):
@ -162,6 +164,8 @@ def init(args):
"pull", "shutdown", "zap"]:
pmb.config.pmaports.read_config_into_args(args)
add_deviceinfo(args)
pmb.helpers.git.parse_channels_cfg(args)
return args