aptly-api-client icon indicating copy to clipboard operation
aptly-api-client copied to clipboard

[Question] How to add multiple architectures into same repository?

Open iieklund opened this issue 1 year ago • 1 comments

Hi,

If looking at the Aptly itself it supports the following:

$ aptly repo add -architectures="amd64" <search dir for amd64 .deb packages> $ aptly repo add -architectures="arm64" <search dir for arm64 .deb packages>

There is no such option available when using e.g. this flow:

from aptly_api import Client
aptly = Client("http://aptly-endpoint.test/")

aptly.repos.create("myrepo", comment="a test repo",
                   default_distribution="mydist",
                   default_component="main")

aptly.files.upload("test_folder", "/tmp/mypkg_1.0_amd64.deb")

aptly.repos.add_uploaded_file("myrepo", "test_folder")

The publish api does provive the "architectures" support:

    def publish(self, *, source_kind: str = "local",
                sources: Sequence[Dict[str, str]],
                architectures: Sequence[str],
                ....

Does it achieve the same result if I'm adding both amd64 and arm64 .deb packages via "aptly.files.upload" and "aptly.repos.add_uploaded_file" and upon publishing a snapshot I pass "architectures=['amd64', 'arm64']" ?

iieklund avatar Oct 06 '22 07:10 iieklund