From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; rv:1.7.3) Gecko/20040916 Firefox/0.10 Description of problem: I'd like to see some portable way to indicate progress when executing %post scripts since they might take a long time! For example I normally run a "yum -y update" in my post scripts, and then the users waiting for the installation to finish only see (if using the graphical installer) the last message printed by Anaconda, and nothing at all if using text mode on a server. It would be nice to be able to call something like: /sbin/anaconda-status "Installing patches" This should update the X status windows of Anaconda if using the graphical installer, or the text window if using text mode. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: na. Additional info:
Fedora Core 3 is now maintained by the Fedora Legacy project for security updates only. If this problem is a security issue, please reopen and reassign to the Fedora Legacy product. If it is not a security issue and hasn't been resolved in the current FC5 updates or in the FC6 test release, reopen and change the version to match. Thank you!
requested by Jams Antill
Also nice to have: - Output of %post automatically logged to /root/ks-post.log or some such place. - Output of %post displayed on anaconda screen in addition to status updates. Would need in text mode as well as graphical.
All %pre/%post/%traceback scripts have their stdout and stderr written to the anaconda log file. This can be found in /tmp/anaconda.log during installation and /var/log/anaconda.log afterwards. As for displaying progress, my initial experiments here involved trying to use zenity to display a progress widget, but it's not quite working yet. This might be something that other people can experiment with in their own %post scripts and see if they can make it work.
(In reply to comment #4) > All %pre/%post/%traceback scripts have their stdout and stderr written to the > anaconda log file. This can be found in /tmp/anaconda.log during installation > and /var/log/anaconda.log afterwards. Is this a devel only feature? I just did a F7 install and I don't see any output from %post in /var/log/anaconda.log.(In reply to comment #4) > As for displaying progress, my initial experiments here involved trying to use > zenity to display a progress widget, but it's not quite working yet. This might > be something that other people can experiment with in their own %post scripts > and see if they can make it work. I'd be happy to play around with it if I could get pointed in the right direction.
(In reply to comment #5) > (In reply to comment #4) > > All %pre/%post/%traceback scripts have their stdout and stderr written to the > > anaconda log file. This can be found in /tmp/anaconda.log during installation > > and /var/log/anaconda.log afterwards. > > Is this a devel only feature? I just did a F7 install and I don't see any > output from %post in /var/log/anaconda.log.(In reply to comment #4) > I'd be happy to play around with it if I could get pointed in the right direction. zenity is just a little program that generates GTK widgets, similar to the dialog program. I think the hard part here is going to be making sure the $DISPLAY is correct. This may require code changes in anaconda.
> (In reply to comment #4) > > All %pre/%post/%traceback scripts have their stdout and stderr written to the > > anaconda log file. This can be found in /tmp/anaconda.log during installation > > and /var/log/anaconda.log afterwards. > > Is this a devel only feature? I just did a F7 install and I don't see any > output from %post in /var/log/anaconda.log.(In reply to comment #4) No, this should be available as least as far back as FC6. stdout and stderr is supposed to be getting redirected to the log files. You can also use --logfile in the script's header to direct output wherever you want. If that stuff's not working, it's a bug.
zenity is now in the stage2 image, so you can do progress bars, dialogs, and the like in your %pre and %post scripts. Because of rawhide being broken right now, I was only able to test this in the %pre script but it works there. You probably won't be able to run this from inside a chrooted %post script. On the logging thing - you are correct. The output is not logged to /tmp/anaconda.log though it is being logged to tty3. I don't think this is possible to fix right now, because it would require making the python subprocess module redirect its output to the python logging module. This could be something to investigate later. However, you still have the --logfile parameter which should capture everything. I'm going to put this in MODIFIED until we see that zenity works in %post as well.
zenity is a gui only thing, right? Anything that will work in text mode install?
That is correct. zenity is only a gui thing. There is currently nothing for text mode, nor is there really anything planned. We can't just drop in a program like dialog and let people start using it, because newt thinks it's in control of the interface and displaying anything else is going to break that assumption.