Bug 509394

Summary: pkcon update: Unable to install ubuntu-advantage-tools / neon-advantage-tools (during upgrade)
Product: [KDE Neon] neon Reporter: Daniel Duris <kdebugs>
Component: Packages User EditionAssignee: Neon Bugs <neon-bugs-null>
Status: CONFIRMED ---    
Severity: major CC: bugseforuns, carlosd.kde, jr, neon-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Daniel Duris 2025-09-11 21:01:42 UTC
SUMMARY
pkcon update

Log:
ubuntu-advantage-tools is already the newest version (99+p24.04+vrelease+git20250904.1337).
ubuntu-advantage-tools set to manually installed.
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up ubuntu-advantage-tools (99+p24.04+vrelease+git20250904.1337) ...
Invalid unit name "esm-cache.service​" escaped as "esm-cache.service\xe2\x80\x8b" (maybe you should use systemd-escape?).
dpkg-divert: error: 'diversion of /etc/apt/apt.conf.d/20apt-esm-hook.conf to /etc/apt/apt.conf.d/20apt-esm-hook.conf.disabled by ubuntu-advantage-tools' clashes with 'local diversion of /etc/apt/apt.conf.d/20apt-esm-hook.conf to /etc/apt/apt.conf.d/20apt-esm-hook.conf.disabled'
dpkg: error processing package ubuntu-advantage-tools (--configure):
installed ubuntu-advantage-tools package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of neon-ubuntu-advantage-tools:
neon-ubuntu-advantage-tools depends on ubuntu-advantage-tools; however:
Package ubuntu-advantage-tools is not configured yet.

dpkg: error processing package neon-ubuntu-advantage-tools (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
ubuntu-advantage-tools
neon-ubuntu-advantage-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

STEPS TO REPRODUCE
1. Neon upgrade (updates available) or CLI update

OBSERVED RESULT
packages unable to install

EXPECTED RESULT
packages installed 

SOFTWARE/OS VERSIONS
Distributor ID: Neon
Description:    KDE neon User Edition
Release:        24.04
Codename:       noble
Comment 1 Daniel Duris 2025-09-11 21:02:55 UTC
Actually this was the original message:
Proceed with changes? [N/y] Y

[=========================]
Updating packages                       [=========================]
Loading cache                           [=========================]
Downloading packages                    [=========================]
Running                                 [=========================]
Installing packages                     [=========================]
Finished                                [=========================]
Fatal error: Error while installing package: installed ubuntu-advantage-tools package post-installation script subprocess returned error exit status 2

Just after retry with apt install -f the messages in the comment above are shown. This also continues after uninstall (apt remove) and reinstall.
Comment 2 Patrick Silva 2025-09-11 23:59:15 UTC
Same on neon unstable edition.
Comment 3 Carlos De Maine 2025-09-15 02:42:36 UTC
hmm curious, this upgrade path worked in apt and plasma-discover but not pkcon cli.  guess will have to work out this systemd-scape stuff - "Invalid unit name "esm-cache.service​" escaped as "esm-cache.service\xe2\x80\x8b" (maybe you should use systemd-escape?)."