mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] How to fail a ipkg post install?
@ 2015-08-17 13:25 Alan Martinović
  2015-09-28 10:33 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Martinović @ 2015-08-17 13:25 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1.1: Type: text/plain, Size: 1427 bytes --]

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?

Tnx


ALAN MARTINOVIĆ
DEVELOPMENT ENGINEER
ZENITEL NORWAY AS

Tel: +385 97 746 6662
alan.martinovic@zenitel.com<mailto:Alan.Martinovic@zenitel.com>

ZENITEL MARINE MED. OFFICE
PERMANI 28, HR-HR-51213 Jurdani, Croatia
Switchboard: +385 97 746 6662, Fax: +385 51 292 555
www.zenitel.com<http://www.zenitel.com/>
[default]<http://www.zenitel.com/>

DISCLAIMER:
This e-mail may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message.

[-- Attachment #1.1.2: Type: text/html, Size: 5549 bytes --]

[-- Attachment #1.2: image002.jpg --]
[-- Type: image/jpeg, Size: 4662 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] How to fail a ipkg post install?
  2015-08-17 13:25 [ptxdist] How to fail a ipkg post install? Alan Martinović
@ 2015-09-28 10:33 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2015-09-28 10:33 UTC (permalink / raw)
  To: ptxdist

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
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-28 10:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-17 13:25 [ptxdist] How to fail a ipkg post install? Alan Martinović
2015-09-28 10:33 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox