I made a package that includes 2 components according to the file --component-plist. in the plist file, I added the following flag to prevent demotion:
BundleIsVersionChecked: Don't install bundle if newer version on disk? (bool)
when I execute the downgrade script, I get the following message:
Sep 15 11:42:49 os-x-10 installd[284]: PackageKit: Skipping component \
"com.my.driverAE21E" (<current_version>) because the version \
<new_version> is already installed at <my_component>
It is expected, but, unfortunately, the installation continues, and the other component is installed correctly, as well as the scripts preinstalland postintsall- therefore I get a mixture of both versions.
Is there a way to ensure that the version of the component is verified before any attempt to actually install them and stop the installation process if the verification fails.
UPDATE:
Another approach that can help me is to prevent the preinstall and postinstall scripts from running when trying to downgrade.
.