diff --git a/distro/keyring.py b/distro/keyring.py index a7d609e..25544c6 100644 --- a/distro/keyring.py +++ b/distro/keyring.py @@ -70,7 +70,7 @@ def init_keyring_gpg_dir( exists = False lazy = lazy and exists if not lazy: - run_cmd([get_pacman_key_binary(), '--init', '--gpgdir', gpg_dir]) + run_cmd(['pacman-key', '--init', '--gpgdir', gpg_dir]) results = {} for name, val in keyring_dists.items(): dist_dir, dist_changed = val @@ -88,7 +88,7 @@ def import_dist_keyring( dist_dir: str, ) -> CompletedProcess: assert gpg_dir and dist_dir and config.runtime.script_source_dir - r = run_cmd([get_pacman_key_binary(), '--populate-from', dist_dir, '--populate', '--gpgdir', gpg_dir]) + r = run_cmd(['pacman-key', '--populate-from', dist_dir, '--populate', '--gpgdir', gpg_dir]) assert isinstance(r, CompletedProcess) return r @@ -191,7 +191,3 @@ def get_keyring_dist_path(base_dir: str, *name) -> str: def get_keyring_gpg_path(base_dir: str) -> str: return os.path.join(base_dir, KEYRING_GPG_DIR) - - -def get_pacman_key_binary() -> str: - return os.path.join(config.runtime.script_source_dir, 'bin', 'pacman-key-user')