Block a package (this creates an entry in /var/lib/synaptic/preferences)
Unblock the package (this leaves an empty line in /var/lib/synaptic/preferences)
Refresh the cache ... everything works fine
Close synaptic
Run synaptic's refresh in update mode with:
sudo /usr/bin/synaptic --update-at-startup
and you get the following error:
Analysis:
The error comes from RAPTOptions::restore(), it is detected both in update mode and in normal mode. The difference between the two is that in update mode, the cache isn't opened prior to performing the refresh.
To reproduce the issue:
/var/lib/synaptic/preferences
)/var/lib/synaptic/preferences
)sudo /usr/bin/synaptic --update-at-startup
and you get the following error:
Analysis:
The error comes from
RAPTOptions::restore()
, it is detected both in update mode and in normal mode. The difference between the two is that in update mode, the cache isn't opened prior to performing the refresh.Proposed solution:
Initialize the cache also in update mode.
https://gitlab.com/linuxmint/pins/mint/synaptic/-/commit/7477fb52b03b95695110216fe61b30aa00524ae9