Skip to content

Commit

Permalink
package-indexer: expand absolute path for gpg-key-path
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Szakacs <[email protected]>
  • Loading branch information
alltilla committed Jul 2, 2024
1 parent f4e8b27 commit e7a1698
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packaging/package-indexer/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
2 changes: 1 addition & 1 deletion packaging/package-indexer/index-packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = []
Expand Down
2 changes: 1 addition & 1 deletion packaging/package-indexer/indexer/deb_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e7a1698

Please sign in to comment.