Hello community, here is the log from the commit of package fontpackages for openSUSE:Factory checked in at 2013-10-11 16:39:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fontpackages (Old) and /work/SRC/openSUSE:Factory/.fontpackages.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fontpackages" Changes: -------- --- /work/SRC/openSUSE:Factory/fontpackages/fontpackages.changes 2013-03-08 11:20:50.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.fontpackages.new/fontpackages.changes 2013-10-11 16:39:42.000000000 +0200 @@ -1,0 +2,6 @@ +Mon Sep 30 08:44:46 UTC 2013 - pgaj...@suse.com + +- run fonts-config only once when installing or upgrading more + fonts in one transaction + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fontpackages.spec ++++++ --- /var/tmp/diff_new_pack.LTzou4/_old 2013-10-11 16:39:43.000000000 +0200 +++ /var/tmp/diff_new_pack.LTzou4/_new 2013-10-11 16:39:43.000000000 +0200 @@ -17,7 +17,7 @@ Name: fontpackages -Version: 0.1 +Version: 0.2 Release: 0 Summary: Commons for Font Packages License: BSD-3-Clause ++++++ rpm-macros.fonts-config ++++++ --- /var/tmp/diff_new_pack.LTzou4/_old 2013-10-11 16:39:43.000000000 +0200 +++ /var/tmp/diff_new_pack.LTzou4/_new 2013-10-11 16:39:43.000000000 +0200 @@ -5,13 +5,16 @@ %_fontsconfdir %{_sysconfdir}/fonts %_fontsconfddir %{_fontsconfdir}/conf.d %_fontsconfavaildir %{_datadir}/%{name}/conf.avail +# private +%__fontsconfigrunflag /var/run/fontpackages/reconfigure-fonts +%__fontsupdatescript /var/adm/update-scripts/%{name}-%{version}-%{release}-reconfigure-fonts # macro: link_avail_to_system_fontsconf name # (takes exactly one argument, name of configuration file) # creates symlink pointing from /etc/fonts/conf.d/name to # ../../../usr/share/%{name}/conf.avail/name %link_avail_to_system_fontsconf() \ - if test "x%1" == "x%%1"; then \ + if [ "x%1" == "x%%1" ]; then \ echo "Missing argument in call to %%link_avail_to_system_fontsconf: name of configuration file." \ false \ fi \ @@ -29,7 +32,7 @@ # 4. link %{_fontsavaildir}/01-fonts.conf %{_fontsconfddir} %install_fontsconf() \ - if test "x%1" == "x%%1"; then \ + if [ "x%1" == "x%%1" ]; then \ echo "Missing argument in call to %%install_fontsconf: path and name of configuration file." \ false \ fi \ @@ -68,33 +71,60 @@ Requires(pre): perl aaa_base \ %nil + # macro: reconfigure_fonts # font setup for suse -# options: -# -c (the fonts are CJK fonts, also do setup which is only needed -# for CJK) -%reconfigure_fonts(c) \ +%reconfigure_fonts \ if test -x /usr/sbin/fonts-config ; then \ LC_ALL=POSIX \ /usr/sbin/fonts-config --verbose \ fi \ - %{-c: \ - if test -x /usr/sbin/acroread-cidfont-config ; then \ - /usr/sbin/acroread-cidfont-config \ - fi \ - if test -x /usr/sbin/ghostscript-cjk-config ; then \ - /usr/sbin/ghostscript-cjk-config \ - fi} \ %nil + +# macro: reconfigure_fonts +# cjk font setup for suse +%reconfigure_fonts_cjk \ + if test -x /usr/sbin/acroread-cidfont-config ; then \ + /usr/sbin/acroread-cidfont-config \ + fi \ + if test -x /usr/sbin/ghostscript-cjk-config ; then \ + /usr/sbin/ghostscript-cjk-config \ + fi \ + %nil + + # macro: reconfigure_fonts_post # now alias to reconfigure_fonts, this can change in the future # options: # -c (the fonts are CJK fonts, also do setup which is only needed # for CJK) %reconfigure_fonts_post(c) \ - if [ $1 -ne 2 ]; then \ - %reconfigure_fonts c \ + mkdir -p `dirname %{__fontsconfigrunflag}` \ + touch %{__fontsconfigrunflag} \ + %{-c: \ + touch %{__fontsconfigrunflag}-cjk \ + } \ + if [ -n "$ZYPP_IS_RUNNING" ]; then \ + echo 'if [ -e %{__fontsconfigrunflag} ]; then' > %{__fontsupdatescript} \ + echo ' if [ -x /usr/sbin/fonts-config ]; then' >> %{__fontsupdatescript} \ + echo ' /usr/sbin/fonts-config --quiet' >> %{__fontsupdatescript} \ + echo ' fi' >> %{__fontsupdatescript} \ + echo ' rm %{__fontsconfigrunflag}' >> %{__fontsupdatescript} \ + echo 'fi' >> %{__fontsupdatescript} \ + echo 'rm %{__fontsupdatescript}' >> %{__fontsupdatescript} \ + %{-c: \ + echo 'if [ -e %{__fontsconfigrunflag}-cjk ]; then' > %{__fontsupdatescript}-cjk \ + echo ' if [ -x $adobecidfontconfig ]; then' >> %{__fontsupdatescript}-cjk \ + echo ' /usr/sbin/acroread-cidfont-config' >> %{__fontsupdatescript}-cjk \ + echo ' fi' >> %{__fontsupdatescript}-cjk \ + echo ' if [ -x $ghostscriptcjkconfig ]; then' >> %{__fontsupdatescript}-cjk \ + echo ' /usr/sbin/ghostscript-cjk-config' >> %{__fontsupdatescript}-cjk \ + echo ' fi' >> %{__fontsupdatescript}-cjk \ + echo ' rm %{__fontsconfigrunflag}-cjk' >> %{__fontsupdatescript} \ + echo 'fi' >> %{__fontsupdatescript}-cjk \ + echo 'rm %{__fontsupdatescript}-cjk' >> %{__fontsupdatescript}-cjk \ + } \ fi \ %nil @@ -104,7 +134,12 @@ # -c (the fonts are CJK fonts, also do setup which is only needed # for CJK) %reconfigure_fonts_postun(c) \ - %reconfigure_fonts c \ + if [ $1 -eq 0 ]; then \ + %reconfigure_fonts \ + %{-c: \ + %reconfigure_fonts_cjk \ + } \ + fi \ %nil # macro: reconfigure_fonts_post @@ -112,7 +147,17 @@ # options: # -c (the fonts are CJK fonts, also do setup which is only needed # for CJK) -%reconfigure_fonts_posttrans(c) \ +%reconfigure_fonts_posttrans \ + if [ -z "$ZYPP_IS_RUNNING" ]; then \ + if [ -e %{__fontsconfigrunflag} ]; then \ + %reconfigure_fonts \ + rm %{__fontsconfigrunflag} \ + fi \ + if [ -e %{__fontsconfigrunflag}-cjk ]; then \ + %reconfigure_fonts_cjk \ + rm %{__fontsconfigrunflag}-cjk \ + fi \ + fi \ %nil # macro: reconfigure_fonts_scriptles @@ -129,5 +174,8 @@ %postun %{-n:-n %{-n*}} \ %reconfigure_fonts_postun c \ \ +%posttrans %{-n:-n %{-n*}} \ +%reconfigure_fonts_posttrans \ +\ %nil -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org