[pacman-dev] pacman-key: warn about time take for master key generation

Message ID 20201229133617.352304-1-allan@archlinux.org
State Accepted, archived
Headers show
Series [pacman-dev] pacman-key: warn about time take for master key generation | expand

Commit Message

Allan McRae Dec. 29, 2020, 1:36 p.m. UTC
Generating the pacman master key can take some time on systems
without enough entropy. Warn the user that the generation may
take some time.

Fixes FS#30286.

Signed-off-by: Allan McRae <allan@archlinux.org>
---
 scripts/pacman-key.sh.in | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in
index ccfd1b96..59162840 100644
--- a/scripts/pacman-key.sh.in
+++ b/scripts/pacman-key.sh.in
@@ -145,6 +145,8 @@  key_lookup_from_name() {
 
 generate_master_key() {
 	# Generate the master key, which will be in both pubring and secring
+	msg "$(gettext "Generating pacman master key. This may take some time.")
+
 	"${GPG_PACMAN[@]}" --gen-key --batch <<EOF
 %echo Generating pacman keyring master key...
 Key-Type: RSA