Skip to content

Commit 46db3a1

Browse files
anupam-gitazubieta
authored andcommitted
Populate all available keyrings
1 parent 0446449 commit 46db3a1

File tree

1 file changed

+10
-1
lines changed
  • appimagebuilder/app_dir/deploy/pacman

1 file changed

+10
-1
lines changed

appimagebuilder/app_dir/deploy/pacman/venv.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#
1010
# The above copyright notice and this permission notice shall be included in
1111
# all copies or substantial portions of the Software.
12+
import glob
1213
import logging
1314
import os
1415
import re
@@ -160,9 +161,17 @@ def _generate_config(self):
160161
f.write("Server = %s\n" % server)
161162

162163
def _configure_keyring(self):
164+
keyrings = list(
165+
map(
166+
lambda x: x.split('.gpg')[0],
167+
[os.path.basename(x) for x in glob.glob('/usr/share/pacman/keyrings/*.gpg')]
168+
)
169+
)
170+
163171
self._run_command("{fakeroot} {pacman-key} --config {config} --init")
164172
self._run_command(
165-
"{fakeroot} {pacman-key} --config {config} --populate archlinux"
173+
"{fakeroot} {pacman-key} --config {config} --populate "
174+
f"{' '.join(keyrings)}"
166175
)
167176

168177
def _run_command(

0 commit comments

Comments
 (0)