diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2013-02-12 18:12:39 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-13 16:52:29 +0000 |
commit | ceabaf626538ccdbd06ec4e8d87024216a064f52 (patch) | |
tree | c9570cd04d2a96cbe4923833a7dccd808428e327 | |
parent | 5bb362a0ba97687029b3aef76b7e789570a4d728 (diff) | |
download | poky-ceabaf626538ccdbd06ec4e8d87024216a064f52.tar.gz |
gtk-icon-cache.bbclass: use postinst_intercept script
Since the hook has been made a standalone script, use postinst_intercept
script in order to "link" the package to the hook.
(From OE-Core rev: d7ddae84165b5b84dc6ac640fd492ade891ddd4e)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/gtk-icon-cache.bbclass | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass index cf33efd5a6..2ca99acdf9 100644 --- a/meta/classes/gtk-icon-cache.bbclass +++ b/meta/classes/gtk-icon-cache.bbclass | |||
@@ -2,23 +2,15 @@ FILES_${PN} += "${datadir}/icons/hicolor" | |||
2 | 2 | ||
3 | DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+-native" | 3 | DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+-native" |
4 | 4 | ||
5 | # | ||
6 | # On host, the postinstall MUST return 1 because we do not know if the intercept | ||
7 | # hook will succeed. If it does succeed, than the packages will be marked as | ||
8 | # installed. | ||
9 | # | ||
5 | gtk_icon_cache_postinst() { | 10 | gtk_icon_cache_postinst() { |
6 | if [ "x$D" != "x" ]; then | 11 | if [ "x$D" != "x" ]; then |
7 | if [ ! -f $INTERCEPT_DIR/update_icon_cache ]; then | 12 | $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} |
8 | cat << "EOF" > $INTERCEPT_DIR/update_icon_cache | 13 | exit 1 |
9 | #!/bin/sh | ||
10 | |||
11 | # update native pixbuf loaders | ||
12 | gdk-pixbuf-query-loaders --update-cache | ||
13 | |||
14 | for icondir in $D/usr/share/icons/*/ ; do | ||
15 | if [ -d $icondir ] ; then | ||
16 | gtk-update-icon-cache -fqt $icondir | ||
17 | fi | ||
18 | done | ||
19 | EOF | ||
20 | fi | ||
21 | exit 0 | ||
22 | fi | 14 | fi |
23 | 15 | ||
24 | # Update the pixbuf loaders in case they haven't been registered yet | 16 | # Update the pixbuf loaders in case they haven't been registered yet |
@@ -33,21 +25,8 @@ done | |||
33 | 25 | ||
34 | gtk_icon_cache_postrm() { | 26 | gtk_icon_cache_postrm() { |
35 | if [ "x$D" != "x" ]; then | 27 | if [ "x$D" != "x" ]; then |
36 | if [ ! -f $INTERCEPT_DIR/update_icon_cache ]; then | 28 | $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} |
37 | cat << "EOF" > $INTERCEPT_DIR/update_icon_cache | 29 | exit 1 |
38 | #!/bin/sh | ||
39 | |||
40 | # update native pixbuf loaders | ||
41 | gdk-pixbuf-query-loaders --update-cache | ||
42 | |||
43 | for icondir in $D/usr/share/icons/*/ ; do | ||
44 | if [ -d $icondir ] ; then | ||
45 | gtk-update-icon-cache -fqt $icondir | ||
46 | fi | ||
47 | done | ||
48 | EOF | ||
49 | fi | ||
50 | exit 0 | ||
51 | fi | 30 | fi |
52 | 31 | ||
53 | for icondir in /usr/share/icons/* ; do | 32 | for icondir in /usr/share/icons/* ; do |