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

[Feature Request] Supersedes packages by source package name #22

Open
yumeyao opened this issue Mar 9, 2022 · 1 comment
Open

[Feature Request] Supersedes packages by source package name #22

yumeyao opened this issue Mar 9, 2022 · 1 comment

Comments

@yumeyao
Copy link

yumeyao commented Mar 9, 2022

Imagine how Ubuntu PPA works:

I can have a source package named MyApp-1.0 building MyApp_1.0.0.deb, and MyApp-1.1 building MyApp_1.1.0.deb. I want the user use the latest one by default, but keep the old version there just in case something in the new version is broken and I can't fix it in time in the new version, so it's always an option for rolling-back.

Now I want to backport something to 1.0.0, it will be 1.0.1 or 1.0.0-1, whatever, I want it supersedes 1.0.0.deb but does not touch 1.1.0.deb. On Ubuntu PPA, this is quite simple: I just release the 1.0.1 or 1.0.0-1 package with the same source package name MyApp-1.0 rather than MyApp-1.0.1.

So if I use the official reprepro, I can't have multiple versions, even if they come from different source packages.
If I use this fork, I have to manually remove the superseded versions.

I would suggest make use of negative Limit value.

  • 1 means keeping only one version of a binary package
  • -1 can mean keeping only one version of a binary package from each source package.
@yumeyao
Copy link
Author

yumeyao commented Mar 9, 2022

I'm not familiar with the code of either official reprepro or this fork. By looking at the commit history I suppose this is the only place Limit is checked.
ca260b7

So I think the solution should be simple:
change } else if (target->distribution->limit > 0) { to } else if (target->distribution->limit != 0) { and then handle the negative case in the branch body, to sort and group by source package name (maybe the interface needs to change to provide source package info as well), and blah blah.

I'm not yet ready to fulfill the request by myself right now but I will do it when I have some spare time. Any comment or suggestion is welcomed.

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

1 participant