well, i only pointed out that the local package info you asked about is stored in that file … the proper solution is in the next paragraph in my post …
use the snapd API (which will prevent you from uploading to the global store with a few exceptions though):