mkinitfs: support multiple comma separated repositories for alpine_repo
In initramfs-init.in
[1] add support to insert multiple repositories by parsing commas as separators for new lines when stdout is redirected to /etc/apk/repositories.
That way you can add both main
and community
repo and use pkgs=
to install a package from community
that has dependencies in main
.
Misplaced a PR on GitHub [2].
diff --git a/initramfs-init.in b/initramfs-init.in
index 4f96b7c..7fd602d 100755
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -239,7 +239,7 @@ relocate_mount() {
# find the dirs under ALPINE_MNT that are boot repositories
find_boot_repositories() {
if [ -n "$ALPINE_REPO" ]; then
- echo "$ALPINE_REPO"
+ echo "$ALPINE_REPO" | tr ',' '\n'
else
find /media/* -name .boot_repository -type f -maxdepth 3 \
| sed 's:/.boot_repository$::'
[1] https://git.alpinelinux.org/mkinitfs/tree/initramfs-init.in