Debian Codegraph @

debian/patches/0016-calibre-fix-appstream-ID-warning-Closes-1076311.patch

raw
1 From: Petter Reinholdtsen <[email protected]>
2 Date: Sun, 14 Jul 2024 10:20:09 +0200
3 Subject: calibre: fix appstream ID warning (Closes: #1076311)
4
5 Package: calibre
6 Version: 6.13.0+repack-2
7 Tags: patch
8
9 <URL: https://appstream.debian.org/sid/main/issues/calibre.html >
10 contain the following warning about the content of the appstream
11 metadata file:
12
13 * asv-cid-desktopapp-is-not-rdns
14 calibre-gui.metainfo.xml:3 - calibre-gui.desktop
15 The component ID is not a reverse domain-name. Please update the ID
16 to avoid future issues and be compatible with all AppStream
17 implementations. You may also consider to update the name of the
18 accompanying .desktop file to follow the latest version of the
19 Desktop-Entry specification and use a rDNS name for it as well. In
20 any case, do not forget to mention the new desktop-entry in a
21 <launchable/> tag for this component to keep the application
22 launchable from software centers and the .desktop file data
23 associated with the metainfo data.
24
25 I believe the following untested patch will solve the issue. Sadly I
26 lack the required free disk space available to test this patch.
27
28 Signed-off-by: YOKOTA Hiroshi <[email protected]>
29 ---
30 src/calibre/linux.py | 5 ++++-
31 1 file changed, 4 insertions(+), 1 deletion(-)
32
33 diff --git a/src/calibre/linux.py b/src/calibre/linux.py
34 index 515b232..3f7f4b2 100644
35 --- a/src/calibre/linux.py
36 +++ b/src/calibre/linux.py
37 @@ -1242,6 +1242,7 @@ def get_appdata():
38 ),
39 ),
40 'desktop-id': 'calibre-gui.desktop',
41 + 'appstream-id': 'com.calibre_ebook.calibre',
42 'include-releases': True,
43 },
44 'calibre-ebook-edit': {
45 @@ -1271,6 +1272,7 @@ def get_appdata():
46 ),
47 ),
48 'desktop-id': 'calibre-ebook-edit.desktop',
49 + 'appstream-id': 'com.calibre_ebook.calibre.ebook_edit',
50 },
51 'calibre-ebook-viewer': {
52 'name': 'calibre - E-book Viewer',
53 @@ -1292,6 +1294,7 @@ def get_appdata():
54 ),
55 ),
56 'desktop-id': 'calibre-ebook-viewer.desktop',
57 + 'appstream-id': 'com.calibre_ebook.calibre.ebook_viewer',
58 },
59 }
60
61 @@ -1365,7 +1368,7 @@ def write_appdata(key, entry, base, translators):
62 description.append(E.p(tp, **{'{http://www.w3.org/XML/1998/namespace}lang': lang}))
63
64 root = E.component(
65 - E.id(key + '.desktop'),
66 + E.id(entry['appstream-id']),
67 E.name(entry['name']),
68 E.metadata_license('CC0-1.0'),
69 E.project_license('GPL-3.0'),