maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   maemo-confirm-text from apt-get -> error (https://talk.maemo.org/showthread.php?t=70780)

0x47 2011-03-07 16:06

maemo-confirm-text from apt-get -> error
 
Hi everyone,

I was trying to be user-friendly in my port of VCMI. Therefore I created the script below as debian/preinst. It works fine from the HAM, but fails from apt-get.

Code:

#!/bin/sh

# This script was copied from kernel-power and somewhat modified. Thanks!

test "$1" = install || exit 0 # upgrades are fine
f=/tmp/vcmi-message
cat > $f <<EOF
This package installs the VCMI game engine and some required binaries. However you will still need the original game binaries of Heroes Of Might And Magic III (3). You will not be able to run VCMI without these binaries!

If you are not sure how to install these binaries, please have a look at http://talk.maemo.org/showpost.php?p=795124&postcount=182

You can also visit the official VCMI website for further instructions: http://vcmi.eu

If you want to cancel the installation now, tap the blurred area above this dialog.
EOF

maemo-confirm-text "Important Notice - VCMI" $f
res=$?
rm -f $f
exit $res

Is there a way to make maemo-confirm-text fall-back to the console (readline?) if the installation was started from apt-get (or dpkg)? Or any way to check that in the script?

Thanks,
Dan

0x47 2011-05-20 07:32

Re: maemo-confirm-text from apt-get -> error
 
Just pushing this in hope there may be someone with an idea meanwhile...

chemist 2011-05-20 10:28

Re: maemo-confirm-text from apt-get -> error
 
We had the issue discussed on IRC freenode #maemo - just jump in and ask, I don't remember any solutions mentioned but someone might have a clue! I move this to devel then...


All times are GMT. The time now is 16:58.

vBulletin® Version 3.8.8