1 |
commit: 83b44fc48c07a4d8f0b6cb361f61b1493965fcb2 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 16 14:20:48 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 26 21:16:19 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=83b44fc4 |
7 |
|
8 |
Update caches after reporting missing cache updates |
9 |
|
10 |
Call the appropriate updater to update caches after reporting a missing |
11 |
cache update, in order to stop repeating the same issue on subsequent |
12 |
packages that did not install any relevant files. |
13 |
|
14 |
Closes: https://github.com/gentoo/portage/pull/195 |
15 |
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org> |
16 |
|
17 |
bin/postinst-qa-check.d/50gnome2-utils | 9 +++++++++ |
18 |
bin/postinst-qa-check.d/50xdg-utils | 18 ++++++++++++++++++ |
19 |
2 files changed, 27 insertions(+) |
20 |
|
21 |
diff --git a/bin/postinst-qa-check.d/50gnome2-utils b/bin/postinst-qa-check.d/50gnome2-utils |
22 |
index 4e7c6eb85..d0cbb4037 100644 |
23 |
--- a/bin/postinst-qa-check.d/50gnome2-utils |
24 |
+++ b/bin/postinst-qa-check.d/50gnome2-utils |
25 |
@@ -16,6 +16,15 @@ gnome2_icon_cache_check() { |
26 |
while read -r -d $'\0' f; do |
27 |
files+=( "${f}" ) |
28 |
done < <(find "${d}" -mindepth 2 -type f "${find_args[@]}" -print0) |
29 |
+ |
30 |
+ # if any files were found, update the db to avoid repeating |
31 |
+ # the warning for subsequent packages |
32 |
+ # (note: yes, it will eagerly repeat the update for next dirs |
33 |
+ # but that's a minor issue) |
34 |
+ if [[ ${files[@]} ]]; then |
35 |
+ addwrite "${d}" |
36 |
+ gtk-update-icon-cache -qf "${d}" |
37 |
+ fi |
38 |
done |
39 |
|
40 |
if [[ ${files[@]} ]]; then |
41 |
|
42 |
diff --git a/bin/postinst-qa-check.d/50xdg-utils b/bin/postinst-qa-check.d/50xdg-utils |
43 |
index b0bb029bd..9f5e9a48c 100644 |
44 |
--- a/bin/postinst-qa-check.d/50xdg-utils |
45 |
+++ b/bin/postinst-qa-check.d/50xdg-utils |
46 |
@@ -17,6 +17,15 @@ xdg_desktop_database_check() { |
47 |
files+=( "${f}" ) |
48 |
done < <(find "${d}" -name '*.desktop' "${find_args[@]}" \ |
49 |
-exec grep -lZi '^MimeType=' {} +) |
50 |
+ |
51 |
+ # if any files were found, update the db to avoid repeating |
52 |
+ # the warning for subsequent packages |
53 |
+ # (note: yes, it will eagerly repeat the update for next dirs |
54 |
+ # but it's a minor issue and we have only one dir anyway) |
55 |
+ if [[ ${files[@]} ]]; then |
56 |
+ addwrite "${d}" |
57 |
+ update-desktop-database "${d}" |
58 |
+ fi |
59 |
done |
60 |
|
61 |
if [[ ${files[@]} ]]; then |
62 |
@@ -42,6 +51,15 @@ xdg_mimeinfo_database_check() { |
63 |
while read -r -d $'\0' f; do |
64 |
files+=( "${f}" ) |
65 |
done < <(find "${d}" -name '*.xml' "${find_args[@]}" -print0) |
66 |
+ |
67 |
+ # if any files were found, update the db to avoid repeating |
68 |
+ # the warning for subsequent packages |
69 |
+ # (note: yes, it will eagerly repeat the update for next dirs |
70 |
+ # but it's a minor issue and we have only one dir anyway) |
71 |
+ if [[ ${files[@]} ]]; then |
72 |
+ addwrite "${d}" |
73 |
+ update-mime-database "${d}" |
74 |
+ fi |
75 |
done |
76 |
|
77 |
if [[ ${files[@]} ]]; then |