Software center in 12.10, can't continue install step, once refuse the license terms
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
software-center (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I want to create a debian .deb package and add a license terms process interface with user during installation of package
So I added a shell script process in preinst file to the license tems.
But once I refused the license, Software-center dumped to the refuse step each time, the install process can't be continue anyway.
But my install process and .deb package work very well with another command: "gedebi", "dpkg -i", and I never had a problem
in another version of Ubuntu .
script code like:
---------debian preinst file code---
. /usr/share/
db_version 2.0
db_capb backup
#Intel property licence
license=
errmsg()
{
echo >&2 ''
echo >&2 "$@"
echo >&2 "try 'dpkg-reconfigure debconf' to select a frontend other than noninteractive"
echo >&2 ''
}
# facilitate backup capability per debconf-devel(7)
STATE=1
while true; do
case "$STATE" in
0) # ensure going back from license presentment is harmless
STATE=1
continue
;;
1) # present license
db_fset shared/
if ! db_input critical shared/
errmsg "$license license could not be presented"
exit 2
fi
db_fset shared/
if ! db_input critical shared/
errmsg "$license agree question could not be asked"
exit 2
fi
;;
2) # determine users' choice
db_get shared/
if [ "$RET" = "true" ]; then
# license accepted
exit 0
fi
# error on decline license (give user chance to back up)
db_input critical shared/
;;
3) # user has confirmed declining license
echo "user did not accept the $license license" >&2
exit 1
;;
*) # unknown state
echo "$license license state unknown: $STATE" >&2
exit 2
;;
esac
if db_go; then
else
fi
done
# proper exit (0 or 1) above
errmsg "$license license could not be presented / was not accepted"
exit 2
----------end of code---