SHA256
1
0
forked from pool/fontpackages

Accepting request 544179 from home:kukuk:branches:M17N:fonts

- /var/adm/update-scripts is deprecated and will be removed at 
  some point in the future, since %posttrans support in libzypp
  was fixed with SLE12. Remove the workaround, only use the RPM
  posttrans to simplify the code and testing.

OBS-URL: https://build.opensuse.org/request/show/544179
OBS-URL: https://build.opensuse.org/package/show/M17N:fonts/fontpackages?expand=0&rev=39
This commit is contained in:
Takashi Iwai 2017-11-21 14:48:53 +00:00 committed by Git OBS Bridge
parent 3f143167f6
commit 1eb7577b81
2 changed files with 18 additions and 41 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Nov 21 15:14:15 CET 2017 - kukuk@suse.de
- /var/adm/update-scripts is deprecated and will be removed at
some point in the future, since %posttrans support in libzypp
was fixed with SLE12. Remove the workaround, only use the RPM
posttrans to simplify the code and testing.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Mar 14 14:30:28 UTC 2016 - pgajdos@suse.com Mon Mar 14 14:30:28 UTC 2016 - pgajdos@suse.com

View File

@ -101,40 +101,12 @@ Requires(posttrans): coreutils \
# options: # options:
# -c (the fonts are CJK fonts, also do setup which is only needed # -c (the fonts are CJK fonts, also do setup which is only needed
# for CJK) # 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) \ %reconfigure_fonts_post(c) \
mkdir -p `dirname %{__fontsconfigrunflag}` \ mkdir -p `dirname %{__fontsconfigrunflag}` \
touch %{__fontsconfigrunflag} \ touch %{__fontsconfigrunflag} \
%{-c: \ %{-c: \
touch %{__fontsconfigrunflag}-cjk \ touch %{__fontsconfigrunflag}-cjk \
} \ } \
if [ -n "$ZYPP_IS_RUNNING" ]; then \
__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: \
__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 %nil
# macro: reconfigure_fonts_postun # macro: reconfigure_fonts_postun
@ -157,15 +129,13 @@ Requires(posttrans): coreutils \
# -c (the fonts are CJK fonts, also do setup which is only needed # -c (the fonts are CJK fonts, also do setup which is only needed
# for CJK) # for CJK)
%reconfigure_fonts_posttrans \ %reconfigure_fonts_posttrans \
if [ -z "$ZYPP_IS_RUNNING" ]; then \ if [ -e %{__fontsconfigrunflag} ]; then \
if [ -e %{__fontsconfigrunflag} ]; then \ %reconfigure_fonts \
%reconfigure_fonts \ rm %{__fontsconfigrunflag} \
rm %{__fontsconfigrunflag} \ fi \
fi \ if [ -e %{__fontsconfigrunflag}-cjk ]; then \
if [ -e %{__fontsconfigrunflag}-cjk ]; then \ %reconfigure_fonts_cjk \
%reconfigure_fonts_cjk \ rm %{__fontsconfigrunflag}-cjk \
rm %{__fontsconfigrunflag}-cjk \
fi \
fi \ fi \
%nil %nil
@ -187,4 +157,3 @@ Requires(posttrans): coreutils \
%reconfigure_fonts_posttrans \ %reconfigure_fonts_posttrans \
\ \
%nil %nil