diff --git a/packaging/package-indexer/config/config.py b/packaging/package-indexer/config/config.py index bc659a6e16..06f5c07c0b 100644 --- a/packaging/package-indexer/config/config.py +++ b/packaging/package-indexer/config/config.py @@ -138,7 +138,7 @@ def create_cdn(self, suite: str) -> cdn.CDN: return cls.from_config(options) def get_gpg_key_path(self) -> Path: - return self.__cfg["gpg-key-path"] + return Path(self.__cfg["gpg-key-path"]).expanduser().absolute() @staticmethod def __get_storage_implementation(vendor: str) -> Type[remote_storage_synchronizer.RemoteStorageSynchronizer]: diff --git a/packaging/package-indexer/index-packages.py b/packaging/package-indexer/index-packages.py index 64012e1ebc..e653694707 100755 --- a/packaging/package-indexer/index-packages.py +++ b/packaging/package-indexer/index-packages.py @@ -117,7 +117,7 @@ def construct_indexers(cfg: Config, args: dict) -> List[Indexer]: indexed_remote_storage_synchronizer = cfg.create_indexed_remote_storage_synchronizer(suite) cdn = cfg.create_cdn(suite) - gpg_key_path = Path(cfg.get_gpg_key_path()) + gpg_key_path = cfg.get_gpg_key_path() gpg_key_passphrase = stdin.read() if args["gpg_key_passphrase_from_stdin"] else None indexers: List[Indexer] = [] diff --git a/packaging/package-indexer/indexer/deb_indexer.py b/packaging/package-indexer/indexer/deb_indexer.py index b0c46c08bd..5a563d5461 100644 --- a/packaging/package-indexer/indexer/deb_indexer.py +++ b/packaging/package-indexer/indexer/deb_indexer.py @@ -51,7 +51,7 @@ def __init__( gpg_key_passphrase: Optional[str], ) -> None: self.__apt_conf_file_path = apt_conf_file_path - self.__gpg_key_path = gpg_key_path.expanduser() + self.__gpg_key_path = gpg_key_path self.__gpg_key_passphrase = gpg_key_passphrase super().__init__( incoming_remote_storage_synchronizer=incoming_remote_storage_synchronizer,