[Bug 2095535] Re: ubuntu-release-upgrader Qt interface Qt6 incompatibility

Nick Rosbrook 2095535 at bugs.launchpad.net
Tue Apr 1 21:24:23 UTC 2025


For upgrades from oracular -> plucky, I am not sure this is just about
missing dependencies.

On a fresh Kubuntu 24.10 installation, I initially ran this to confirm
the issue:

ubuntu at ubuntu:~$ do-release-upgrade -d -m desktop -f DistUpgradeViewKDE
Checking for a new Ubuntu release
localuser:root being added to access control list
Checking for a new Ubuntu release
kde
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherCore.py:237: Warning: W:Download is performed unsandboxed as root as file 'plucky.tar.gz.gpg' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
  result = fetcher.run()
authenticate 'plucky.tar.gz' against 'plucky.tar.gz.gpg' 
extracting 'plucky.tar.gz'
can't load DistUpgradeViewKDE (No module named 'PyQt6')
can't load DistUpgradeViewGtk3 (Namespace Vte not available)
can't load DistUpgradeViewKDE (No module named 'PyQt6')

[ ... ]

So, the upgrade continues just fine, but not with the GUI frontend. So,
then I tried installing missing dependencies (which have been added for
plucky):

ubuntu at ubuntu:~$ cat log 
The following package was automatically installed and is no longer required:
  libkf5networkmanagerqt6
Use 'sudo apt autoremove' to remove it.

Installing:
  pyqt6-dev-tools  python3-pyqt6  python3-pyqt6.qtquick

Installing dependencies:
  libqt6test6  python3-pyqt6.qtqml  python3-pyqt6.sip

Summary:
  Upgrading: 0, Installing: 6, Removing: 0, Not Upgrading: 0
  Download size: 3,530 kB
  Space needed: 21.1 MB / 21.7 GB available

[ ... ]

Then, I try the upgrade again, and see these errors instead in the
terminal:

ubuntu at ubuntu:~$ do-release-upgrade -d -m desktop -f DistUpgradeViewKDE
Checking for a new Ubuntu release
localuser:root being added to access control list
Checking for a new Ubuntu release
kde
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherCore.py:237: Warning: W:Download is performed unsandboxed as root as file 'plucky.tar.gz.gpg' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
  result = fetcher.run()
authenticate 'plucky.tar.gz' against 'plucky.tar.gz.gpg' 
extracting 'plucky.tar.gz'
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
exitMainLoopMidFlight

On the GUI side of things, the main window never appears. I *do* get
intermittent pop-ups, e.g. asking if I want to continue, and informing
me about the screen lock being disabled. But, the *main* GUI window,
showing progress etc., never appears.

** Changed in: ubuntu-release-upgrader (Ubuntu Noble)
       Status: New => Incomplete

** Changed in: ubuntu-release-upgrader (Ubuntu Oracular)
       Status: In Progress => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/2095535

Title:
  ubuntu-release-upgrader Qt interface Qt6 incompatibility

Status in ubuntu-release-upgrader package in Ubuntu:
  Fix Released
Status in update-manager-core package in Ubuntu:
  Invalid
Status in ubuntu-release-upgrader source package in Noble:
  Incomplete
Status in update-manager-core source package in Noble:
  Invalid
Status in ubuntu-release-upgrader source package in Oracular:
  Incomplete
Status in update-manager-core source package in Oracular:
  Invalid
Status in ubuntu-release-upgrader source package in Plucky:
  Fix Released
Status in update-manager-core source package in Plucky:
  Invalid

