I need to block certain packages from being installed based on the items in the package. If a Sitecore item in the package matches a certain condition then the package should not be installed. I have tried using the
packageinstall:items:starting event as this has a reference to all the items in the package.
I tried setting
SitecoreEventArgs.Result.Cancel to true or throwing an exception in this event. However in either case the items in the package are still getting installed. Is there a different way to achieve this?