add ability to add gnupg public keys in building git packages#898
add ability to add gnupg public keys in building git packages#898Dylan1496 wants to merge 2 commits intoactionless:masterfrom
Conversation
|
thanks!
please make it an optional dependency instead (and optional import, right before your second prompt, if can't import - just print that opt dep missing -> re-show main recovery prompt again) and add to makedeps here: https://github.com/actionless/pikaur/blob/master/pikaur_static/PKGBUILD and also resolve CI linting errors |
| gnupghome = self.build_gpgdir | ||
| logger.debug("Using gnupg directory: {}", gnupghome) | ||
| gpg = GPG(gnupghome=gnupghome, verbose=True) | ||
| gpg.recv_keys("keyserver.ubuntu.com", answer2) |
There was a problem hiding this comment.
shouldn't keyserver be configurable?
| self.get_latest_dev_sources(check_dev_pkgs=check_dev_pkgs) | ||
| return | ||
| if answer == translate("g"): # pragma: no cover | ||
| prompt2 = translate("Enter a valid GnuPG key: ") |
There was a problem hiding this comment.
also would be better to extract it to a function
| @@ -375,6 +377,7 @@ def get_latest_dev_sources( | |||
| "\n".join(( | |||
There was a problem hiding this comment.
(to make possible re-showing prompt, the easiest way is to extract this code starting from prompt = "{} {}\n{}\n> ".format( into new checkout_recovery_prompt() func, so it could call itself recursively to re-show without action
Useful for certain packages that have publicpgpkey arrays in their PKGBUILD file. Enables one to avoid having to quit out of the pikaur process to add the key using gpg.
This requires the python-gnupg package - the PKGBUILD file has been updated to reflect this.