I have custom emby rockon which does not uninstall cleanly (never has). The actual container is removed from docker but UI is stuck on uninstalling and I need to use delete-rockon but that does not seem exist anymore, or whole bin-directory after upgrade.
Also I would like to re-request the reinstall button for rockons that are updated by reinstalling.
@Jorma_Tuomainen Well done.
Yes we now use a Poetry build system that creates and uses a .venv upon install (mainly via the build.sh script that you see in the top directory).
The knack (read intended use) is to prefix all scripts with “poetry” so that it can arrange the correct environment. Take a look at for example the rockstor-pre.service file which is also now in a more standards compliant location:
If one “cd /opt/rockstor” first then poetry can pick-up the local .venv (also the full path to poetry is rarely needed unless one is in a constrained env such as in the above systemd example.
Our new code (from 4.5.4-0 onwards) similarly calls the scripts thus:
From:
BASE_BIN = “{}.venv/bin”.format(BASE_DIR)
Note the flash-optimize script there.
likely such as you have already done with the delete-rockon script.
The script entry points are defined in the pyproject.toml file, again in the top directory of /opt/rockstor:
with the delete-rockon script also further down in that top level definition of the project.
Yes, one can uninstall then re-install with the same settings. But a single button would be nice to do the same. Do you fancy having a go at this yourself by any chance. You could likely simply tie together our existing uninstall and re-install with some config stash in the interim. @Flox did a lot of work in that area for our config restore where Rock-ons state and install are re-established via the config restore function. Non trivial but doable with some time and focus.
For the record, on Rockstor 4.5.4-0 and later, these scripts should now be run under our Poetry env, and thus using the poetry run <script name> format. In this case, it would thus be:
$ poetry run delete-rockon
Delete metadata, containers and images of a Rock-on
Usage: delete-rockon <rockon name>