site  contact  subhomenews

Fix for version depth limit

January 25, 2025 — BarryK

Alfons discovered a little bug. He sent me a snapshot of Easy Version Control (in the Filesystem menu), showing that the depth-limit is 5, yet there are now 6 versions. In other words, when he updated to Scarthgap 6.5.6, it was the 6th, so the oldest version, 6.4.4, should have been deleted.

The cause was that /var/local/version-history-depth did not exist. This is read by the 'init' script in the initrd, but if the file doesn't exist then depth calculation will be messed up.

File /var/local/version-history-depth only gets created when Easy Version Control is run, and it looks like Alfons had never run it before. And of course the session has to be saved after running Easy Version Control.

I fixed it in the 'init' script by creating it if it doesn't exist, and assigning a default of "5".    

Tags: easy