Daemon executable is not up to date after rebuilding URCap.
Issue details
Resources embedded into the URCap are not re-extracted when URCap is updated.
Steps to Reproduce
Open the mydaemonswing sample available inside the Starter Package VM.
Inside the pom.xml file set install path to /home/ur/ursim/ursim-5.9.1.1031110/.
Build and install using mvn install -P ursim.
Launch ursim and make sure you see the newly deployed URCap in the installation tab.
Open HelloWorld.cpp and make a change to the startup log.
Rebuild and install URCap.
Relaunch ursim.
View logs inside felix-cache folder and see that Hello World started is printed.
Expected Behavior
New version of the daemon is started. Therefore printing new log.
Actual Behavior
Old version of the daemon is started. Printing Hello World started.
Workaround Suggestion
Manually uninstall URCap using Polyscope GUI before installing updated version.
This workaround is functional however it is not very convenient as a developer to have to manually uninstall every single time a new URCap version is to be tested. I tend to use an earlier version of Polyscope to skip this completely.
I am however wondering if there still might be a bug in the extraction process because based of what can be read here. (quoted below)
Improved PolyScope startup time when a URCap with a daemon contribution is installed on the system:
The unpacking of resources when the āinstallResource(URL)ā method is called on the implementation of the āDaemonContributionā interface during startup will only occur the very first time (after the URCap has been installed or updated)
If it indeed is a bug, then the following inconvenience might be solved following a resolution.
Clearing all files and folders under felix-cache/ causes the removal of logs (ex. /log/log/current) which when open in a text editor for continuous preview, must now be reopened because filepath does not exist anymore. Considering the fact that the log file is never in the same location because the bundle number can change between reinstalls of the URCap (which is the case with an empty cache), it requires manually reopening log file every time URCap is deployed.
As long as Polyscope does it when the URCap is updated(bumped version number), then it should never affect an end user. Since only a single URCap is release with that version number.
Then my suggested workaround will fix the issue in the development scenario.