[SRU] Add support for release upgrading
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lubuntu-update-notifier (Ubuntu) |
Fix Released
|
Medium
|
Simon Quigley | ||
Jammy |
Confirmed
|
Medium
|
Simon Quigley | ||
Lunar |
Fix Released
|
Medium
|
Simon Quigley | ||
Mantic |
Fix Released
|
Medium
|
Simon Quigley |
Bug Description
[ Impact ]
The lubuntu-
In bug 2002255, a precedent was set regarding updates to this software. When initially shipped, it was a rather primitive application with rough edges, especially around error handling. We have since polished it, adding necessary information (for example, debconf prompts).
This bug is regarding the default user experience around upgrading to the latest version of Lubuntu. There is currently no graphical way in which the user is prompted for or allowed to proceed with the upgrade. In our notes, we typically ask them to run `sudo do-release-
The upload at hand fixes that. When the user is prompted for updates, they will be asked afterwards about upgrading to the latest release (if available). This evaluation is done via `do-release-upgrade -c`, not by re-implementing any existing logic. If they choose to accept, the existing Qt frontend is launched, via `lxqt-sudo do-release-upgrade -m desktop -f DistUpgradeView
Noble is not affected by this, because a complete rewrite is now in the release pocket. This uses C++/Qt 5 and already implements this functionality.
[ Technical Details ]
The update notifier is started by `lubuntu-
In the Python file, I added an argument via ArgParse which converts that exit code into a boolean (for more Pythonic use later). That boolean is then passed (through a few functions and class declarations) to `Dialog.initUI()`.
If the dialog is launched without any packages to upgrade but with a release to upgrade to, it will skip right to that function. (Setting the title to "Upgrade Lubuntu" is declared twice, once for a window without any upgrades, and another for the "after-upgrade" step.)
This is where the additional import of QThread (etc.) comes in; while it's not the original bug, when an additional window pops up, the original update notifier window freezes. To fix that, I created a special class which inherits QThread, and used that to call subprocess (I tried to use the Python threading library, but the freeze was still happening).
Both `Dialog.
When that QThread process is done, a clean `app.exit()` is performed (via an existing function).
You might notice `self.buttonBox
Additionally, if Launchpad can be queried, a link to our release announcement is generated.
[ Test Plan ]
(Jammy only)
* Run `sudo sed -i "s/lts/normal/" /etc/update-
* Log out and log back in (to restart the notifier).
* Install any updates (if there are any to install).
- There's two sub-testcases here. The first is a system where updates are being applied, and when prompted, the user goes ahead with the upgrade. The second is a system where all updates are already applied, and on first launch it prompts the user to upgrade.
* Click the link to ensure it brings you to the correct release notes.
* Go through the upgrade process, ensuring the window smoothly closes.
[ Where problems could occur ]
* If `do-release-
* If the output of `do-release-upgrade -c` changes drastically, the version will not be detected.
* All Launchpad error handling is pretty bluntly done; if it can't access it for any reason, the fallback is no link.
* Existing Qt bugs could very well manifest themselves in this application. By importing an additional Qt library, you're technically increasing the surface area in which errors can occur.
* This relies on the increasingly-
Changed in lubuntu-update-notifier (Ubuntu Jammy): | |
importance: | Undecided → Medium |
Changed in lubuntu-update-notifier (Ubuntu Lunar): | |
importance: | Undecided → Medium |
Changed in lubuntu-update-notifier (Ubuntu Mantic): | |
importance: | Undecided → Medium |
Changed in lubuntu-update-notifier (Ubuntu Jammy): | |
status: | New → In Progress |
Changed in lubuntu-update-notifier (Ubuntu Lunar): | |
status: | New → In Progress |
Changed in lubuntu-update-notifier (Ubuntu Mantic): | |
status: | New → In Progress |
Changed in lubuntu-update-notifier (Ubuntu Jammy): | |
assignee: | nobody → Simon Quigley (tsimonq2) |
Changed in lubuntu-update-notifier (Ubuntu Lunar): | |
assignee: | nobody → Simon Quigley (tsimonq2) |
Changed in lubuntu-update-notifier (Ubuntu Mantic): | |
assignee: | nobody → Simon Quigley (tsimonq2) |
Changed in lubuntu-update-notifier (Ubuntu Lunar): | |
status: | Incomplete → In Progress |
description: | updated |
Sometime ago[1] ubuntu- release- upgrader was modified so that sudo is called with the `-E` so that environment variables are passed along to do-release-upgrade. While this was initially done for a specific environment variable it is also important that other environment variables are passed to do-release upgrade e.g. XDG_SESSION_TYPE. Looking at the diff I don't see `-E` but then again I don't know if lxqt-sudo supports that argument.
Regardless, you could provide some details about whether or not environment variables are passed to do-release-upgrade?
[1] https:/ /git.launchpad. net/ubuntu- release- upgrader/ commit/ ?id=f8495802109 47308892c42e8a5 c12a1d8b039c26