I'm sumbitting this against #60426 #79638 #83038 #83227 because they appear to be the same bug, I think they should be merged. I hope that's ok.
I didn't like the fact that the realplayer installer kept looping in debconf until you gave it the rpm. So I added a debconf option to config to prompt if the user wants to continue with the install. If the user says "no" then they are told how they can use "dpkg-reconfigure realplayer" to complete the install later. I also had to add a check to postinst to prevent it from doing anything unless this new debconf option was set to "yes". I have tested it pretty well here, but since is the first time I've used debconf somebody should review the changes before applying the patch. FYI- I heard a rumor that, Nathan Dabney <[EMAIL PROTECTED]> http://nm.debian.org/nmstatus.php?email=smurf%40sginet.com was going to adopt this package. I don't see a ITA in wnpp though... I can make changes or update the patch if it gets out of date, just send me email. Disclaimer: IANADD Thanks, -- Matt Taggart [EMAIL PROTECTED] diff -urN realplayer-8.0.old/debian/config realplayer-8.0/debian/config --- realplayer-8.0.old/debian/config Sun Dec 31 15:43:15 2000 +++ realplayer-8.0/debian/config Mon Jan 29 00:53:40 2001 @@ -70,16 +70,39 @@ if [ ! -e "/usr/X11R6/lib/X11/realplayer/version" -o \ "`cat /usr/X11R6/lib/X11/realplayer/version 2>/dev/null`" != "$version" ] then - # Loop until a file is downloaded and can be extracted. - db_get realplayer/download_dir - if [ -e "$RET/$filename" ] && (rpm2cpio $RET/$filename | cpio --list > /dev/null) + # Check and see if we already have an answer for intro(to cover the + # corner case where someone has a pre-intro install and actually + # gets the new rpm ready ahead of time) and download_dir. If they + # have it set and it works then we don't care to prompt them + db_get realplayer/intro + if [ "$RET" != "true" ] then - ok=1 - else - ok="" + db_get realplayer/download_dir + if [ -e "$RET/$filename" ] && (rpm2cpio $RET/$filename | cpio --list > /dev/null) + then + ok=1 + else + ok="" + fi fi while [ -z "$ok" ] do + # Ok, either download_dir wasn't set or it didn't work + # so ask the questions. Explain that this is an installer + # package, ask if they want to continue. Make sure they see + # this prompt. + db_fset realplayer/intro seen false + db_input critical realplayer/intro || abort + # get the answer + db_go + db_get realplayer/intro + if [ "$RET" != "true" ] + then + # Tell them how to do it later, not important + db_input low realplayer/later || true + db_go + exit 0 + fi # Prompt them to download the file and tell us where. # Make sure they see this prompt. db_fset realplayer/download_dir isdefault true diff -urN realplayer-8.0.old/debian/postinst realplayer-8.0/debian/postinst --- realplayer-8.0.old/debian/postinst Sun Dec 31 15:43:15 2000 +++ realplayer-8.0/debian/postinst Mon Jan 29 00:03:02 2001 @@ -106,6 +106,13 @@ # Check if external files are already installed. if [ "$1" = "configure" -a \( ! -e "/usr/X11R6/lib/X11/realplayer/version" -o \ "`cat /usr/X11R6/lib/X11/realplayer/version 2>/dev/null`" != "$version" \) ]; then + # Check and make sure that we're supposed to be doing anything + db_get realplayer/intro + if [ "$RET" != "true" ] + then + # We haven't been configured so exit + exit 0 + fi # The config script should have handled prompting for a file # and ensuring it exists and can be extracted with cpio. db_get realplayer/download_dir diff -urN realplayer-8.0.old/debian/templates realplayer-8.0/debian/templates --- realplayer-8.0.old/debian/templates Sat Jun 17 00:31:17 2000 +++ realplayer-8.0/debian/templates Mon Jan 29 00:26:54 2001 @@ -1,10 +1,16 @@ +Template: realplayer/intro +Type: boolean +Default: true +Description: Would you like to run the Real Player installer now? + This is the Real Player installer package, it does not actually contain + Real Player. You will need to go download Real Player by hand. Once you have + downloaded it you can proceed and tell the installer which directory you put + it in. + Template: realplayer/download_dir Type: string Default: /root Description: Real Player has been downloaded to where? - This package is an installer package, it does not actually contain - Real Player. You will need to go download Real Player by hand. - . Please visit the web page at http://www.real.com/player/ now, find the page for "Real Player basic", and download the Red Hat RPM of Real Player. The file should be named ${filename}. Once you have downloaded it, enter the @@ -33,8 +39,14 @@ Template: realplayer/needfile Type: note -Description: The realplayer installer cannot proceed. - You are running in non-interactive mode, and the realplayer installer needs +Description: The Real Player installer cannot proceed. + You are running in non-interactive mode, and the Real Player installer needs to prompt you to download a file for it to install, and cannot. The installation of this package has been aborted. Please re-install it in interactive mode. + +Template: realplayer/later +Type: note +Description: Real Player install delayed + You have opted not to run the Real Player installer at this time. If you + decide to run it later you can do so by running, "dpkg-reconfigure realplayer".