pmb.helpers.repo.urls: use channels.cfg mirrordirs (MR 1912)

Use mirrordir_pmos and mirrordir_alpine from channels.cfg to generate
the mirror URLs for postmarketOS and Alpine, which get written to
/etc/apk/repositories and which postmarketOS uses to download the
APKINDEX files.

Remove hardcoded "master" at the end of the postmarketOS mirror and use
mirrordir_pmos instead (which is "master" for the edge channel). Let the
postmarketOS mirror end in a '/' for consistency with the Alpine mirror
in pmb/config/__init__.py.

Remove obsolete --alpine-version. To experiment with a different Alpine
version, one should pass a custom --config-channels from now on.
This commit is contained in:
Oliver Smith 2020-04-10 10:56:34 +02:00
parent 2fb98adf92
commit ce433ae012
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
9 changed files with 134 additions and 11 deletions

View file

@ -336,8 +336,6 @@ def arguments():
# Other
parser.add_argument("-V", "--version", action="version",
version=pmb.config.version)
parser.add_argument("-a", "--alpine-version", dest="alpine_version",
help="examples: edge, latest-stable, v3.5")
parser.add_argument("-c", "--config", dest="config",
default=pmb.config.defaults["config"],
help="path to pmbootstrap.cfg file (default in"