1 |
Call the appropriate updater to update caches after reporting a missing |
2 |
cache update, in order to stop repeating the same issue on subsequent |
3 |
packages that did not install any relevant files. |
4 |
--- |
5 |
bin/postinst-qa-check.d/50gnome2-utils | 8 ++++++++ |
6 |
bin/postinst-qa-check.d/50xdg-utils | 16 ++++++++++++++++ |
7 |
2 files changed, 24 insertions(+) |
8 |
|
9 |
// (a followup to postinst patches) |
10 |
|
11 |
diff --git a/bin/postinst-qa-check.d/50gnome2-utils b/bin/postinst-qa-check.d/50gnome2-utils |
12 |
index 68e21cb74..97495f07b 100644 |
13 |
--- a/bin/postinst-qa-check.d/50gnome2-utils |
14 |
+++ b/bin/postinst-qa-check.d/50gnome2-utils |
15 |
@@ -16,6 +16,14 @@ gnome2_icon_cache_check() { |
16 |
while read -r -d $'\0' f; do |
17 |
files+=( "${f}" ) |
18 |
done < <(find "${d}" -mindepth 2 -type f "${find_args[@]}" -print0) |
19 |
+ |
20 |
+ # if any files were found, update the db to avoid repeating |
21 |
+ # the warning for subsequent packages |
22 |
+ # (note: yes, it will eagerly repeat the update for next dirs |
23 |
+ # but that's a minor issue) |
24 |
+ if [[ ${files[@]} ]]; then |
25 |
+ gtk-update-icon-cache -qf "${d}" |
26 |
+ fi |
27 |
done |
28 |
|
29 |
if [[ ${files[@]} ]]; then |
30 |
diff --git a/bin/postinst-qa-check.d/50xdg-utils b/bin/postinst-qa-check.d/50xdg-utils |
31 |
index 4bc7bee9a..8c33b2dfe 100644 |
32 |
--- a/bin/postinst-qa-check.d/50xdg-utils |
33 |
+++ b/bin/postinst-qa-check.d/50xdg-utils |
34 |
@@ -17,6 +17,14 @@ xdg_desktop_database_check() { |
35 |
files+=( "${f}" ) |
36 |
done < <(find "${d}" -name '*.desktop' "${find_args[@]}" \ |
37 |
-exec grep -lZi '^MimeType=' {} +) |
38 |
+ |
39 |
+ # if any files were found, update the db to avoid repeating |
40 |
+ # the warning for subsequent packages |
41 |
+ # (note: yes, it will eagerly repeat the update for next dirs |
42 |
+ # but it's a minor issue and we have only one dir anyway) |
43 |
+ if [[ ${files[@]} ]]; then |
44 |
+ update-desktop-database "${d}" |
45 |
+ fi |
46 |
done |
47 |
|
48 |
if [[ ${files[@]} ]]; then |
49 |
@@ -42,6 +50,14 @@ xdg_mimeinfo_database_check() { |
50 |
while read -r -d $'\0' f; do |
51 |
files+=( "${f}" ) |
52 |
done < <(find "${d}" -name '*.xml' "${find_args[@]}" -print0) |
53 |
+ |
54 |
+ # if any files were found, update the db to avoid repeating |
55 |
+ # the warning for subsequent packages |
56 |
+ # (note: yes, it will eagerly repeat the update for next dirs |
57 |
+ # but it's a minor issue and we have only one dir anyway) |
58 |
+ if [[ ${files[@]} ]]; then |
59 |
+ update-mime-database "${d}" |
60 |
+ fi |
61 |
done |
62 |
|
63 |
if [[ ${files[@]} ]]; then |
64 |
-- |
65 |
2.14.1 |