[oe-commits] Martin Jansa : GTK themes: remove link without waiting for enter in postinst.

git version control git at git.openembedded.org
Mon Sep 28 05:22:24 UTC 2009


Module: openembedded.git
Branch: shr/import
Commit: e461787da087b203121ee4cd2b4d7fed1cdbe5e6
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=e461787da087b203121ee4cd2b4d7fed1cdbe5e6

Author: Martin Jansa <martin.jansa at gmail.com>
Date:   Sun Sep 27 19:33:03 2009 +0000

GTK themes: remove link without waiting for enter in postinst.

Signed-off-by: Klaus Kurzmann <mok at fluxnetz.de>

---

 recipes/shr/gtk-theme-neo_git.bb              |    2 +-
 recipes/shr/gtk-theme.inc                     |   12 +++++++-----
 recipes/shr/shr-theme-gtk-e17lookalike_git.bb |    2 +-
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/recipes/shr/gtk-theme-neo_git.bb b/recipes/shr/gtk-theme-neo_git.bb
index 1e6d1c9..0a2eea1 100644
--- a/recipes/shr/gtk-theme-neo_git.bb
+++ b/recipes/shr/gtk-theme-neo_git.bb
@@ -6,7 +6,7 @@ RRECOMMENDS = "elementary-theme-neo e-wm-theme-illume-neo libframeworkd-phonegui
 LICENSE = "unknown"
 
 PV = "0.2-${EFL_SRCREV}-gitr${SRCPV}"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "git://git.shr-project.org/repo/shr-themes.git;protocol=http;branch=master"
 
diff --git a/recipes/shr/gtk-theme.inc b/recipes/shr/gtk-theme.inc
index c2c1907..863cf43 100644
--- a/recipes/shr/gtk-theme.inc
+++ b/recipes/shr/gtk-theme.inc
@@ -22,10 +22,12 @@ ALTERNATIVE_LINK = "${sysconfdir}/gtk-2.0/gtkrc"
 ALTERNATIVE_PATH = "${sysconfdir}/gtk-2.0/gtkrc.${PN}"
 
 pkg_postinst() {
-        if [[ -e /etc/gtk-2.0/gtkrc && ! -h /etc/gtk-2.0/gtkrc ]] ; then
-                echo "Removing file /etc/gtk-2.0/gtkrc, will be replaced with link managed by update-alternatives"
-                echo "Press enter to continue"
-                read
-                rm -f /etc/gtk-2.0/gtkrc
+        if [[ -e ${ALTERNATIVE_LINK} && ! -h ${ALTERNATIVE_LINK} ]] ; then
+                echo "warn: ${ALTERNATIVE_LINK} exists and it's not a link!"
+                echo "warn: It will be replaced with link managed by update-alternatives"
+                echo "warn: Moving ${ALTERNATIVE_LINK} to ${ALTERNATIVE_LINK}.old."
+                echo "warn: It should be empty but probably isn't!"
+                echo "warn: Check what's left there and remove it manually."
+                mv -f ${ALTERNATIVE_LINK} ${ALTERNATIVE_LINK}.old
         fi
 }
diff --git a/recipes/shr/shr-theme-gtk-e17lookalike_git.bb b/recipes/shr/shr-theme-gtk-e17lookalike_git.bb
index d98ea27..aacc86e 100644
--- a/recipes/shr/shr-theme-gtk-e17lookalike_git.bb
+++ b/recipes/shr/shr-theme-gtk-e17lookalike_git.bb
@@ -1,7 +1,7 @@
 DESCRIPTION = "A gtk theme that looks like e17"
 LICENSE = "MIT BSD"
 PV = "0.1.1-gitr${SRCPV}"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "git://git.shr-project.org/repo/shr-themes.git;protocol=http;branch=master"
 





More information about the Openembedded-commits mailing list