Skip to content

Commit

Permalink
Add SkipContents on publish-update endpoint
Browse files Browse the repository at this point in the history
The options was publish quite long ago on
aptly-dev/aptly#347. It allows publishing +
updating a specific repository without generating the whole content
usually used by apt-file. If you have a big repository with a few
thousands of packages, it can improve by 50x the publishing.
  • Loading branch information
agustinhenze committed Oct 14, 2022
1 parent 8348110 commit dae2a97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aptly_api/parts/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def update(self, *, prefix: str, distribution: str,
sign_skip: bool = False, sign_batch: bool = True, sign_gpgkey: Optional[str] = None,
sign_keyring: Optional[str] = None, sign_secret_keyring: Optional[str] = None,
sign_passphrase: Optional[str] = None, sign_passphrase_file: Optional[str] = None,
skip_contents: Optional[bool] = False,
skip_cleanup: Optional[bool] = False) -> PublishEndpoint:
"""
Example:
Expand All @@ -157,6 +158,8 @@ def update(self, *, prefix: str, distribution: str,
body["ForceOverwrite"] = True
if skip_cleanup:
body["SkipCleanup"] = True
if skip_contents:
body["SkipContents"] = True

sign_dict = {} # type: Dict[str, Union[bool,str]]
if sign_skip:
Expand Down
1 change: 1 addition & 0 deletions aptly_api/tests/test_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ def test_update_snapshot_default_key(self, *, rmock: requests_mock.Mocker) -> No
sign_passphrase="123456",
sign_keyring="/etc/gpg-managed-keyring/pubring.pub",
sign_secret_keyring="/etc/gpg-managed-keyring/secring.gpg",
skip_contents=True,
skip_cleanup=True
),
PublishEndpoint(
Expand Down

0 comments on commit dae2a97

Please sign in to comment.