Bug description:
  [Impact]

  Qt-based flavors of Ubuntu are unable to upgrade oracular -> plucky
  due to Qt6 incompatibility issues. I have done the legwork and
  refactored the code so that it works.

  [Test Case]

  * From Kubuntu, attempt an upgrade via 'do-release-upgrade -d -m
  desktop -f DistUpgradeViewKDE'

  Expected: Upgrade interface works.

  Actual: Upgrade fails with multiple Qt incompatibilities

  * Testing the fix requires 'do-release-upgrade -d' from the terminal,
  and saying "no" at the second y/N prompt. From there, navigate to
  '/tmp/ubuntu-release-upgrade-{hash}' and add
  https://git.launchpad.net/~ubuntu-qt-code/ubuntu-release-
  upgrader/plain/DistUpgrade/DistUpgradeViewKDE.py?h=ubuntu/main to the
  folder.

  * Additionally, add the following dependencies:

   - pyqt6-dev-tools
   - python3-pyqt6
   - python3-pyqt6.qtquick

  * Once that's done, from the `/tmp/ubuntu-release-upgrader-{hash}`
  directory, run 'sudo -E ./plucky'. The upgrade should function at this
  point.

  [What could go wrong]

  In my testing in a VM, this failed to bring up a progress window, but
  also did not fail outright with any errors. That could be the nature
  of the VM and the testing, but if that's not the case, then further
  refinements may be required.

  [Original Bug]

  This is likely an issue RE: Qt5 vs Qt6. I have reason to believe the
  code is still Qt5 but oracular and higher is Qt6, meaning the code
  needs to be refactored.

  Terminal output:

  $ do-release-upgrade -d -m desktop -f DistUpgradeViewKDE

  Checking for a new Ubuntu release
  localuser:root being added to access control list
  Checking for a new Ubuntu release
  kde
  error: XDG_RUNTIME_DIR is invalid or not set in the environment.
  Failed to create wl_display (No such file or directory)
  qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
  QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
  /usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherCore.py:237: Warning: W:Download is performed unsandboxed as root as file 'plucky.tar.gz.gpg' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
    result = fetcher.run()
  authenticate 'plucky.tar.gz' against 'plucky.tar.gz.gpg'
  extracting 'plucky.tar.gz'
  error: XDG_RUNTIME_DIR is invalid or not set in the environment.
  Failed to create wl_display (No such file or directory)
  qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
  can't load DistUpgradeViewKDE (type object 'QTextOption' has no attribute 'NoWrap')
  can't load DistUpgradeViewGtk3 (Namespace Vte not available)
  can't load DistUpgradeViewKDE (type object 'QTextOption' has no attribute 'NoWrap')

  Reading cache

  Checking package manager
  Reading package lists... Done
  Building dependency tree... Done
  Reading state information... Done
  Hit http://security.ubuntu.com/ubuntu oracular-security InRelease
  Hit http://us.archive.ubuntu.com/ubuntu oracular InRelease
  Hit http://us.archive.ubuntu.com/ubuntu oracular-updates InRelease
  Hit http://us.archive.ubuntu.com/ubuntu oracular-backports InRelease
  Fetched 0 B in 0s (0 B/s)
  Reading package lists... Done
  Building dependency tree... Done
  Reading state information... Done
  Fetched 0 B in 0s (0 B/s)

  Checking for installed snaps

  Calculating snap size requirements

  Updating repository information
  Segmentation fault (core dumped)

  ProblemType: Bug
  DistroRelease: Ubuntu 24.10
  Package: ubuntu-release-upgrader-core 1:24.10.13
  ProcVersionSignature: Ubuntu 6.11.0-13.14-generic 6.11.0
  Uname: Linux 6.11.0-13-generic x86_64
  ApportVersion: 2.30.0-0ubuntu4
  Architecture: amd64
  CasperMD5CheckResult: pass
  CrashDB: ubuntu
  CurrentDesktop: KDE
  Date: Wed Jan 22 11:15:22 2025
  InstallationDate: Installed on 2024-04-11 (287 days ago)
  InstallationMedia: Ubuntu-Studio 24.04 LTS "Noble Numbat" - Beta amd64 (20240410.2)
  PackageArchitecture: all
  SourcePackage: ubuntu-release-upgrader
  Symptom: ubuntu-release-upgrader
  UpgradeStatus: Upgraded to oracular on 2025-01-22 (0 days ago)
  VarLogDistupgradeAptHistorylog:
   Start-Date: 2025-01-22  11:13:58
   Requested-By: erich (1000)
   End-Date: 2025-01-22  11:13:58
  VarLogDistupgradeAptlog:
   Log time: 2025-01-22 11:13:55.234080
   Log time: 2025-01-22 11:13:57.748196
  VarLogDistupgradeApttermlog:
   Log started: 2025-01-22  11:13:58
   Log ended: 2025-01-22  11:13:58
  VarLogDistupgradeTermlog:

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2095535/+subscriptions




More information about the foundations-bugs mailing list