Author: glen                         Date: Thu Sep 23 10:30:17 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- create compreg.dat, xpti.dat on install
- remove similar files from profile on upgrades (needed especially major 
upgrade 3.0 -> 3.1) to fix "silent" start failure
- rel 2

---- Files affected:
packages/icedove:
   icedove.sh (1.8 -> 1.9) , icedove.spec (1.102 -> 1.103) 

---- Diffs:

================================================================
Index: packages/icedove/icedove.sh
diff -u packages/icedove/icedove.sh:1.8 packages/icedove/icedove.sh:1.9
--- packages/icedove/icedove.sh:1.8     Thu Sep 23 10:12:40 2010
+++ packages/icedove/icedove.sh Thu Sep 23 12:30:10 2010
@@ -11,11 +11,12 @@
 fi
 
 # compreg.dat and/or chrome.rdf will screw things up if it's from an
-# older version.  http://bugs.gentoo.org/show_bug.cgi?id=63999
+# older version. http://bugs.gentoo.org/show_bug.cgi?id=63999
 for f in ~/.icedove/*/{compreg.dat,chrome.rdf,XUL.mfasl}; do
-       if [[ -f ${f} && ${f} -ot "$0" ]]; then
-               echo "Removing ${f} leftover from older Icedove"
-               rm -f "${f}"
+       [ -f "$f" ] || continue
+       if [ "$f" -ot "$0" ] || [ "$f" -ot "$LIBDIR/components/compreg.dat" ]; 
then
+               echo "Removing $f leftover from older Icedove"
+               rm -f "$f"
        fi
 done
 

================================================================
Index: packages/icedove/icedove.spec
diff -u packages/icedove/icedove.spec:1.102 packages/icedove/icedove.spec:1.103
--- packages/icedove/icedove.spec:1.102 Thu Sep  9 14:34:34 2010
+++ packages/icedove/icedove.spec       Thu Sep 23 12:30:11 2010
@@ -34,7 +34,7 @@
 Summary(pl.UTF-8):     Icedove - klient poczty
 Name:          icedove
 Version:       3.1.3
-Release:       1
+Release:       2
 License:       MPL 1.1 or GPL v2+ or LGPL v2.1+
 Group:         X11/Applications/Networking
 Source0:       
http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2
@@ -378,9 +378,21 @@
 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
 cp -a %{topdir}/mozilla/icedove/branding/content/icon64.png 
$RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
 
-# files created by regxpcom -register
+# files created by regxpcom -register in post
 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
+cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register
+#!/bin/sh
+umask 022
+# make temporary HOME, as it attempts to touch files in $HOME/.mozilla
+# dangerous if you run this with sudo with keep_env += HOME
+# also TMPDIR could be pointing to sudo user's homedir so we reset that too.
+t=$(mktemp -d)
+rm -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
+TMPDIR= TMP= HOME=$t %{_libdir}/%{name}/icedove -register
+rm -rf $t
+EOF
+chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}/register
 
 %if %{with enigmail}
 
ext_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
@@ -426,6 +438,9 @@
 done
 exit 0
 
+%post
+%{_libdir}/%{name}/register || :
+
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/icedove
@@ -445,6 +460,7 @@
 %attr(755,root,root) %{_libdir}/%{name}/*-bin
 %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
 %attr(755,root,root) %{_libdir}/%{name}/icedove
+%attr(755,root,root) %{_libdir}/%{name}/register
 
 # symlinks
 %{_libdir}/%{name}/chrome
@@ -518,6 +534,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.103  2010/09/23 10:30:11  glen
+- create compreg.dat, xpti.dat on install
+- remove similar files from profile on upgrades (needed especially major 
upgrade 3.0 -> 3.1) to fix "silent" start failure
+- rel 2
+
 Revision 1.102  2010/09/09 12:34:34  glen
 - skip subshell in shell wrapper in normal mode
 - require sqlite with SQLITE_SECURE_DELETE enabled
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/icedove/icedove.sh?r1=1.8&r2=1.9&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/icedove/icedove.spec?r1=1.102&r2=1.103&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to