Skip to content

Commit ffbd297

Browse files
am11akoeplinger
authored andcommitted
Refactor keyring block
1 parent 3493dfb commit ffbd297

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

eng/common/cross/build-rootfs.sh

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,14 @@ elif [[ "$__CodeName" == "haiku" ]]; then
782782
popd
783783
rm -rf "$__RootfsDir/tmp"
784784
elif [[ -n "$__CodeName" ]]; then
785+
__UpdateOptions=
786+
if [[ "$__SkipSigCheck" == "0" ]]; then
787+
__Keyring="$__Keyring --force-check-gpg"
788+
else
789+
__Keyring=
790+
__UpdateOptions="--allow-unauthenticated --allow-insecure-repositories"
791+
fi
792+
785793
if [[ "$__SkipEmulation" == "1" ]]; then
786794
if [[ -z "$AR" ]]; then
787795
if command -v ar &>/dev/null; then
@@ -797,10 +805,6 @@ elif [[ -n "$__CodeName" ]]; then
797805
# shellcheck disable=SC2086
798806
suites="$__CodeName $__DebianSuites $(echo $__UbuntuSuites | xargs -n 1 | xargs -I {} echo -n "$__CodeName-{} ")"
799807

800-
if [[ "$__SkipSigCheck" == "0" ]]; then
801-
__Keyring="$__Keyring --force-check-sig"
802-
fi
803-
804808
PYTHON=${PYTHON_EXECUTABLE:-python3}
805809

806810
# shellcheck disable=SC2086,SC2046
@@ -816,14 +820,6 @@ elif [[ -n "$__CodeName" ]]; then
816820
exit 0
817821
fi
818822

819-
__UpdateOptions=
820-
if [[ "$__SkipSigCheck" == "0" ]]; then
821-
__Keyring="$__Keyring --force-check-gpg"
822-
else
823-
__Keyring=
824-
__UpdateOptions="--allow-unauthenticated --allow-insecure-repositories"
825-
fi
826-
827823
# shellcheck disable=SC2086
828824
echo running debootstrap "--variant=minbase" $__Keyring --arch "$__UbuntuArch" "$__CodeName" "$__RootfsDir" "$__UbuntuRepo"
829825

0 commit comments

Comments
 (0)