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
remove need of symlinks for the repository #4254
Conversation
Opinions welcome :) |
LGTM! 😄 |
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.
looks good to me, moving ADDON_PATH/ADDON_URL up in config/options could be a good idea - people could override ADDON_PROJECT etc in their .libreelec/options files, so no strong opinion on that
da9dca0
to
52784f1
Compare
moved the block a bit, should work I guess ? |
Thanks, that allows anyone to override it with their personal options (same as they can override everything else). |
After this change , overrides for add-on location parameters stopped working if they are specified in the "device/options" file . And constantly tries to add an extra parameter $ ADDON_PROJECT to the path description |
transfer from ADDON_PATH="$ADDON_VERSION/$ADDON_PROJECT/$TARGET_ARCH" config/options to distributions/LibreELEC/options solved the problem , now everything works correctly |
What kind of override are you trying to apply? You can still rewrite the ADDON_PATH and ADDON_URL variables in your $ROOT/.libreelec/options or $HOME/.libreelec/options. |
Try setting parameters in the file (projects/platform_/devices/device_1/options) and the system will ignore them or add the wrong elements. The settings file (projects/platform_/devices/device_1/options) must have maximum priority over all other settings files. |
I don't have these files (I don't use them) |
You can create them, use whichever you prefer - one is under git control, the other is not.
And it does, but it doesn't guarantee you can always rewrite any variable from within a device options file. After this PR, if you want to rewrite the ADDON_PATH or ADDON_URL then you need to be a little more creative - for instance set the variables
We could possibly avoid setting the ADDON_PATH and ADDON_URL vars in config/options if they are already set, ie.
as this should allow the vars to be overidden by a device/options file (totally untested). PR welcome. :) |
Yes, i'm can create and use them .
Why "reinvent the wheel " and take extra steps :). Perhaps I did not explain it well, you just need to transfer the 2 lines added by this PR from the file (config/options) to the file ( distributions/LibreELEC/options). distributions/LibreELEC/options set the default addon project |
@150balbes I don't think you've understood this change as moving that code back to where you suggest simply defeats the purpose of this change. We moved the location of where we set the ADDON_PATH and ADDON_URL variables so that it gives the device/options files an opportunity to set a single variable (ADDON_PROJECT) and then we don't need to repeatedly set ADDON_PATH and ADDON_URL in multiple locations. This change supports the standard LE use case. There is (as I've described) a somewhat inelegant workaround for non-standard/custom/out-of-tree addon paths and urls. We could possibly continue to support device/options setting these two vars by making the setting in config/options conditional - I guess I'll have to look into that... |
@150balbes also, you still haven't explained what it is you are doing that changes these variables, you mentioned "adding parameters" so are you adding another variable to the end of ADDON_URL? It's entirely possible we could integrate your requirements fairly easily without you having to rewrite these variables at all. |
An error is hidden in this processing logic . :) You wanted to get rid of duplicating addon variables , but as a result you got the need to duplicate another variable in all device\optons. What happens if I don't set anything in the device\options settings ? I will get a non- working version of the repositories.
On the contrary, I remove the extra elements :), and the new logic forces me to add an extra intermediate element ( device name) again. I have been using the same repository for all ARM platforms (AW+RK+AML) for a long time without any extra DEVICE element, and all Addons work (if they work in principle for ARM). Setting up a repository http://my_libreelec/addons/9.80.3/arm/addons.xml and similarly for aarch64 (instead of arm in the settings). |
It's not an error in the processing logic (at least not for standard LibreELEC) - it's a code simplification as we now only construct the ADDON_PATH and ADDON_URL in one location and don't have to duplicate how we construct ADDON_URL in multiple locations. I accept it may not be taking into consideration every conceivable custom downstream project that wants to do things differently, but if they're changing the build system then they should be able to implement their own solution.
Currently you would use the default ADDON_PROJECT set by distributions/LibreELEC/options.
OK, so we could make ADDON_PROJECT optional, then you would just need to set We would need something like the following change in config/options to support that use case:
Right? |
Funny, I tried to make almost the same construction for the solution (with adding an empty variable to my project), but it didn't work for me because of the wrong paramter I used. :) if [ -z "${ADDON_PROJECT}" ]; then |
If you can confirm you are happy with http://ix.io/2e34 I'll PR it later. |
Added a patch and an empty variable in device/options (ADDON_PROJECT=""), checked that everything works correctly. |
Currently we symlinking/alias addon repos for several devices.
To avoid messing around with server/jenkins configs at every repo bump and the possibility to mess it up, just hard code it into the image what should be used.
With Repo 9.80.3 there is only a single addon build for RK and AW (AW H3).
This is only a temporary solution till we have some kind of arm32 addon build that could be used by every arm device, a H3 build is what comes quite close to it.
AML could use it too but currently hold back till it has the same kernel version in use.
RPi4 basically the same, RPi 2-3 needs an more relaxed compiler options that should be included into a arm32 "project".
This is an intermediate step to find possible problems.