Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=563844

--- Comment #7 from Mamoru Tasaka <mtas...@ioa.s.u-tokyo.ac.jp> 2010-03-07 
16:06:01 EST ---
As this package is "zim" application and not some python module,
the srpm should be named as "zim", not "pyzim" or "python-zim".

Some quick notes for zim-0.44-2

* Unneeded macros
  - %python_sitearch macro is used nowhere.

* License
  - as "./zim/_lib/xdot.py" is under GPLv3+ (would you ask the upstream
    why?), the license tag should be "GPLv2+ and GPLv3+"

* Obsoletes/Provides
  - For this case, this package should provide "Zim = %{version]-%{release}"
    as this is a rewritten pkg of Zim ( see the explanation by
    $ rpmlint -I obsolete-not-provided )

* Requires
  - "R: gtk2 >= 2.6" is unneeded (at least on Fedora) 
    - because all gtk2 packages in currently supported Fedora branches
      all have higher version than 2.6, and gtk2 is pulled in by pygtk2.
    https://fedoraproject.org/wiki/Packaging/Guidelines#Explicit_Requires

  - "R: shared-mime-info desktop-file-utils" are not needed
    https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#desktop-database
    https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#mimeinfo

  - "R: xdg-utils" should be removed (explained below)

  - "R: pygobject2" is not needed because pygtk2 pulls in this dependency.

  - Also "R: python-simplejson" line is not needed (at least on Fedora) because
    F-11/12/13/14 python has 2.6+ version.

* default %setup
  - %setup line can simply be "%setup -q" because the default argument to
    "-n" option is %{name}-%{version}

* About xdg-icon-resource
  - For xdg-icon-resource in %post:
    A. Currently the command line fails.
---------------------------------------------------------------------------
# xdg-icon-resource install --context mimetypes --size 64 zim.png
application-x-zim-notebook ; echo $?
xdg-icon-resource: file 'zim.png' does not exist
2
---------------------------------------------------------------------------
    B. When you change "zim.png" to "%{_datadir}/pixmaps/zim.png" in
       %post,
    B-1 This creates 2 files (1 file / 1 symlink) under 
        %{_datadir}/icons/hicolor/64x64/mimetypes/
    B-2 As rpm transaction order is
        newrpm's pre-> newrpm installation -> newrpm's post -> oldrpm's preun
        -> oldrpm cleanup -> oldrpm's postun:

       
https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#Scriptlet_Ordering

        With your scriptlets order, when zim is to be upgraded, created 2 files
        will be removed after transaction.

   So it is preferable that xdg-icon-resource is called at %install beforehand:
---------------------------------------------------------------------------
%install
...
...
%find_lang zim

mkdir -p %{buildroot}%{_datadir}/icons/hicolor/64x64/mimetypes/
( export XDG_DATA_DIRS=%{buildroot}%{_datadir}/
  export XDG_DATA_HOME=%{buildroot}%{_datadir}/
  export KDE_SESSION_VERSION=invalid
  export XDG_UTILS_DEBUG_LEVEL=1000000
  xdg-icon-resource install \
    --noupdate \
    --context mimetypes \
    --size 64 \
    %{buildroot}%{_datadir}/pixmaps/zim.png \
    application-x-zim-notebook
)
---------------------------------------------------------------------------
    Or more simply:
---------------------------------------------------------------------------
%install
....
....
MIMETYPESDIR=%{buildroot}%{_datadir}/icons/hicolor/64x64/mimetypes/
mkdir -p $MIMETYPEDIR
install -cpm 644 %{buildroot}%{_datadir}/pixmaps/zim.png
$MIMETYPEDIR/application-x-zim-notebook.png
ln -sf application-x-zim-notebook.png
$MIMETYPEDIR/gnome-mime-application-x-zim-notebook.png
---------------------------------------------------------------------------
    ... and 
      - add two newly created filed to %files
      - and follow:
        https://fedoraproject.org/wiki/Packaging/ScriptletSnippets#Icon_Cache

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
package-review mailing list
package-review@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/package-review

Reply via email to