@@ -80,6 +80,8 @@ function create_sources_list_and_deploy_repo_key() {
80
80
81
81
declare distro=" "
82
82
83
+ APT_SIGNING_KEY_FILE=" /usr/share/keyrings/armbian-archive-keyring.gpg"
84
+
83
85
# Drop deboostrap sources leftovers
84
86
rm -f " ${basedir} /etc/apt/sources.list"
85
87
@@ -157,21 +159,23 @@ function create_sources_list_and_deploy_repo_key() {
157
159
;;
158
160
esac
159
161
160
- # add armbian key
161
- display_alert " Adding Armbian repository and authentication key" " ${when} :: /etc/apt/sources.list.d/armbian.sources" " info"
162
- mkdir -p " ${basedir} " /usr/share/keyrings
163
- # change to binary form
164
- APT_SIGNING_KEY_FILE=" /usr/share/keyrings/armbian-archive-keyring.gpg"
165
- gpg --dearmor < " ${SRC} " /config/armbian.key > " ${basedir}${APT_SIGNING_KEY_FILE} "
166
-
167
- # lets link to the old file as armbian-config uses it and we can't set there to new file
168
- # we user force linking as some old caches still exists
169
- chroot " ${basedir} " /bin/bash -c " ln -fs armbian-archive-keyring.gpg /usr/share/keyrings/armbian.gpg"
170
-
171
- # lets keep old way for old distributions
172
- if [[ " ${RELEASE} " =~ (focal| bullseye) ]]; then
173
- cp " ${SRC} " /config/armbian.key " ${basedir} "
174
- chroot " ${basedir} " /bin/bash -c " cat armbian.key | apt-key add - > /dev/null 2>&1"
162
+ # code to be made obsolete by making APA part of Armbian Core. #XXX
163
+ if [ ! $APA_IS_ACTIVE = " true" ]; then
164
+ # add armbian key
165
+ display_alert " Adding Armbian repository and authentication key" " ${when} :: /etc/apt/sources.list.d/armbian.sources" " info"
166
+ mkdir -p " ${basedir} " /usr/share/keyrings
167
+ # change to binary form
168
+ gpg --dearmor < " ${SRC} " /config/armbian.key > " ${basedir}${APT_SIGNING_KEY_FILE} "
169
+
170
+ # lets link to the old file as armbian-config uses it and we can't set there to new file
171
+ # we user force linking as some old caches still exists
172
+ chroot " ${basedir} " /bin/bash -c " ln -fs armbian-archive-keyring.gpg /usr/share/keyrings/armbian.gpg"
173
+
174
+ # lets keep old way for old distributions
175
+ if [[ " ${RELEASE} " =~ (focal| bullseye) ]]; then
176
+ cp " ${SRC} " /config/armbian.key " ${basedir} "
177
+ chroot " ${basedir} " /bin/bash -c " cat armbian.key | apt-key add - > /dev/null 2>&1"
178
+ fi
175
179
fi
176
180
177
181
# Add Armbian APT repository
0 commit comments