-
Notifications
You must be signed in to change notification settings - Fork 50
Feature request: Multiple distributions in the same repository #22
Comments
I think this is probably a nice feature, but I'm unlikely to work on it (decent amount of effort required, not something I need). Patches welcome. |
So, I accidentally discovered this feature seems to be 90% of the way done: if you go into the repository properties and change the distribution name (which is editable - I assume by mistake), the next upload will create the structure for that distribution. You can keep editing the distribution back and forth and everything seems to work, though I didn't test exhaustively. So it seems the only thing missing is for the distribution name to be picked up from the upload URL. Backward compatibility can be kept by defaulting to the distro set in the repository properties, if the upload URL does not have one. |
Reviewing the code it doesn't seem like this would be incredibly difficult. Basically, what would have to be done is:
|
This smells similar to something we had to handle for Yum in Nexus Repo 3. @jlstephens89 might have some pointers for you. |
@DarthHater I'm taking a look at this today. I need some time to get into the code / apt so don't expect an immediate fix but I'll keep everyone updated. |
@mpoindexter I'm trying to work out what proxy uses the distribution configuration for? Can't that be determined from the request? |
I think the biggest reason is for the snapshot support. This controls what distributions we're going to copy when we take a snapshot. I guess it's also useful as a policy mechanism. |
Hey ! I don't know if I hove to open a separate ticket, but the assets Packages et Sources can not be updated in a repo of type Apt (Proxy). I can see the "Deployment Policy" parameter for Apt (hosted), but not for the Proxy one. Any idea? Thanks in advance |
This has not been changed in newer versions. My suggestions above were for how someone could change the code to support a comma separated list of distributions, but no one has done this yet, so it's still unsupported. The current code requires a separate hosted repo per distribution. |
I might pick this up if you think it's fairly easy @mpoindexter and someone can help me test it. Any volunteers out there? |
I think this one would be pretty easy, I outlined how it could be done here: #22 (comment) |
FWIW, how we use this is to just simply have one hosted repo per distribution since the packages we upload tend to be built separately for each distribution, but I can see how this would be irritating if most of the packages you upload would work on multiple distributions. |
I guess that some other people are going to work on this! I'll back off :) |
Hello, I know this moved to sonatype but I can't seem to find this on their Jira. Do you guys have any news on this? I tried comma-separated but I'm not entirely sure that it works. Thanks. |
@fdvieira We investigated this when we were migrating the APT plugin to the core nexus codebase (https://github.com/sonatype/nexus-public/tree/master/plugins/nexus-repository-apt) and found that there were some technical limitations: The APT plugin currently rebuilds metadata on every .deb file change and uses the distribution configured against the repository to know what folder to create for the metadata. If we allowed multiple distributions we would need to some how record those distributions for each .deb file. This would be a lot of work to implement and would also not work with our metadata repair tasks. Our current recommendation is to create multiple hosted repositories, one for each distribution. If that isn't possible for you feel free to file an improvement ticket on our public JIRA: https://issues.sonatype.org |
Hi, We've done this recommendation and it works like a charm for our needs. Thanks |
Hi @jlstephens89, In the first place, thank you so much for the detailed explanation, I now understand why. Second, it's not something I truly need since I can create a repository for each distribution. Although it would be a nice feature for the future. Do you think that if I open an improvement ticket it will be heard? :) For now, I will use one repository per distribution. Again, thanks a lot for the answer. |
@fdvieira Glad that works for you 👍 We monitor new tickets, that doesn't mean it will get implemented immediately but it does allow other users to then vote on the ticket/add their voice to it which will increase the priority. |
APT is now part of Nexus Repository Manager. Version 3.17.0 includes the APT plugin by default. |
It would be nice to have multiple distributions in the same repository. As it it we have to create a new repository for each distribution.
I suppose this would require changing the upload URL for packages.
The text was updated successfully, but these errors were encountered: