From 73d39556815acf76f0ea1f1eb590d39c65bd704ac0943d235e88a0cd364a9f39 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Tue, 8 Mar 2016 07:20:30 +0000 Subject: [PATCH 1/2] Accepting request 368001 from home:olh:bc - Update reconfigure_fonts_post to use shell variables to reduce build-compare noise in font packages OBS-URL: https://build.opensuse.org/request/show/368001 OBS-URL: https://build.opensuse.org/package/show/M17N:fonts/fontpackages?expand=0&rev=34 --- fontpackages.changes | 6 ++++++ fontpackages.spec | 2 +- rpm-macros.fonts-config | 45 ++++++++++++++++++++++------------------- 3 files changed, 31 insertions(+), 22 deletions(-) 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 From c697ced8f48b528b78e9e14626dde5244fda608cc9a047484ec5c0ff6473107e Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Mon, 14 Mar 2016 14:29:35 +0000 Subject: [PATCH 2/2] - fix previous commit OBS-URL: https://build.opensuse.org/package/show/M17N:fonts/fontpackages?expand=0&rev=35 --- fontpackages.changes | 5 +++++ rpm-macros.fonts-config | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fontpackages.changes b/fontpackages.changes index 2eff622..85606ab 100644 --- a/fontpackages.changes +++ b/fontpackages.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 14 14:30:28 UTC 2016 - pgajdos@suse.com + +- fix previous commit + ------------------------------------------------------------------- Mon Mar 7 15:36:53 UTC 2016 - olaf@aepfle.de diff --git a/rpm-macros.fonts-config b/rpm-macros.fonts-config index 4322df8..c73502a 100644 --- a/rpm-macros.fonts-config +++ b/rpm-macros.fonts-config @@ -119,7 +119,7 @@ Requires(posttrans): coreutils \ echo ' fi' >> "${__fontsupdatescript}" \ echo ' rm %{__fontsconfigrunflag}' >> "${__fontsupdatescript}" \ echo 'fi' >> "${__fontsupdatescript}" \ - echo 'rm ${__fontsupdatescript}' >> "${__fontsupdatescript}" \ + echo "rm ${__fontsupdatescript}" >> "${__fontsupdatescript}" \ %{-c: \ __fontsupdatescript_cjk=/var/adm/update-scripts/%{name}-%{version}-%{release}\ __fontsupdatescript_cjk="${__fontsupdatescript_cjk}-reconfigure-cjk-fonts" \ @@ -132,7 +132,7 @@ Requires(posttrans): coreutils \ echo ' fi' >> "${__fontsupdatescript_cjk}" \ echo ' rm %{__fontsconfigrunflag}-cjk' >> "${__fontsupdatescript_cjk}" \ echo 'fi' >> "${__fontsupdatescript_cjk}" \ - echo 'rm ${__fontsupdatescript_cjk}' >> "${__fontsupdatescript_cjk}" \ + echo "rm ${__fontsupdatescript_cjk}" >> "${__fontsupdatescript_cjk}" \ } \ fi \ %nil