I am using swupdate to do software updates for our embedded system. We have implemented version check feature where swupdate will only update components that have mismatch in versions reported by hardware (in /etc/sw-versions) and in new .swu package.
However, it seems like swupdate only reads this sw-versions file into memory during start up process of swupdate server (swupdate.service) - using method: read_sw_version_file. On our system, whenever we perform manual update or if component with potentially different version is swapped, we perform update to sw-versions file (sw-versions file contains real-time versions information of HW). So after bootup, sw-versions file will update at least once.
However, when we run swupdate-client, the updated sw-versions file is never checked. swupdate is using value that were previously loaded into memory.
How do I fix this problem? Is there something in swupdate that can trigger execution of read_sw_version_file method? Besides forcing swupdate.service to restart, is there anything I can do in pre-install scripts?