From da63209e7c651dc33f91a32ca3174f4474db9829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Thorben=20Hinz?= Date: Sun, 12 May 2024 15:54:03 +0200 Subject: [PATCH] fixup! Support the use of additional APT repositories --- README.md | 4 +++- scripts/install_build_deps | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 37deadc..f4ca47a 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,9 @@ Optional and empty by default. #### `extra-repos` Extra APT repositories to configure as sources in the build environment. -Entries must be given in the “one-line-style format”, see + +Entries can be given in either format supported by APT: one-line style or +deb822 style, see [`man sources.list`](https://manpages.debian.org/sources.list.5). Optional and empty by default. diff --git a/scripts/install_build_deps b/scripts/install_build_deps index eceb6ed..c6f8700 100755 --- a/scripts/install_build_deps +++ b/scripts/install_build_deps @@ -24,7 +24,12 @@ fi # essential packages. It is reasonably safe to blindly assume it is installed. printf "man-db man-db/auto-update boolean false\n" | debconf-set-selections -printf "%s\n" "$INPUT_EXTRA_REPOS" >/etc/apt/sources.list.d/build-deb-action.list +if printf "%s\n" "$INPUT_EXTRA_REPOS" | grep -q '^deb'; then + extra_repos_ext=.list +else + extra_repos_ext=.sources +fi +printf "%s\n" "$INPUT_EXTRA_REPOS" >"/etc/apt/sources.list.d/build-deb-action${extra_repos_ext}" apt-get update