How do you fail a Ubuntu installation when there is a failure in a debian package postinst

Asked by Aaron Getz

I'm wonder if it is possible to fail a Ubuntu installation CD when there is a failure in a postinst of a debian package. We are building an alternative installation CD and we have a debian package that installs a base database for our customers. If there is issues in the postinst of this debian package the installation doesn't fail and continues on.

I'm wanting failures in the postinst to fail the installation so we can know immediately that there is problems with the database before they become issues found at runtime. I have added the proper exit codes to the postinst script and I can see that the postinst script stops its execution but the rest of the installation progresses on.

Is it possible to fail an installation when a postinst script for a package exits with an exit status greater than zero. It seems that conflicts with packages will cause the installation to fail.

Any help would be greatly appreciated.

Thanks,

Aaron Getz

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu irm Edit question
Assignee:
No assignee Edit question
Solved by:
Aaron Getz
Solved:
Last query:
Last reply:
Revision history for this message
Vihar (vmankov) said :
#1

What do you mean with "a fail" or "to fail" here in your post?

This word makes your post unclear, I think.

Revision history for this message
Aaron Getz (aaron-getz) said :
#2

By "fail" I mean to bring up the red screen which indicates that there was an error during the installation and it cannot proceed any further. So basically ending the package installation portion of the install and then brining the user to another menu in which they can choose to exit the installation or do a number of other options.

Right now the rest of the packages install and the machine comes up to a graphical login. I actually looked at the status of the package that had the postinst failure using dpkg -l and it should that the package was installed fine with a "ii" for the status. I figured it would show that it didn't get configured.

Thanks,

Aaron Getz

Revision history for this message
Vihar (vmankov) said :
#3

I thought someone of the monsters here would answer...

So, Aaron, - for me you ask the Debian community. It seems your quest is for them. Tell them you were in Launchpad and didn't have an answer, please.

You know - I'm like a dispatcher.

actionparsnip - can you help?

Revision history for this message
Aaron Getz (aaron-getz) said :
#4

Thanks Vihar,
  I will post something to the debian community. From the few sample tests that I have run I'm not sure if it is possible to accomplish what I want.

Thanks,

Aaron Getz