-
Notifications
You must be signed in to change notification settings - Fork 13
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
manifest: packages processing should match yunohost #119
Comments
Current behaviour yields the following: >>> apt_dependencies = [value.strip() for value in "dep1 dep2".split(",")]
>>> print(apt_dependencies)
['dep1 dep2'] Behaviour revised in #118 yields the following: >>> apt_dependencies = [value.strip() for value in re.split(" |,","dep1 dep2")]
>>> print(apt_dependencies)
['dep1', 'dep2'] The improper parsing of dependencies as a single item works as expected in |
As per https://github.com/YunoHost/yunohost/blob/51d8608b40e2e2acd76a0ce34ceca9dab0cf13d0/helpers/apt#L227, the list |
Thanks for explaining. Which way is the recommended way then? The example app showcases using a comma. |
When designing packaging v2, I originally chose to stick to a flat list of packages (with comma ignored?), because it's simpler to write Edit: and also the constrain was to be able to inject these in the |
So if the stringy representation is a legacy, maybe the lint should warn when we don't have a proper list? That would make things more consistent and avoid errors. See #120 |
Meh I dunno, it's not really legacy, it's the current practice and I sort of chose to keep the "flat string" syntax to make it "less heavy" on the syntax (in terms of manually writing stuff for not-so-technical people) We can decide that the new best practice is to use a proper list, but we shouldnt yolo-flag this as a Warning, that's gonna downgrade every app currently flagged level 8 to level 6 ... I'm not sure what problem exactly we are trying to solve beside having one consistent notation, which surely is a noble goal and nice to have in a perfect world, but there are clearly more important stuff to work on |
(Another thing waiting in the design decision was that toml auto-format creates that kinds of multi-line list : https://github.com/YunoHost-Apps/endi_ynh/blob/0ea0827fdd5aaf24a789d267bd199b8e8c1a3c5c/manifest.toml#L62 which is "hmpf") |
Actually I kinda prefer this format as it's alphabetically sortable (but also manually, by kind of dependency for example). All in all, one of the reasons I prefer lists over strings, is that string can be way longer than my editor's width.
Agreed though :D This is just a syntax thing, not a quality indicator. It can be handled by autopatches, no ? |
Sure but is it really that big of a deal, we have more important stuff to work on imho ... |
Ah yeah, fully agree :D |
Personal opinion: it's better to have one canonical way that is easier to lint/support. There's already many ways to do different things and we should focus on having a good supported way to do things, in general. I understand the need to not break existing packages, so i'm proposing an alternative: how about deprecating string lists for manifest v3? |
Really I can only reinstate that there are a gazillion more important things to do This specific issue is just the tree hiding the forest : like, despite the fact that there are 2 or 3 supported syntax to declare the list of packages, it is still one of the most standardized things ever and one of the easiest stuff to "lint" The current packaging format is still, despite all of the v1->v2 improvements, essentially a soup of bash scripts, and the linter heavily relies on brutal |
I fully agree and on this issue I don’t really care about what other packagers do as long as I can have a list on my packages :D |
Since #118 was merged yesterday, i believe there is a mismatch between how package_linter and yunohost process the
resources.apt.packages
list in a string form.From yunohost:
In practice it should not change much because apt will gladly eat a space-separated string as multiple package arguments, but i'm not sure if it could affect something else.
The text was updated successfully, but these errors were encountered: