On Mon, Aug 17, 2015 at 01:25:42PM +0000, Alan Martinović wrote: > Hi there, > I'm having problems identifying how to successfully fail an install of a > custom package in the postinst script. > > I have a dummy postinst script that exits with non zero. > I would expect that, given that there was an error in the postinst script > ipkg would not consider the installation a success. > However I'm experiencing different behavior. > > Here is the example output: > postinst script returned status 2 > ERROR: mypackage.postinst returned 2 > Successfully terminated. > mypackage.ipk installed OK > > Also, the package version gets updated in ipkg list. > I've tried return codes -1, 2 and 1. > > What is the correct way of preventing the package from being installed if > postinst fails?
You are you talking about installing a single package on a running system, right? Are you using opkg or ipkg? You might try opkg if you're currently using ipkg. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list [email protected]
