Bug 481324

Summary: KDE Neon testing; pkcon update fatal error
Product: [KDE Neon] neon Reporter: freedriven <rnd>
Component: Packages Testing EditionAssignee: Neon Bugs <neon-bugs>
Status: REPORTED ---    
Severity: normal CC: clay, jr, neon-bugs, sitter, tagwerk19
Priority: NOR Keywords: qt6
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description freedriven 2024-02-14 14:28:11 UTC
SUMMARY
Most recent pkcon update fails.


STEPS TO REPRODUCE
1. run at command line: "sudo pkcon refresh"
2. "sudo pkcon update" 
3. 

OBSERVED RESULT
Fatal error: Error while installing package: trying to overwrite '/usr/share/applications/kde-mimeapps.list', which is also in package neon-settings-2 0.4+p22.04+vstable+git20240125.1041


EXPECTED RESULT
Update works correctly

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.1

ADDITIONAL INFORMATION
Comment 1 freedriven 2024-02-15 16:26:59 UTC
Problem still there after recent package updates.
Cleaning the apt cache didn't help.
More information from sudo apt full-update:
dpkg: error processing archive /var/cache/apt/archives/plasma-desktop_4%3a5.91.90+p22.04+vstable+git20240215.0413-0_amd64.deb (--unpack):
 trying to overwrite '/usr/share/applications/kde-mimeapps.list', which is also in package neon-settings-20.4+p22.04+vstable+git20240125.1041
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/plasma-desktop_4%3a5.91.90+p22.04+vstable+git20240215.0413-0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Comment 2 tagwerk19 2024-02-17 21:06:08 UTC
From a matching thread in discuss.kde.org:
    https://discuss.kde.org/t/neon-plasma-6-0-pkcon-update-fatal-error/10644

Find what needs to be force installed (from /var/log/apt/term.log) and then forcing the overwrite worked for me:

    $ sudo dpkg -i --force-overwrite /var/cache/apt/archives/plasma-desktop_4%3a5.91.90+p22.04+vstable+git20240215.0413-0_amd64.deb
    (Reading database ... 362884 files and directories currently installed.)
    Preparing to unpack .../plasma-desktop_4%3a5.91.90+p22.04+vstable+git20240215.0413-0_amd64.deb ... 
    Unpacking plasma-desktop (4:5.91.90+p22.04+vstable+git20240215.0413-0) over (4:5.91.90+p22.04+vstable+git20240208.0306-0) ...
    dpkg: warning: overriding problem because --force enabled:
    dpkg: warning: trying to overwrite '/usr/share/applications/kde-mimeapps.list', which is also in package neon-settings-2 0.4+p22.04+vstable+git20240125.1041
    Setting up plasma-desktop (4:5.91.90+p22.04+vstable+git20240215.0413-0) ...
    Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
    Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
    Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
    Processing triggers for hicolor-icon-theme (0.17-2) ...
Comment 3 freedriven 2024-02-17 22:51:38 UTC
Identifying the package and forcing the dpkg installed worked, thanks!