rpms/comix/F-11 comix-4.0.4-archive-directory-removed.patch, NONE, 1.1 comix-4.0.4-thumb-imaging_error.patch, NONE, 1.1 comix.spec, 1.26, 1.27 comix-4.0.3-filechooser.patch, 1.2, NONE
Mamoru Tasaka
mtasaka at fedoraproject.org
Thu Mar 18 10:07:16 UTC 2010
- Previous message: rpms/gdal/F-11 gdal-dods.patch, NONE, 1.1 .cvsignore, 1.13, 1.14 gdal.spec, 1.63, 1.64 import.log, 1.11, 1.12 sources, 1.13, 1.14
- Next message: rpms/comix/F-12 comix-4.0.4-archive-directory-removed.patch, NONE, 1.1 comix-4.0.4-thumb-imaging_error.patch, NONE, 1.1 comix.spec, 1.27, 1.28 comix-4.0.3-filechooser.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mtasaka
Update of /cvs/extras/rpms/comix/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1738/F-11
Modified Files:
comix.spec
Added Files:
comix-4.0.4-archive-directory-removed.patch
comix-4.0.4-thumb-imaging_error.patch
Removed Files:
comix-4.0.3-filechooser.patch
Log Message:
* Thu Mar 18 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 4.0.4-3
- Handle the error when the media where opened archive existed
is removed (bug 542752, 555534)
- Handle some error cases in comicthumb (bug 568167, 572434)
- Remove macros no longer used, spec file cleanup
- GConf2 scriptlets update
comix-4.0.4-archive-directory-removed.patch:
filehandler.py | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
--- NEW FILE comix-4.0.4-archive-directory-removed.patch ---
--- comix-4.0.4/src/filehandler.py.missing 2009-01-12 05:54:42.000000000 +0900
+++ comix-4.0.4/src/filehandler.py 2010-03-18 02:56:06.000000000 +0900
@@ -466,7 +466,14 @@
archive in that archive's directory listing, sorted alphabetically.
"""
arch_dir = os.path.dirname(self._base_path)
- files = os.listdir(arch_dir)
+ # arch_dir may not exist, for example the archive being currently opened
+ # was in somoe removable media.
+ try:
+ files = os.listdir(arch_dir)
+ except OSError:
+ self._window.statusbar.set_message(
+ _('Could not open %s: No such directory.') % arch_dir)
+ return
files.sort(locale.strcoll)
try:
current_index = files.index(os.path.basename(self._base_path))
@@ -483,7 +490,14 @@
archive in that archive's directory listing, sorted alphabetically.
"""
arch_dir = os.path.dirname(self._base_path)
- files = os.listdir(arch_dir)
+ # arch_dir may not exist, for example the archive being currently opened
+ # was in somoe removable media.
+ try:
+ files = os.listdir(arch_dir)
+ except OSError:
+ self._window.statusbar.set_message(
+ _('Could not open %s: No such directory.') % arch_dir)
+ return
files.sort(locale.strcoll)
try:
current_index = files.index(os.path.basename(self._base_path))
comix-4.0.4-thumb-imaging_error.patch:
comicthumb | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
--- NEW FILE comix-4.0.4-thumb-imaging_error.patch ---
--- comix-4.0.4/mime/comicthumb.debug1 2008-11-10 07:17:46.000000000 +0900
+++ comix-4.0.4/mime/comicthumb 2010-03-18 17:54:12.000000000 +0900
@@ -196,6 +196,9 @@
extractor = Extractor(in_path)
files = extractor.get_files()
chosen = guess_cover(files)
+ # No files may be chosen
+ if not chosen:
+ sys.exit(1)
fd = extractor.extract(chosen)
im = Image.open(fd)
if im.size[0] > im.size[1]:
@@ -206,7 +209,14 @@
y = size
x = max(1, x)
y = max(1, y)
- im.thumbnail((x, y), Image.ANTIALIAS)
- im = im.convert('RGB')
- im.save(out_path, 'PNG')
+
+ # FIXME
+ # If some error occurs, simply ignore.
+ try:
+ im.thumbnail((x, y), Image.ANTIALIAS)
+ im = im.convert('RGB')
+ im.save(out_path, 'PNG')
+ except:
+ sys.exit(1)
+
sys.exit(0)
Index: comix.spec
===================================================================
RCS file: /cvs/extras/rpms/comix/F-11/comix.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- comix.spec 8 Apr 2009 08:18:32 -0000 1.26
+++ comix.spec 18 Mar 2010 10:07:16 -0000 1.27
@@ -7,8 +7,7 @@
%undefine alphatag
%define comix4 1
-%undefine ifalpha
-%define fedorarel 1
+%define fedorarel 3
Name: comix
Version: %{mainver}
@@ -23,6 +22,12 @@ Source0: %{name}-%{mainver}-%{alphatag}.
%else
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
%endif
+# The directory of the archive being currently opened may not exist
+# bug 542752, 555534
+Patch1: comix-4.0.4-archive-directory-removed.patch
+# Handle some error cases in comicthumb
+# bug 568167, 572434
+Patch2: comix-4.0.4-thumb-imaging_error.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -31,6 +36,8 @@ BuildRequires: pygtk2
BuildRequires: python-imaging
BuildRequires: desktop-file-utils
BuildRequires: %{_bindir}/jpegtran
+# The following BR is really needed for gconf2 macros
+BuildRequires: GConf2
Requires: pygtk2
Requires: python-imaging
Requires: %{_bindir}/jpegtran
@@ -48,6 +55,8 @@ uses GTK+ through the PyGTK bindings.
%prep
%setup -q -n %{name}-%{version}%{?ifalpha:-%alphatag}
+%patch1 -p1 -b .missing
+%patch2 -p1 -b .debug1
%{__mkdir_p} TMPBIN
cd TMPBIN
@@ -79,11 +88,7 @@ done
export PATH=$(pwd)/TMPBIN:${PATH}
%{__python} install.py \
-%if %{comix4}
--dir \
-%else
- --installdir \
-%endif
$RPM_BUILD_ROOT%{_prefix} \
install
@@ -109,21 +114,11 @@ desktop-file-install \
%{__rm} -rf $RPM_BUILD_ROOT
%pre
-[ "$1" -gt 1 ] || exit 0
-
-export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
-gconftool-2 --makefile-uninstall-rule \
- %{_sysconfdir}/gconf/schemas/%{name}.schemas >/dev/null
-
-# If the schema file has ever been renamed::
-# gconftool-2 --makefile-uninstall-rule \
-# %{_sysconfdir}/gconf/schemas/[OLDNAME].schemas > /dev/null
+%gconf_schema_prepare %{name}
exit 0
%post
-export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
-gconftool-2 --makefile-install-rule \
- %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null
+%gconf_schema_upgrade %{name}
touch --no-create %{_datadir}/icons/hicolor
@@ -133,12 +128,7 @@ update-mime-database %{_datadir}/mime &>
exit 0
%preun
-[ "$1" -eq 0 ] || exit 0
-
-export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
-gconftool-2 --makefile-uninstall-rule \
- %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null
-
+%gconf_schema_remove %{name}
exit 0
%postun
@@ -169,22 +159,24 @@ exit 0
%{_mandir}/man1/*
%{_datadir}/icons/hicolor/*/apps/%{name}*
-%if %{comix4}
%{_datadir}/icons/hicolor/*/mimetypes/application-x-*.png
-%endif
-%if ! %{comix4}
-%{_datadir}/pixmaps/%{name}.png
-%dir %{_datadir}/pixmaps/%{name}
-%{_datadir}/pixmaps/%{name}/*.png
-%else
%dir %{_datadir}/%{name}/
%{_datadir}/%{name}/images/
%{_datadir}/%{name}/src/
-%endif
%changelog
+* Thu Mar 18 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 4.0.4-3
+- Handle the error when the media where opened archive existed
+ is removed (bug 542752, 555534)
+- Handle some error cases in comicthumb (bug 568167, 572434)
+- Remove macros no longer used, spec file cleanup
+- GConf2 scriptlets update
+
+* Sat Jul 25 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 4.0.4-2
+- F-12: Mass rebuild
+
* Wed Apr 8 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 4.0.4-1
- 4.0.4, remove upsteamed patch
- Embed Fedora EVR to src/about.py
--- comix-4.0.3-filechooser.patch DELETED ---
- Previous message: rpms/gdal/F-11 gdal-dods.patch, NONE, 1.1 .cvsignore, 1.13, 1.14 gdal.spec, 1.63, 1.64 import.log, 1.11, 1.12 sources, 1.13, 1.14
- Next message: rpms/comix/F-12 comix-4.0.4-archive-directory-removed.patch, NONE, 1.1 comix-4.0.4-thumb-imaging_error.patch, NONE, 1.1 comix.spec, 1.27, 1.28 comix-4.0.3-filechooser.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list