Sunday, September 27, 2009

Upcoming in zypp.. Download all, then install!

YaST and zypper will finally have the ability to download all packages first and then install (commit post)! No more broken packages because of an aborted download due to connection issues!

 'Download in Advance' in action!

Notice the slight glitch in the 'Actions performed' List where 'Downloading XXX' line gets repeated

This was a much needed and essential feature which has finally been implemented. Though zypper will be getting configurable command line options for this soon, YaST can be setup by editing /etc/zypp/zypp.conf.

Here's the relevant part to be edited with 4 options available. 
## Commit download policy to use as default.
##  DownloadOnly,       Just download all packages to the local cache.
##                      Do not install. Implies a dry-run.
##  DownloadInAdvance,  First download all packages to the local cache.
##                      Then start to install.
##  DownloadInHeaps,    Similar to DownloadInAdvance, but try to split
##                      the transaction into heaps, where at the end of
##                      each heap a consistent system state is reached.
##  DownloadAsNeeded    Alternating download and install. Packages are
##                      cached just to avid CD/DVD hopping. This is the
##                      traditional behaviour.
##               If a value is not set, empty or unknown, we pick
##                      some save default.
commit.downloadMode = DownloadInAdvance

Now 'download in advance' policy should really be made default for 11.2. Right now it is 'download as needed'.

YaST also has configurable behavior for closing after installation. This is configurable via sysconfig editor. Three options: Close (closes after installation/removal finishes), Summary (which gives a nice summary of things that were done) and Restart (which sends you back to the default startup screen with search tab active).

Again 'Close' is still the default which is the worst possible option to keep as default. This should be changed to 'Summary' which should be more convenient for new users and which they can change later if they want, once they become more familiar with openSUSE.

A small rant about the Summary Screen: There always seems to be a difficulty with finding the correct names for buttons in YaST modules. Button names should be very clear regarding what the buttons are going to do. In the summary screen, there are two buttons "Back" and "Finish". Now an average user who is mostly familiar with the "Back" and "Forward" buttons used in a browser is most likely to think that the back button will send him to the previous page, which was the "Perform Installation" page with the flashing download/install progress bars. Hence, the user will click "Finish" which sounds more appropriate, with the effect that the window very rudely disappears. The current button names are more appropriate from the point of view of the installation workflow but are not good from the user's point of view. Some suggestions would be to rename "Back" as "OK" and the "Finish" button as "Quit". Also it would be better if the OK button was moved to the extreme right corner since users instinctively click corner buttons. The OK button also needs to be made default instead of Quit. Users like to click shiny highlighted buttons. Abort buttons should also be changed to Cancel and where ever  they are not required, they should be removed or made invisible instead of just disabling them.

Thanks to the devs again for the new features. Their efforts are commendable. One more step in catching upto the debian based distributions, though openSUSE has superior package management features of its own too. Now come the next essential features: Resuming downloads, downloading multiple packages in parallel and orphaned package removal!