From 70284f406f7aeb44160942946fdcb2ef62c8d261 Mon Sep 17 00:00:00 2001 From: Julien Nicoulaud Date: Sat, 18 Jan 2020 13:43:22 +0100 Subject: [PATCH] add basic support for --repositories option for Arch Linux --- mkosi | 13 +++++++++++++ mkosi.md | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/mkosi b/mkosi index f0d51204f..57ca60e0e 100755 --- a/mkosi +++ b/mkosi @@ -1923,6 +1923,19 @@ SigLevel = Required DatabaseOptional TrustAll [community] {server} +""") + + if args.repositories: + for repository in args.repositories: + # repositories must be passed in the form :: + repository_name, repository_server = repository.split('::', 1) + + # note: for additional repositories, signature checking options are set to pacman's default values + f.write(f"""\ + +[{repository_name}] +SigLevel = Optional TrustedOnly +Server = {repository_server} """) def run_pacman(args: List[str], **kwargs: Any) -> subprocess.CompletedProcess: diff --git a/mkosi.md b/mkosi.md index 0d63b37d7..beadc5990 100644 --- a/mkosi.md +++ b/mkosi.md @@ -181,7 +181,9 @@ details see the table below. one or more URLs as argument, separated by commas. This option may be used multiple times, in which case the list of repositories to use is combined. Use "!\*" to remove all repositories from to the list - or use e.g. "!repo-url" to remove just one specific repository. + or use e.g. "!repo-url" to remove just one specific repository. For Arch + Linux, additional repositories must be passed in the form `::` + (e.g. `myrepo::https://myrepo.net`). `--architecture=` -- 2.47.2