-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
Create versionned directories of the helpers #1717
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea, but I'm not sure that the package version must follow the helper version.
To me it's completely uncorrelated, and we could have a turbo package V5 with helper v2 because it doesn't evolve as fast as the package needs etc.
We could use a key in the manifest, and if it's not declared, use helperV1.
If i understand your idea correctly, you would just like to decorrelate versionning of the 2 ? That i'm fine with. Correlating the two numbers was just a simplification. We just need to be clear about the "compat matrix". (for now packagingv1 is helpers v1, packagingv2 is helpers v1 and v2).
|
Great idea! Why not add a |
hmmyeah i guess we could have something like [integration]
yunohost = ">= 11.2"
helpers = "2.1" or
|
I think I prefer the first suggestion, because it's less about the format and more about "dependencies" like yunohost version. |
…y in the manifest's [integration] section, or fallback to the 'packaging_format' info
I'm a big fan of allowing small steps in development. I'd go that far to allow each helper to be called with an option |
The problem
Having a single helpers directory completely freezes its API, we don't want to change it by fear of breaking old or unmaintained apps.
But sometimes we see bugs, deprecated functions, want to change the overall API, want to introduce new behaviours.
Solution
This MR introduces a new variable,
YNH_APP_HELPERS_VERSION
.This variable can be passed as an env var, or as the first arg of the script (
source /usr/share/yunohost/helpers 2.1
). It defaults to1
.Directories are named
helpers.v${VERSION}.d
.A symlink
helpers.d -> helpers.v1.d
keeps the "legacy" directory.The version
1
is the current one, so old packages won't break.PR Status
Completely untested.
How to test
...