mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Alan Martinović" <Alan.Martinovic@zenitel.com>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: [ptxdist] How to fail a ipkg post install?
Date: Mon, 17 Aug 2015 13:25:42 +0000	[thread overview]
Message-ID: <916A03CCEB30DF44AD98D4CFDC7448D05780DD4E@nooslzsmx1.zenitelcss.com> (raw)


[-- 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

             reply	other threads:[~2015-08-17 13:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17 13:25 Alan Martinović [this message]
2015-09-28 10:33 ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=916A03CCEB30DF44AD98D4CFDC7448D05780DD4E@nooslzsmx1.zenitelcss.com \
    --to=alan.martinovic@zenitel.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox