diff --git a/fontpackages.changes b/fontpackages.changes index fd5a35c..2eff622 100644 --- a/fontpackages.changes +++ b/fontpackages.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 7 15:36:53 UTC 2016 - olaf@aepfle.de + +- Update reconfigure_fonts_post to use shell variables + to reduce build-compare noise in font packages + ------------------------------------------------------------------- Wed Oct 21 09:27:48 UTC 2015 - dmueller@suse.com diff --git a/fontpackages.spec b/fontpackages.spec index a8dc33c..46facb1 100644 --- a/fontpackages.spec +++ b/fontpackages.spec @@ -1,7 +1,7 @@ # # spec file for package fontpackages # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/rpm-macros.fonts-config b/rpm-macros.fonts-config index 51b1c3c..4322df8 100644 --- a/rpm-macros.fonts-config +++ b/rpm-macros.fonts-config @@ -7,10 +7,6 @@ %_fontsconfavaildir %{_datadir}/%{name}/conf.avail # private %__fontsconfigrunflag %{_rundir}/fontpackages/reconfigure-fonts -# The pattern is fixed within libzypp: -# /var/adm/update-scripts/name-version-release-anything -%__fontsupdatescript /var/adm/update-scripts/%{name}-%{version}-%{release}-reconfigure-fonts -%__fontsupdatescript_cjk /var/adm/update-scripts/%{name}-%{version}-%{release}-reconfigure-cjk-fonts # macro: link_avail_to_system_fontsconf name # (takes exactly one argument, name of configuration file) @@ -105,6 +101,9 @@ Requires(posttrans): coreutils \ # options: # -c (the fonts are CJK fonts, also do setup which is only needed # for CJK) +# The pattern is fixed within libzypp: +# /var/adm/update-scripts/name-version-release-anything +# (place version-release at the end of a line to help build-compare) %reconfigure_fonts_post(c) \ mkdir -p `dirname %{__fontsconfigrunflag}` \ touch %{__fontsconfigrunflag} \ @@ -112,24 +111,28 @@ Requires(posttrans): coreutils \ 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} \ + __fontsupdatescript=/var/adm/update-scripts/%{name}-%{version}-%{release}\ + __fontsupdatescript="${__fontsupdatescript}-reconfigure-fonts" \ + 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 /usr/sbin/acroread-cidfont-config ]; then' >> %{__fontsupdatescript_cjk} \ - echo ' /usr/sbin/acroread-cidfont-config' >> %{__fontsupdatescript_cjk} \ - echo ' fi' >> %{__fontsupdatescript_cjk} \ - echo ' if [ -x /usr/sbin/ghostscript-cjk-config ]; then' >> %{__fontsupdatescript_cjk} \ - echo ' /usr/sbin/ghostscript-cjk-config' >> %{__fontsupdatescript_cjk} \ - echo ' fi' >> %{__fontsupdatescript_cjk} \ - echo ' rm %{__fontsconfigrunflag}-cjk' >> %{__fontsupdatescript_cjk} \ - echo 'fi' >> %{__fontsupdatescript_cjk} \ - echo 'rm %{__fontsupdatescript_cjk}' >> %{__fontsupdatescript_cjk} \ + __fontsupdatescript_cjk=/var/adm/update-scripts/%{name}-%{version}-%{release}\ + __fontsupdatescript_cjk="${__fontsupdatescript_cjk}-reconfigure-cjk-fonts" \ + echo 'if [ -e %{__fontsconfigrunflag}-cjk ]; then' > "${__fontsupdatescript_cjk}" \ + echo ' if [ -x /usr/sbin/acroread-cidfont-config ]; then' >> "${__fontsupdatescript_cjk}" \ + echo ' /usr/sbin/acroread-cidfont-config' >> "${__fontsupdatescript_cjk}" \ + echo ' fi' >> "${__fontsupdatescript_cjk}" \ + echo ' if [ -x /usr/sbin/ghostscript-cjk-config ]; then' >> "${__fontsupdatescript_cjk}" \ + echo ' /usr/sbin/ghostscript-cjk-config' >> "${__fontsupdatescript_cjk}" \ + echo ' fi' >> "${__fontsupdatescript_cjk}" \ + echo ' rm %{__fontsconfigrunflag}-cjk' >> "${__fontsupdatescript_cjk}" \ + echo 'fi' >> "${__fontsupdatescript_cjk}" \ + echo 'rm ${__fontsupdatescript_cjk}' >> "${__fontsupdatescript_cjk}" \ } \ fi \ %nil