packages: mozilla/mozilla.spec - update chrome+xpcom-generate run so it is ...

glen glen at pld-linux.org
Thu Mar 25 13:26:54 CET 2010


Author: glen                         Date: Thu Mar 25 12:26:54 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- update chrome+xpcom-generate run so it is run only once on installs and upgrades
  and avoid executing it if the script does not exist (main package is removed
  in same transaction)

---- Files affected:
packages/mozilla:
   mozilla.spec (1.397 -> 1.398) 

---- Diffs:

================================================================
Index: packages/mozilla/mozilla.spec
diff -u packages/mozilla/mozilla.spec:1.397 packages/mozilla/mozilla.spec:1.398
--- packages/mozilla/mozilla.spec:1.397	Fri Jul  3 01:52:18 2009
+++ packages/mozilla/mozilla.spec	Thu Mar 25 13:26:49 2010
@@ -1,4 +1,6 @@
 # $Revision$, $Date$
+# TODO
+# - browser plugins v2
 #
 # Conditional build:
 %bcond_with	gtk1	# use GTK+ 1.2.x instead of 2.x.x
@@ -516,55 +518,68 @@
 rm -rf $RPM_BUILD_ROOT
 
 %post
-umask 022
-%{_sbindir}/mozilla-chrome+xpcom-generate
-
-%postun
 if [ "$1" = "1" ]; then
 	%{_sbindir}/mozilla-chrome+xpcom-generate
 fi
 
+%postun
+[ ! -x %{_sbindir}/mozilla-chrome+xpcom-generate ] || %{_sbindir}/mozilla-chrome+xpcom-generate
+
 %post mailnews
-%{_sbindir}/mozilla-chrome+xpcom-generate
+if [ "$1" = "1" ]; then
+	%{_sbindir}/mozilla-chrome+xpcom-generate
+fi
 
 %postun mailnews
-%{_sbindir}/mozilla-chrome+xpcom-generate
+[ ! -x %{_sbindir}/mozilla-chrome+xpcom-generate ] || %{_sbindir}/mozilla-chrome+xpcom-generate
 
 %post addon-enigmail
-%{_sbindir}/mozilla-chrome+xpcom-generate
+if [ "$1" = "1" ]; then
+	%{_sbindir}/mozilla-chrome+xpcom-generate
+fi
 
 %postun addon-enigmail
-%{_sbindir}/mozilla-chrome+xpcom-generate
+[ ! -x %{_sbindir}/mozilla-chrome+xpcom-generate ] || %{_sbindir}/mozilla-chrome+xpcom-generate
 
 %post chat
-%{_sbindir}/mozilla-chrome+xpcom-generate
+if [ "$1" = "1" ]; then
+	%{_sbindir}/mozilla-chrome+xpcom-generate
+fi
 
 %postun chat
-%{_sbindir}/mozilla-chrome+xpcom-generate
+[ ! -x %{_sbindir}/mozilla-chrome+xpcom-generate ] || %{_sbindir}/mozilla-chrome+xpcom-generate
 
 %post js-debugger
-%{_sbindir}/mozilla-chrome+xpcom-generate
+if [ "$1" = "1" ]; then
+	%{_sbindir}/mozilla-chrome+xpcom-generate
+fi
 
 %postun js-debugger
-%{_sbindir}/mozilla-chrome+xpcom-generate
+[ ! -x %{_sbindir}/mozilla-chrome+xpcom-generate ] || %{_sbindir}/mozilla-chrome+xpcom-generate
 
 %post dom-inspector
-%{_sbindir}/mozilla-chrome+xpcom-generate
+if [ "$1" = "1" ]; then
+	%{_sbindir}/mozilla-chrome+xpcom-generate
+fi
 
 %postun dom-inspector
-%{_sbindir}/mozilla-chrome+xpcom-generate
+[ ! -x %{_sbindir}/mozilla-chrome+xpcom-generate ] || %{_sbindir}/mozilla-chrome+xpcom-generate
 
 %post gnomevfs
-%{_sbindir}/mozilla-chrome+xpcom-generate
+if [ "$1" = "1" ]; then
+	%{_sbindir}/mozilla-chrome+xpcom-generate
+fi
 
 %postun gnomevfs
-%{_sbindir}/mozilla-chrome+xpcom-generate
+[ ! -x %{_sbindir}/mozilla-chrome+xpcom-generate ] || %{_sbindir}/mozilla-chrome+xpcom-generate
 
 %post calendar
-%{_sbindir}/mozilla-chrome+xpcom-generate
+if [ "$1" = "1" ]; then
+	%{_sbindir}/mozilla-chrome+xpcom-generate
+fi
 
 %postun calendar
-%{_sbindir}/mozilla-chrome+xpcom-generate
+[ ! -x %{_sbindir}/mozilla-chrome+xpcom-generate ] || %{_sbindir}/mozilla-chrome+xpcom-generate
 
 %files
 %defattr(644,root,root,755)
@@ -947,6 +962,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.398  2010/03/25 12:26:49  glen
+- update chrome+xpcom-generate run so it is run only once on installs and upgrades
+  and avoid executing it if the script does not exist (main package is removed
+  in same transaction)
+
 Revision 1.397  2009/07/02 23:52:18  baggins
 - switch to heimdal kerberos
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mozilla/mozilla.spec?r1=1.397&r2=1.398&f=u



More information about the pld-cvs-commit mailing list