Package: codeblocks Version: 25.03+dfsg-2.1 Severity: normal Tags: patch X-Debbugs-Cc: [email protected]
Dear Maintainer,
Searching for Code::Blocks in AppStream-based software centres (GNOME
Software, KDE Discover, Ubuntu App Center) finds the IDE and offers to
install it, but the installation only pulls in codeblocks-common. No
/usr/bin/codeblocks is installed, so the launcher does nothing and the
IDE appears to be broken. Installing the codeblocks package with apt
works because that also installs the executable.
How to reproduce:
* On a clean system, open GNOME Software / KDE Discover / Ubuntu App
Center, search for "Code::Blocks" and install it.
* Only codeblocks-common is installed; /usr/bin/codeblocks is still
missing and the Code::Blocks launcher fails to start.
Equivalent check from the command line:
$ appstreamcli get codeblocks.desktop
Identifier: codeblocks.desktop [desktop-application]
Name: Code::Blocks IDE
Package: codeblocks-common
Root cause: the binary package codeblocks-common ships both
/usr/share/applications/codeblocks.desktop and
/usr/share/metainfo/codeblocks.appdata.xml, while the executable
/usr/bin/codeblocks is in the codeblocks package. appstream-generator
associates the desktop component with the binary package containing the
.desktop file, so the generated DEP-11 data contains
"Package: codeblocks-common". That package is Architecture: all and
does not depend on codeblocks, so installing it on its own provides a
launcher without an application.
This violates the AppStream packaging requirements. The Debian
AppStream guidelines say:
"In case your AppStream metadata is describing a desktop-application
(you can tell by the XML root-node having a type="desktop-application"
or type="desktop" attribute), the .appdata.xml file must be placed
in the same package as the .desktop file already is, which (as
above) must be the package containing the application itself."
The upstream distributor guidelines say:
"A binary package that contains AppStream desktop metadata must also
contain both the .desktop file for the application and the
application itself."
Please move usr/share/applications/codeblocks.desktop and
usr/share/metainfo/codeblocks.appdata.xml from
debian/codeblocks-common.install to debian/codeblocks.install. The
icons and the architecture-independent /usr/share/codeblocks data can
stay in codeblocks-common: codeblocks depends on that package, so the
icons and runtime data remain available. The attached patch also adds
Breaks/Replaces for codeblocks-common (<< ${source:Version}), so the
file move is handled correctly during upgrades; the substitution
resolves to the next upload version, so please bump debian/changelog
when applying it. A patch is attached
(0001-Move-AppStream-metadata-into-codeblocks-package.patch, also
available as codeblocks-appstream.debdiff).
I checked the result with dh_install: the codeblocks package now
receives usr/share/applications/codeblocks.desktop and
usr/share/metainfo/codeblocks.appdata.xml, and codeblocks-common no
longer ships either file.
This issue has also been reported against downstream software centres:
* Ubuntu bug #2024365:
https://bugs.launchpad.net/ubuntu/+source/codeblocks/+bug/2024365
* Upstream Code::Blocks ticket #1134:
https://sourceforge.net/p/codeblocks/tickets/1134/
* KDE bug #441495:
https://bugs.kde.org/show_bug.cgi?id=441495
* Ubuntu App Center issue #2322:
https://github.com/ubuntu/app-center/issues/2322
The same class of bug was fixed for LibreOffice in Debian bug #892364
(https://bugs.debian.org/892364) and Ubuntu bug #1738821
(https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1738821).
The problem is also present in Ubuntu's 25.03+dfsg-2.1 package.
Thanks,
Sergo Beruashvili
-- System Information:
Debian Release: forky/sid
APT prefers resolute-updates
APT policy: (500, 'resolute-updates'), (500, 'resolute-security'), (500,
'resolute'), (100, 'resolute-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 7.0.0-44-generic (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages codeblocks depends on:
pn codeblocks-common <none>
pn libastyle3 <none>
ii libatk1.0-0t64 2.60.4-0ubuntu0.1
ii libc6 2.43-2ubuntu2.7
ii libcairo-gobject2 1.18.4-3
ii libcairo2 1.18.4-3
pn libcodeblocks0t64 <none>
ii libgcc-s1 16-20260322-1ubuntu1
ii libgdk-pixbuf-2.0-0 2.44.5+dfsg-4ubuntu1
ii libglib2.0-0t64 2.88.0-1ubuntu0.1
ii libgtk-3-0t64 3.24.52-0ubuntu1
ii libharfbuzz0b 12.3.2-2
ii libpango-1.0-0 1.57.0-1
ii libpangocairo-1.0-0 1.57.0-1
ii libstdc++6 16-20260322-1ubuntu1
pn libtinyxml2.6.2v5 <none>
pn libwxbase3.2-1t64 <none>
pn libwxgtk3.2-1t64 <none>
ii zlib1g 1:1.3.dfsg+really1.3.1-1ubuntu3.2
Versions of packages codeblocks recommends:
ii g++ 4:15.2.0-5ubuntu1
ii gcc 4:15.2.0-5ubuntu1
ii gdb 17.1-2ubuntu1
pn xterm <none>
Versions of packages codeblocks suggests:
pn codeblocks-contrib <none>
pn libwxgtk3.0-dev <none>
0001-Move-AppStream-metadata-into-codeblocks-package.patch
Description: application/mbox

