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

Introduce option -multi-dist to the publish commands #1292

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

nresare
Copy link
Contributor

@nresare nresare commented May 18, 2024

This change makes it possible to publish multiple distributions with packages named the same but with different content by changing structure of the generated pool hierarchy. The option not enabled by default as this changes the structure of the output which could break the expectations of other tools.

Fixes #486

Requirements

All new code should be covered with tests, documentation should be updated. CI should pass.

Description of the Change

Given #486 and and this discussion on aptly-discuss it seems I am not alone in using aptly to self-publish some packages for a handful different distributions and wanting to publish different packages with the same filename for different distributions. As it stands, due to aptly using the default directory structure for the pool hierarchy, aptly will currently fail to publish such packages.

A casual look at the DebianRepository/Format page seems to indicate that the structure of the pool hierarchy is not specified, and as long as the Filename field in Packages references the relevant file any structure could be used.

This change introduces a new option -multi-dist that will create per distribution subdirectories under pool such that each distribution can have its own copy of some package and need not worry about two packages with the same name but different distributions colliding.

One could argue that it would be better to change the default behaviour, rather than implementing a new option, but I feel I have limited visibility into all the implications here, so having this behaviour be enabled on an opt-in basis seems the choice with less risk of functionality regressions. This change can also have storage efficiency implications, so having it be optional seems preferable for that reason as well.

Checklist

  • unit-test added (if change is algorithm)
  • functional test added/updated (if change is functional)
  • man page updated (if applicable)
  • bash completion updated (if applicable)
  • documentation updated
  • author name in AUTHORS

@neolynx neolynx self-assigned this Jun 1, 2024
@neolynx neolynx added the needs review Ready for review & merge label Jun 1, 2024
@neolynx neolynx requested a review from a team June 4, 2024 18:22
@neolynx
Copy link
Member

neolynx commented Jun 8, 2024

looks great ! thank you so much 👍

would you mind adding a PR to https://github.com/aptly-dev/www.aptly.info and documenting this option ?
then we can merge it !

This change makes it possible to publish multiple distributions
with packages named the same but with different content by changing
structure of the generated pool hierarchy. The option not enabled
by default as this changes the structure of the output which could
break the expectations of other tools.
@neolynx neolynx merged commit b4cd86a into aptly-dev:master Jun 15, 2024
7 checks passed
@nresare nresare deleted the multi-dist branch June 20, 2024 19:59
@nresare
Copy link
Contributor Author

nresare commented Jun 20, 2024

Thank you for merging! I am a little overwhelmed by work etc right now, but I have put on my todo list to propose some documentation changes, to be merged when this code exists in a released version

@neolynx
Copy link
Member

neolynx commented Jun 20, 2024

Thanks for the PR ! :-)

if you have some time to take care of the documentation, that would be awesome, let me know !

@neolynx
Copy link
Member

neolynx commented Sep 19, 2024

hey, just wanted to say thanks again, I like the feature a lot and new aptly will use it to publish itself ;-)

@neolynx
Copy link
Member

neolynx commented Sep 25, 2024

Btw: #1345

aptly is now using the -multi-dist to host itself 👍

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

Successfully merging this pull request may close these issues.

Impossible to publish multiples distributions with same prefix
2 participants