fake-chane-repos
Some checks failed
/ lint (pull_request) Successful in 26s
/ deploy-edge (pull_request) Has been skipped
/ build-edge (pull_request) Failing after 31s

This commit is contained in:
Antoine Martin 2024-08-16 00:44:28 -04:00
parent 8ab85bddec
commit d3ae459fa7
Signed by: forge
GPG key ID: D62A472A4AA7D541

View file

@ -1,7 +1,7 @@
diff --git a/usr/local/bin/build.sh.orig b/usr/local/bin/build.sh diff --git a/usr/local/bin/build.sh.orig b/usr/local/bin/build.sh
old mode 100644 old mode 100644
new mode 100755 new mode 100755
index c3b8f7a..94df4e8 index c3b8f7a..1bc2dc2
--- a/usr/local/bin/build.sh.orig --- a/usr/local/bin/build.sh.orig
+++ b/usr/local/bin/build.sh +++ b/usr/local/bin/build.sh
@@ -7,13 +7,14 @@ @@ -7,13 +7,14 @@
@ -21,7 +21,7 @@ index c3b8f7a..94df4e8
: "${MAX_ARTIFACT_SIZE:=300000000}" #300M : "${MAX_ARTIFACT_SIZE:=300000000}" #300M
: "${CI_DEBUG_BUILD:=}" : "${CI_DEBUG_BUILD:=}"
@@ -67,10 +68,14 @@ report() { @@ -67,13 +68,22 @@ report() {
} }
get_release() { get_release() {
@ -39,7 +39,15 @@ index c3b8f7a..94df4e8
esac esac
} }
@@ -99,14 +104,14 @@ set_repositories_for() { +# hack to have vanilla changed-aports work
+changed_repos() {
+ echo "."
+}
+
build_aport() {
local repo="$1" aport="$2"
cd "$APORTSDIR/$repo/$aport"
@@ -99,13 +109,13 @@ set_repositories_for() {
local release local release
release=$(get_release) release=$(get_release)
@ -52,13 +60,11 @@ index c3b8f7a..94df4e8
[ "$repo" = "$target_repo" ] && break [ "$repo" = "$target_repo" ] && break
done done
- doas sh -c "printf '%s\n' $repos > /etc/apk/repositories" - doas sh -c "printf '%s\n' $repos > /etc/apk/repositories"
- doas apk update
+ doas sh -c "printf '%s\n' $repos >> /etc/apk/repositories" + doas sh -c "printf '%s\n' $repos >> /etc/apk/repositories"
+ doas apk update || true doas apk update
} }
apply_offset_limit() { @@ -118,7 +128,15 @@ apply_offset_limit() {
@@ -118,7 +123,15 @@ apply_offset_limit() {
} }
setup_system() { setup_system() {
@ -75,7 +81,7 @@ index c3b8f7a..94df4e8
doas apk -U upgrade -a || apk fix || die "Failed to up/downgrade system" doas apk -U upgrade -a || apk fix || die "Failed to up/downgrade system"
abuild-keygen -ain abuild-keygen -ain
doas sed -i -E 's/export JOBS=[0-9]+$/export JOBS=$(nproc)/' /etc/abuild.conf doas sed -i -E 's/export JOBS=[0-9]+$/export JOBS=$(nproc)/' /etc/abuild.conf
@@ -192,32 +205,22 @@ section_end setup @@ -192,32 +210,22 @@ section_end setup
build_start=$CI_ALPINE_BUILD_OFFSET build_start=$CI_ALPINE_BUILD_OFFSET
build_limit=$CI_ALPINE_BUILD_LIMIT build_limit=$CI_ALPINE_BUILD_LIMIT
@ -87,7 +93,7 @@ index c3b8f7a..94df4e8
- changed_aports_to_build=$(echo "$changed_aports_in_repo" | apply_offset_limit "$build_start" "$build_limit") - changed_aports_to_build=$(echo "$changed_aports_in_repo" | apply_offset_limit "$build_start" "$build_limit")
+set_repositories_for $(get_qubes_release) +set_repositories_for $(get_qubes_release)
+built_aports=0 +built_aports=0
+changed_aports_in_repo=$(changed_aports $BASEBRANCH) +changed_aports_in_repo=$(changed_aports $BASEBRANCH $repo)
+changed_aports_in_repo_count=$(echo "$changed_aports_in_repo" | wc -l) +changed_aports_in_repo_count=$(echo "$changed_aports_in_repo" | wc -l)
+changed_aports_to_build=$(echo "$changed_aports_in_repo" | apply_offset_limit "$build_start" "$build_limit") +changed_aports_to_build=$(echo "$changed_aports_in_repo" | apply_offset_limit "$build_start" "$build_limit")