I made a package with pkgbuild. In info.plist, BundleIsVersionChecked is set to true. My package contains a preinstall and postinstall script in the scripts folder.
A downgrade of my application bundle is indeed prevented. But the preinstall and postinstall script is always run, even if the application bundle is not installed.
How can I tell pkgbuild not to execute the preinstall and postinstall script when a downgrade is happening?