Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
iieklund opened this issue Oct 6, 2022 · 1 comment
Open

Comments

@iieklund
Copy link

iieklund commented Oct 6, 2022

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']" ?

@xaoc7
Copy link
Contributor

xaoc7 commented Mar 9, 2023

Hello @iieklund ,
Reason to not have "architectures" as an option in API Client is that the AptlyAPI server is not supporting such:

`func apiReposCreate(c *gin.Context) {
	var b struct {
		Name                string `binding:"required"`
		Comment             string
		DefaultDistribution string
		DefaultComponent    string
	}`

I'm not even sure if "architectures" flag in CMD (example that you have posted) have any effect on newly created repository. On the other hand "architectures" may have significant effect when publishing a repository. So I believe that what you are trying to achieve should be done when publishing a repository, as you already did!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants