<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>3669</bug_id>
          
          <creation_ts>2004-02-12 17:03:36 +0300</creation_ts>
          <short_desc>wrong %postun breaks upgrade</short_desc>
          <delta_ts>2005-07-13 15:45:49 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>ms-fonts-ttf</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sergey Vlasov">vsu</reporter>
          <assigned_to name="Vyacheslav Dikonov">slava</assigned_to>
          
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11743</commentid>
    <comment_count>0</comment_count>
    <who name="Sergey Vlasov">vsu</who>
    <bug_when>2004-02-12 17:03:37 +0300</bug_when>
    <thetext>postuninstall scriptlet (through /bin/sh):
/usr/sbin/chkfontpath --remove /usr/share/fonts/default/TrueType-ms

Так нельзя - %postun вызывается в том числе и при обновлении пакета, причём
%postun от старого пакета выполняется после %post от нового пакета. В результате
после обновления шрифты оказываются недоступны.

Должно быть так:

if [ &quot;$1&quot; = &quot;0&quot; ]; then
        /usr/sbin/chkfontpath -q -r /usr/share/fonts/default/TrueType-ms ||:
fi

(||: нужно, чтобы возможные ошибки - например, если каталог уже удалён из списка
- не останавливали удаление пакетов)

Ещё необходимо добавить %triggerpostun на старую версию пакета для устранения
последствий ошибки в предыдущих версиях (иначе после первого обновления на
исправленную версию каталог со шрифтами всё равно будет удалён из списка).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11767</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2004-02-12 18:06:54 +0300</bug_when>
    <thetext>в vera-fonts-ttf (#3691) сделал так: 

%post
%_bindir/fc-cache %ttfdir
%_sbindirchkfontpath -q --add %ttfdir

%postun
if [ &quot;$1&quot; = &quot;0&quot; ]; then
        %_sbindirchkfontpath -q --remove %ttfdir ||:
fi

%triggerpostun -- %name &lt; 1.10-alt2
echo &quot;Fixing faulty fontpath removal in 1.10-alt1&quot;
%_bindir/fc-cache %ttfdir
%_sbindirchkfontpath -q --add %ttfdir
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11769</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2004-02-12 18:10:56 +0300</bug_when>
    <thetext>эээ... даже так (thanks vsu):

%post
%_bindir/fc-cache %ttfdir ||:
%_sbindir/chkfontpath -q --add %ttfdir ||:

%postun
if [ &quot;$1&quot; = &quot;0&quot; ]; then
        %_sbindir/chkfontpath -q --remove %ttfdir ||:
fi

%triggerpostun -- %name &lt; 1.10-alt2
%_sbindir/chkfontpath -q --add %ttfdir ||:
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11847</commentid>
    <comment_count>3</comment_count>
    <who name="Vyacheslav Dikonov">slava</who>
    <bug_when>2004-02-19 01:17:58 +0300</bug_when>
    <thetext>Исправления внесены.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11887</commentid>
    <comment_count>4</comment_count>
    <who name="Sergey Vlasov">vsu</who>
    <bug_when>2004-02-21 20:56:36 +0300</bug_when>
    <thetext>seems to be fixed</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>