Skip to content

Commit 910bbf6

Browse files
anupam-gitazubieta
authored andcommitted
Fix #77 : Run gpg-agent before running pacman-key
1 parent 46db3a1 commit 910bbf6

File tree

1 file changed

+7
-2
lines changed
  • appimagebuilder/app_dir/deploy/pacman

1 file changed

+7
-2
lines changed

appimagebuilder/app_dir/deploy/pacman/venv.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
from appimagebuilder.common import shell
2222

23-
DEPENDS_ON = ["bsdtar", "pacman", "pacman-key", "fakeroot"]
23+
DEPENDS_ON = ["bsdtar", "pacman", "pacman-key", "fakeroot", "gpg-agent"]
2424

2525

2626
class PacmanVenvError(RuntimeError):
@@ -168,6 +168,11 @@ def _configure_keyring(self):
168168
)
169169
)
170170

171+
self._run_command(
172+
"{fakeroot} {gpg-agent} --homedir {gpgdir} --daemon",
173+
assert_success=False,
174+
wait_for_completion=False
175+
)
171176
self._run_command("{fakeroot} {pacman-key} --config {config} --init")
172177
self._run_command(
173178
"{fakeroot} {pacman-key} --config {config} --populate "
@@ -193,7 +198,7 @@ def _run_command(
193198
:param kwargs: additional params which should be passed to format
194199
:return:
195200
"""
196-
command = command.format(config=self._config_path, **self._deps, **kwargs)
201+
command = command.format(config=self._config_path, gpgdir=self._gpg_dir, **self._deps, **kwargs)
197202
# log it
198203
self._logger.debug(command)
199204

0 commit comments

Comments
 (0)