SoftwareUpdates
21937
Comment: + "automate mirror testing" link
|
22590
show update progress in Plymouth if you shut down or restart during installation
|
Deletions are marked like this. | Additions are marked like this. |
Line 37: | Line 37: |
If “Automatically check for updates” is checked, Ubuntu should become '''due to check for updates''' at the specified interval after updates were last checked. Once it is due to check for updates, it should try to check one minute after the first time any administrator connects to the Internet (fixing [[http://launchpad.net/bugs/272131|bug 272131]]). By default, it should not display any interface while checking. | If “Automatically check for updates” is checked, Ubuntu should become '''due to check for updates''' at the specified interval after updates were last checked. Once it is due to check for updates, it should try to check one minute after the first time any administrator connects to the Internet (fixing [[http://launchpad.net/bugs/323108|bug 323108]]). By default, it should not display any interface while checking. |
Line 110: | Line 110: |
* Whenever the current Internet connection is '''mobile broadband''', there should be an item with a mobile broadband icon and the text: “You may want to wait until you’re not using a mobile broadband connection.” The item should automatically appear or disappear (with the alert resizing appropriately) if the computer starts or stops using mobile broadband while the alert is open. | * Whenever the current Internet connection is '''mobile broadband''', there should be an item with a mobile broadband icon and the text: “You may want to wait until you’re not using a mobile broadband connection.” (fixing [[http://launchpad.net/bugs/776374|bug 776374]]). The item should automatically appear or disappear (with the alert resizing appropriately) if the computer starts or stops using mobile broadband while the alert is open. |
Line 162: | Line 162: |
If you choose to restart or shut down the computer while updates are installing, regardless of whether they are installing in the progress window or in the background, then: * all updates after the current one should be postponed; * for as long as the current update takes to finish installing, the Plymouth shutdown screen should contain the centered text “Ubuntu needs to finish installing an update. One moment, please…” |
|
Line 164: | Line 168: |
If one or more of the updates require restarting the computer, the progress window should morph into an alert explaining this. The window should have a minimize button but no maximize or close button, the same as in all other stages of the update process. | If one or more of the updates require restarting the computer, and the progress window is open, it should morph into an alert explaining this. If the progress window was not open (because updates were being installed in the background), the alert should open separately. The alert should have a minimize button but no maximize or close button, the same as in all other stages of the update process. |
Line 168: | Line 172: |
(If you want to restart now, you can click the button; otherwise, you can minimize the window.) If updates were completed successfully, the progress window should morph into the same alert as is used after a manual check where the system is already up to date. |
(If you want to restart now, you can click the button; otherwise, you can minimize the alert.) If updates were completed successfully, and the progress window is open, it should morph into the same alert as is used after a manual check where the system is already up to date. |
Packages affected: software-properties, update-manager, update-notifier
This is a living specification for how Ubuntu should present, download, and install software updates. It is part of Ubuntu’s overall software handling.
Our presentation of software updates should carefully balance promptness against interruption, and automation against informed consent, to maximize the prompt installation of updates across the millions of computers on which Ubuntu is installed.
How you can help
This specification includes many small changes and enhancements to the current update behavior. The update settings should be implemented first, but anyone can implement any of the other changes in any order. Grab the code and submit your own branch.
Contents
- How you can help
- Update settings
- Checking for updates automatically
- Downloading and installing updates automatically
- Launching
- Launching automatically
- The “Updates Available” alert
- Expanded presentation of updates
- Installing
- After installing
- User stories
- Design considerations
- Overall approaches considered
- Ideas
- Unresolved issues
Update settings
→ |
In “Software Sources”, the “Updates” pane should be adjusted to reflect the behavior since Ubuntu 9.04 (fixing bug 96705 and bug 351484).
- The “Ubuntu updates” heading should be changed to plain text, “Install updates from:”.
- The “Automatic Updates” heading should be removed.
- The “Check for updates:” checkbox should become the label for an “Automatically check for updates:” menu. The menu should retain its current options — “Daily” (the default), “Every two days”, “Weekly”, and “Every two weeks” — plus “Never”, representing the unchecked state of the previous checkbox.
The radio buttons “Install security updates without confirmation”, “Download all updates in the background”, and “Only notify about available updates” should be converted to a menu, “When there are security updates:”, with options “Display immediately” (the default), “Download automatically”, and “Download and install automatically” (fixing bug 357676).
A menu should be introduced, “When there are other updates:”, with options “Display immediately”, “Display weekly” (the default), and “Display every two weeks” (fixing bug 253412).
- The “Release upgrade” heading should be removed.
- “Show new distribution releases:” should be changed to “Notify me of a new Ubuntu version:”. It should have options “For any new version” (the default for a non-LTS, replacing “Normal releases”), “For long-term support versions” (the default for an LTS, replacing “Long term support releases only”), and “Never”, in that order.
Idea: Make this more predictable by letting you specify which day of the week it opens. [mvo]
Checking for updates automatically
If “Automatically check for updates” is checked, Ubuntu should become due to check for updates at the specified interval after updates were last checked. Once it is due to check for updates, it should try to check one minute after the first time any administrator connects to the Internet (fixing bug 323108). By default, it should not display any interface while checking.
What if broken proxy rules etc prevent successful checks indefinitely?
Downloading and installing updates automatically
If “When there are security updates” is set to “Download automatically” or “Download and install automatically”, and security updates are available, they should download in the background.
Launching
Launching manually
Launching Software Updater manually should immediately begin an interactive check for updates, without showing any other interface beforehand (invalidating bug 289404).
Checking manually
When checking interactively, Software Updater should display only a progress window. As with any other progress window, the window should have a minimize button but no maximize or close button.
If the check fails because of an error, the progress window should morph into an error alert, with the title “Software Updater” and primary text depending on the exact situation.
If no updates are available, the progress window should morph into a note alert.
If updates are available, the progress window should instead morph into the “Updates Available” alert.
Launching automatically
Update Manager should launch automatically, in the background but not minimized, when the computer has been connected to the Internet for at least one minute, you are logged in as an administrator, and either:
security updates are available, it has been at least 24 hours since security updates were last displayed, and either of these are true:
- “When there are security updates” is set to “Display immediately”; or
- “When there are security updates” is set to “Download automatically”, and the security updates have finished downloading; or
b. non-security updates are available, and all of these are true:
- the “When there are other updates” interval has passed since Software Updater was last open (either automatically or manually);
the “When there are other updates” interval has passed since updates were last installed by any manual method (e.g. apt-get or Synaptic, but not unattended-upgrades);
no other package management utility (e.g. Synaptic or Ubuntu Software Center) is running.
Test case: (su-001)
- Install Ubuntu.
- Log in to the new Ubuntu installation for the first time.
In “Software Sources” > “Updates”, choose “Check for updates: Daily” and “Install security updates without confirmation”.
At a terminal, run sudo /etc/cron.daily to trigger the background installation of security updates.
Once cron.daily has exited, run killall update-notifier && NO_FAKE_STAT=1 faketime -f +1d update-notifier to test the update-notifier behavior. Update Manager should open, displaying only non-security updates.
Need several more test cases here.
Launching via the Ubuntu Software Center
The “Updates Available” alert
If a check shows that updates are available, an “Updates Available” alert should appear. If the check was automatic, the alert should open non-minimized but unfocused.
The primary text should be: “Updated software is available for this computer. Do you want to install it now?”
This should be followed by an expander with the label “Details of updates”, that is always collapsed by default. Expanding it should expand the alert to show the list of updates. Collapsing it should return the alert to its previous size.
The secondary text for the alert should consist of one or more list items, depending on the exact situation, each introduced by a mini icon:
The first item should be the amount that needs downloading, of the form “{amount} will be downloaded.”, e.g. “17.4 MB will be downloaded.”, with a download icon. If all the updates have already been downloaded, it should be of the form “The update has already been downloaded.” or “The updates have already been downloaded.”, with a greyed-out download icon. The amount should update automatically whenever you unselect or reselect updates in the list, or once per second when updates are downloading in the background.
Whenever any of the checked updates will require restarting the computer, there should be an item with a restart icon and the text: “The computer will need to restart.” The item should automatically disappear or appear (with the alert resizing appropriately) if you deselect all, or reselect any, of the updates that require a restart.
Whenever the current Internet connection is mobile broadband, there should be an item with a mobile broadband icon and the text: “You may want to wait until you’re not using a mobile broadband connection.” (fixing bug 776374). The item should automatically appear or disappear (with the alert resizing appropriately) if the computer starts or stops using mobile broadband while the alert is open.
Whenever the computer is running on battery, there should be an item (fixing bug 484249 and bug 494772) with exactly the same battery icon as the power status menu is currently using for the battery, and the text: “It’s safer to connect the computer to AC power before updating.” (fixing bug 426708). The item should automatically appear or disappear (with the alert resizing appropriately) if the computer starts or stops using battery while the alert is open (fixing bug 426710).
The alert should have three buttons.
The main action, and default, should be “Install”; activating it should install the updates. Whenever the computer is not connected to the Internet, the button should be insensitive and have the tooltip “Not available because there is no Internet connection.”.
In the Cancel position should be “Cancel” if automatic checking is off, or “Remind Me Later” if it is on. (The button text should change automatically if automatic checking is turned on or off while the alert is open.) In the latter case, activating it should reset the timer for automatic checking for updates.
- In the secondary action position should be “Settings…”. Activating it should leave the alert open, and non-modally open the Software Sources window to its Updates tab.
What happens if you open it manually while updates are downloading?
What happens if you get disconnected from the Internet while the alert is open?
What is the rationale behind telling the user that a restart will be required after updates have been installed? As I've mentioned on the ayatana list I feel this offers no benefits to the user, while possibly putting users off performing updates (particularly if they are in the middle of a task). -- funkyhat 2010-09-06 13:45:56
Expanded presentation of updates
Activating “Details of updates” should expand the window to accommodate the list of updates.
The Software Updater window should be manually resizable only when it is in this expanded state.
The list of updates should have three columns by default: an unlabelled restart-required column, an “Install” column, and a “Download” column.
The first column should contain a restart icon for each update that requires restarting the computer. Any restart icon here should line up exactly with the restart icon used for the secondary text below the list.
The “Install” column should contain, for each update:
- an expander (collapsed by default) for each top-level update where any of that package’s dependencies also have updates, or a blank space otherwise;
- a checkbox, checked by default, for whether the update will be installed;
the icon for the updated item;
the title of the updated item.
The “Download” column should contain a check mark “✓” (with accessible label “downloaded”) for updates that have already downloaded, and the size to one decimal place (e.g. “7.1 MB”, “883.0 KB”) for each update that has not already downloaded.
Whenever updateable application X Depends on updateable package Y, Y should be indented inside X’s expandable section. X’s checkbox should be a tri-state one, which is in the indeterminate state whenever some but not all of the dependent updates are checked.
Future work: The ability to turn on “Codename”, “Installed Version”, and/or “Available Version” columns?
Below the list of updates should be a pane describing the selected update. This pane should be collapsed by default.
Installing
If you activate “Install Now”, the alert should morph into a progress window.
The title of the window should be “Software Updater”, and the primary text should be “Installing updates…”. The button should read “Cancel” until the first update actually starts installing, and “Stop” thereafter; it should be insensitive whenever the update process does not allow stopping safely.
If you choose to restart or shut down the computer while updates are installing, regardless of whether they are installing in the progress window or in the background, then:
- all updates after the current one should be postponed;
- for as long as the current update takes to finish installing, the Plymouth shutdown screen should contain the centered text “Ubuntu needs to finish installing an update. One moment, please…”
After installing
If one or more of the updates require restarting the computer, and the progress window is open, it should morph into an alert explaining this. If the progress window was not open (because updates were being installed in the background), the alert should open separately. The alert should have a minimize button but no maximize or close button, the same as in all other stages of the update process.
(If you want to restart now, you can click the button; otherwise, you can minimize the alert.)
If updates were completed successfully, and the progress window is open, it should morph into the same alert as is used after a manual check where the system is already up to date.
User stories
- Sam is a college student who has recently migrated from to Windows XP to Ubuntu because he was fed up with adult sites installing spyware on his computer. The reason he had so much trouble with spyware was that XP kept on popping up balloons in the corner of the screen to tell him about security updates, but he closed them because that was the easiest thing to do. A few weeks after he installs Ubuntu, there is an important security update to Firefox.
- A computer running Ubuntu unattended is being used as part of a shop-window display. While the machine was still connected to the Internet, the window dresser cancelled a software update reminder.
- Helen is happily using Ubuntu 10.10 when it tells her that Ubuntu 11.04 has been released. Before she upgrades, she has some basic questions. What will the upgrade do? How long will it take? How much will it cost? Will she lose any of her files? What should she do if something goes wrong?
Design considerations
- The easiest path should be to install updates.
That Ubuntu updates are split into individual packages is an irrelevant detail that must not be exposed by default. For example, Microsoft ExpertZone’s “Comparing Windows 7 to Linux” retail course claims: “Linux can require a lot of time to maintain. For example, Ubuntu (a variety of Linux) may have hundreds of updates per month.” [screenshot from Overclock.net]
- Checking for updates should not be confused with downloading updates. For example, one netbook purchaser wondered why Update Manager said it was downloading the same 91 updates every time, because she thought the updates were actually being downloaded. [Dave Morley]
- Checking for, and installing, updates should not consume large amounts of bandwidth per month — especially when on mobile broadband.
Overall approaches considered
The ideal situation would be that Ubuntu never needs updates at all. However, our development process does not allow for that (and if it did, probably we would have no users).
The next best situation would be for updates to be completely automatic, as they are in Chrome and as they will be in Chrome OS. Unfortunately, large organizations using Ubuntu would likely object to this on several grounds, including bandwidth and retraining costs. However, we should minimize the interactivity of updates, by encouraging people to download updates in the background and/or install them during shutdown.
In Ubuntu 8.10 and earlier, we used a notification area icon to advertise updates, with a notification balloon initially pointing to it. This worked poorly — because an icon that small could never communicate, to a usefully large proportion of people, something as bureaucratic as software update availability. The notification balloon was necessary to explain the icon, but was annoying because it floated on top of every other window, and is basically incompatible with our new notification model.
Since before the initial release of Ubuntu Software Center, we have considered integrating updates into that interface instead of having a dedicated interface. However, this turns out to be less compelling than it might first appear. It is not a serious use case to be reminded of updates and to decide, upon that reminder, to install or remove other software at the same time. And the extra quantity of interface in Ubuntu Software Center would be a heavy cognitive burden for people who never need to install extra software at all.
The reverse case is more practical, however. When you are manually installing new software, bundling any pending updates along with it reduces the need to interrupt you later. We can achieve this by presenting the download and installation process in Ubuntu Software Center, while still doing the basic prompt in a separate interface for consistency with other update situations.
Finally, Sparkle, a third-party framework (hosted in Launchpad) for updating Mac applications, provides inspiration on how to present updates in a clear and understandable way.
Ideas
The process of keeping Ubuntu up to date has many steps, involving software, hardware, and human factors. There are potential opportunities at each step to increase the proportion of people who have secure and up-to-date software.
In order from source to destination:
- Engineer software to be less buggy to begin with.
- Engineer software so that proportionally fewer updates require a restart.
- Define proportionally fewer updates as critical.
Engineer software so that fewer security problems require critical updates (defense in depth).
- Aggregate same-package updates into a single release more often.
- Aggregate different-package updates requiring a restart more often.
- Make checking for updates faster.
- Check for security updates every day. But check for non-security updates only (a) a week after the last check or (b) when security updates are available, whichever is earlier. [vish]
- Reduce the amount of data that needs to be downloaded to check for updates.
- Make downloading faster.
- Install proportionally more updates in the background.
- Install more updates in the background by default.
- Make it easier to set updates to install in the background.
- Install proportionally more updates at the same time as other interruptions.
- Invite installation of updates when installing a new application.
- Wait for longer by default before presenting updates interactively.
- Improve the presentation of the updates-available alert.
- Reduce/eliminate the lag between an update being published and its description being available.
- Introduce human-readable descriptions for updates.
To know whether any of these techniques are effective, we also need to collect statistics on how many people install updates how quickly. [Oli Warner]
Unresolved issues
- What should happen with various HTTP errors?
- How do distinguish security updates from other updates?
Whether an update will require restarting, logging out, or restarting an application, should be presented before you choose to install it. How will we know this?
- How should automatic installation interact with interactive installation and the various session commands?
- Fix the "Partial Upgrade" mess
- Update Manager currently uses headings to separate “Security Updates”, “Distribution Updates”, “Recommended Updates”, “Other Updates (LP-PPA-something)”, etc. Is this necessary, and if so, how should it be presented?
SoftwareUpdates (last edited 2019-04-14 16:59:44 by mpt)