Hello community,
here is the log from the commit of package gnome-epub-thumbnailer for
openSUSE:Factory checked in at 2014-03-28 13:15:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-epub-thumbnailer (Old)
and /work/SRC/openSUSE:Factory/.gnome-epub-thumbnailer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnome-epub-thumbnailer"
Changes:
--------
---
/work/SRC/openSUSE:Factory/gnome-epub-thumbnailer/gnome-epub-thumbnailer.changes
2013-08-27 20:47:29.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.gnome-epub-thumbnailer.new/gnome-epub-thumbnailer.changes
2014-03-28 13:15:26.000000000 +0100
@@ -1,0 +2,11 @@
+Sun Mar 23 17:47:31 UTC 2014 - [email protected]
+
+- Update to version 1.4:
+ + Create covers for encrypted MOBI files as well.
+ + Fix crash when there's no cover in MOBI files.
+ + Fix crash when the EPub cover cannot be found.
+ + Print warnings when we cannot find the metafile, or when
+ reading empty EPub files.
+ + Fix crash handling files in trash or recent locations.
+
+-------------------------------------------------------------------
Old:
----
gnome-epub-thumbnailer-1.3.tar.xz
New:
----
gnome-epub-thumbnailer-1.4.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gnome-epub-thumbnailer.spec ++++++
--- /var/tmp/diff_new_pack.G4pBmu/_old 2014-03-28 13:15:27.000000000 +0100
+++ /var/tmp/diff_new_pack.G4pBmu/_new 2014-03-28 13:15:27.000000000 +0100
@@ -1,6 +1,7 @@
#
# spec file for package gnome-epub-thumbnailer
#
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 Dominique Leuenberger, Amsterdam, The Netherlands
#
# All modifications and additions to the file contributed by third parties
@@ -15,14 +16,15 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
Name: gnome-epub-thumbnailer
-Version: 1.3
+Version: 1.4
Release: 0
-License: GPL-2.0+
Summary: Thumbnailer for EPub books
-Url: http://ftp.acc.umu.se/pub/GNOME/sources/gnome-epub-thumbnailer/
+License: GPL-2.0+
Group: Productivity/Office/Other
-Source:
http://ftp.gnome.org/pub/GNOME/sources/%{name}/%{version}/%{name}-%{version}.tar.xz
+Url: http://ftp.acc.umu.se/pub/GNOME/sources/gnome-epub-thumbnailer/
+Source:
http://download.gnome.org/sources/gnome-epub-thumbnailer/1.4/%{name}-%{version}.tar.xz
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(libarchive)
++++++ gnome-epub-thumbnailer-1.3.tar.xz -> gnome-epub-thumbnailer-1.4.tar.xz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnome-epub-thumbnailer-1.3/NEWS
new/gnome-epub-thumbnailer-1.4/NEWS
--- old/gnome-epub-thumbnailer-1.3/NEWS 2013-08-08 17:22:52.000000000 +0200
+++ new/gnome-epub-thumbnailer-1.4/NEWS 2014-03-23 17:55:43.000000000 +0100
@@ -1,3 +1,13 @@
+1.4
+---
+
+- Create covers for encrypted MOBI files as well
+- Fix crash when there's no cover in MOBI files
+- Fix crash when the EPub cover cannot be found
+- Print warnings when we cannot find the metafile,
+ or when reading empty EPub files
+- Fix crash handling files in trash or recent locations
+
1.3
---
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnome-epub-thumbnailer-1.3/aclocal.m4
new/gnome-epub-thumbnailer-1.4/aclocal.m4
--- old/gnome-epub-thumbnailer-1.3/aclocal.m4 2013-08-08 17:23:06.000000000
+0200
+++ new/gnome-epub-thumbnailer-1.4/aclocal.m4 2014-03-23 17:56:06.000000000
+0100
@@ -20,172 +20,6 @@
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically
'autoreconf'.])])
-dnl GNOME_COMPILE_WARNINGS
-dnl Turn on many useful compiler warnings and substitute the result into
-dnl WARN_CFLAGS
-dnl For now, only works on GCC
-AC_DEFUN([GNOME_COMPILE_WARNINGS],[
- dnl ******************************
- dnl More compiler warnings
- dnl ******************************
-
- AC_ARG_ENABLE(compile-warnings,
-
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
- [Turn on compiler warnings]),,
- [enable_compile_warnings="m4_default([$1],[yes])"])
-
- if test "x$GCC" != xyes; then
- enable_compile_warnings=no
- fi
-
- warning_flags=
- realsave_CFLAGS="$CFLAGS"
-
- dnl These are warning flags that aren't marked as fatal. Can be
- dnl overridden on a per-project basis with -Wno-foo.
- base_warn_flags=" \
- -Wall \
- -Wstrict-prototypes \
- -Wnested-externs \
- "
-
- dnl These compiler flags typically indicate very broken or suspicious
- dnl code. Some of them such as implicit-function-declaration are
- dnl just not default because gcc compiles a lot of legacy code.
- dnl We choose to make this set into explicit errors.
- base_error_flags=" \
- -Werror=missing-prototypes \
- -Werror=implicit-function-declaration \
- -Werror=pointer-arith \
- -Werror=init-self \
- -Werror=format-security \
- -Werror=format=2 \
- -Werror=missing-include-dirs \
- "
-
- case "$enable_compile_warnings" in
- no)
- warning_flags=
- ;;
- minimum)
- warning_flags="-Wall"
- ;;
- yes)
- warning_flags="$base_warn_flags $base_error_flags"
- ;;
- maximum|error)
- warning_flags="$base_warn_flags $base_error_flags"
- ;;
- *)
- AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to
--enable-compile-warnings)
- ;;
- esac
-
- if test "$enable_compile_warnings" = "error" ; then
- warning_flags="$warning_flags -Werror"
- fi
-
- dnl Check whether GCC supports the warning options
- for option in $warning_flags; do
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $option"
- AC_MSG_CHECKING([whether gcc understands $option])
- AC_TRY_COMPILE([], [],
- has_option=yes,
- has_option=no,)
- CFLAGS="$save_CFLAGS"
- AC_MSG_RESULT([$has_option])
- if test $has_option = yes; then
- tested_warning_flags="$tested_warning_flags $option"
- fi
- unset has_option
- unset save_CFLAGS
- done
- unset option
- CFLAGS="$realsave_CFLAGS"
- AC_MSG_CHECKING(what warning flags to pass to the C compiler)
- AC_MSG_RESULT($tested_warning_flags)
-
- AC_ARG_ENABLE(iso-c,
- AC_HELP_STRING([--enable-iso-c],
- [Try to warn if code is not ISO C ]),,
- [enable_iso_c=no])
-
- AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
- complCFLAGS=
- if test "x$enable_iso_c" != "xno"; then
- if test "x$GCC" = "xyes"; then
- case " $CFLAGS " in
- *[\ \ ]-ansi[\ \ ]*) ;;
- *) complCFLAGS="$complCFLAGS -ansi" ;;
- esac
- case " $CFLAGS " in
- *[\ \ ]-pedantic[\ \ ]*) ;;
- *) complCFLAGS="$complCFLAGS -pedantic" ;;
- esac
- fi
- fi
- AC_MSG_RESULT($complCFLAGS)
-
- WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
- AC_SUBST(WARN_CFLAGS)
-])
-
-dnl For C++, do basically the same thing.
-
-AC_DEFUN([GNOME_CXX_WARNINGS],[
- AC_ARG_ENABLE(cxx-warnings,
- AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
- [Turn on compiler warnings.]),,
- [enable_cxx_warnings="m4_default([$1],[minimum])"])
-
- AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
- warnCXXFLAGS=
- if test "x$GXX" != xyes; then
- enable_cxx_warnings=no
- fi
- if test "x$enable_cxx_warnings" != "xno"; then
- if test "x$GXX" = "xyes"; then
- case " $CXXFLAGS " in
- *[\ \ ]-Wall[\ \ ]*) ;;
- *) warnCXXFLAGS="-Wall -Wno-unused" ;;
- esac
-
- ## -W is not all that useful. And it cannot be controlled
- ## with individual -Wno-xxx flags, unlike -Wall
- if test "x$enable_cxx_warnings" = "xyes"; then
- warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
- fi
- fi
- fi
- AC_MSG_RESULT($warnCXXFLAGS)
-
- AC_ARG_ENABLE(iso-cxx,
- AC_HELP_STRING([--enable-iso-cxx],
- [Try to warn if code is not ISO C++ ]),,
- [enable_iso_cxx=no])
-
- AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
- complCXXFLAGS=
- if test "x$enable_iso_cxx" != "xno"; then
- if test "x$GXX" = "xyes"; then
- case " $CXXFLAGS " in
- *[\ \ ]-ansi[\ \ ]*) ;;
- *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
- esac
-
- case " $CXXFLAGS " in
- *[\ \ ]-pedantic[\ \ ]*) ;;
- *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
- esac
- fi
- fi
- AC_MSG_RESULT($complCXXFLAGS)
-
- WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
- AC_SUBST(WARN_CXXFLAGS)
-])
-
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24)
#
@@ -386,6 +220,199 @@
m4_popdef([pkg_description])
]) dnl PKG_NOARCH_INSTALLDIR
+
+# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------
+# Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])# PKG_CHECK_VAR
+
+# gnome-compiler-flags.m4
+#
+# serial 2
+#
+
+dnl GNOME_COMPILE_WARNINGS
+dnl Turn on many useful compiler warnings and substitute the result into
+dnl WARN_CFLAGS
+dnl For now, only works on GCC
+dnl Pass the default value of the --enable-compile-warnings configure option as
+dnl the first argument to the macro, defaulting to 'yes'.
+dnl Additional warning/error flags can be passed as an optional second
argument.
+dnl
+dnl For example: GNOME_COMPILE_WARNINGS([maximum],[-Werror=some-flag -Wfoobar])
+AC_DEFUN([GNOME_COMPILE_WARNINGS],[
+ dnl ******************************
+ dnl More compiler warnings
+ dnl ******************************
+
+ AC_ARG_ENABLE(compile-warnings,
+
AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
+ [Turn on compiler warnings]),,
+ [enable_compile_warnings="m4_default([$1],[yes])"])
+
+ if test "x$GCC" != xyes; then
+ enable_compile_warnings=no
+ fi
+
+ warning_flags=
+ realsave_CFLAGS="$CFLAGS"
+
+ dnl These are warning flags that aren't marked as fatal. Can be
+ dnl overridden on a per-project basis with -Wno-foo.
+ base_warn_flags=" \
+ -Wall \
+ -Wstrict-prototypes \
+ -Wnested-externs \
+ "
+
+ dnl These compiler flags typically indicate very broken or suspicious
+ dnl code. Some of them such as implicit-function-declaration are
+ dnl just not default because gcc compiles a lot of legacy code.
+ dnl We choose to make this set into explicit errors.
+ base_error_flags=" \
+ -Werror=missing-prototypes \
+ -Werror=implicit-function-declaration \
+ -Werror=pointer-arith \
+ -Werror=init-self \
+ -Werror=format-security \
+ -Werror=format=2 \
+ -Werror=missing-include-dirs \
+ "
+
+ dnl Additional warning or error flags provided by the module author to
+ dnl allow stricter standards to be imposed on a per-module basis.
+ dnl The author can pass -W or -Werror flags here as they see fit.
+ additional_flags="m4_default([$2],[])"
+
+ case "$enable_compile_warnings" in
+ no)
+ warning_flags=
+ ;;
+ minimum)
+ warning_flags="-Wall"
+ ;;
+ yes|maximum|error)
+ warning_flags="$base_warn_flags $base_error_flags $additional_flags"
+ ;;
+ *)
+ AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to
--enable-compile-warnings)
+ ;;
+ esac
+
+ if test "$enable_compile_warnings" = "error" ; then
+ warning_flags="$warning_flags -Werror"
+ fi
+
+ dnl Check whether GCC supports the warning options
+ for option in $warning_flags; do
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $option"
+ AC_MSG_CHECKING([whether gcc understands $option])
+ AC_TRY_COMPILE([], [],
+ has_option=yes,
+ has_option=no,)
+ CFLAGS="$save_CFLAGS"
+ AC_MSG_RESULT([$has_option])
+ if test $has_option = yes; then
+ tested_warning_flags="$tested_warning_flags $option"
+ fi
+ unset has_option
+ unset save_CFLAGS
+ done
+ unset option
+ CFLAGS="$realsave_CFLAGS"
+ AC_MSG_CHECKING(what warning flags to pass to the C compiler)
+ AC_MSG_RESULT($tested_warning_flags)
+
+ AC_ARG_ENABLE(iso-c,
+ AS_HELP_STRING([--enable-iso-c],
+ [Try to warn if code is not ISO C ]),,
+ [enable_iso_c=no])
+
+ AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
+ complCFLAGS=
+ if test "x$enable_iso_c" != "xno"; then
+ if test "x$GCC" = "xyes"; then
+ case " $CFLAGS " in
+ *[\ \ ]-ansi[\ \ ]*) ;;
+ *) complCFLAGS="$complCFLAGS -ansi" ;;
+ esac
+ case " $CFLAGS " in
+ *[\ \ ]-pedantic[\ \ ]*) ;;
+ *) complCFLAGS="$complCFLAGS -pedantic" ;;
+ esac
+ fi
+ fi
+ AC_MSG_RESULT($complCFLAGS)
+
+ WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
+ AC_SUBST(WARN_CFLAGS)
+])
+
+dnl For C++, do basically the same thing.
+
+AC_DEFUN([GNOME_CXX_WARNINGS],[
+ AC_ARG_ENABLE(cxx-warnings,
+ AS_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
+ [Turn on compiler warnings.]),,
+ [enable_cxx_warnings="m4_default([$1],[minimum])"])
+
+ AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
+ warnCXXFLAGS=
+ if test "x$GXX" != xyes; then
+ enable_cxx_warnings=no
+ fi
+ if test "x$enable_cxx_warnings" != "xno"; then
+ if test "x$GXX" = "xyes"; then
+ case " $CXXFLAGS " in
+ *[\ \ ]-Wall[\ \ ]*) ;;
+ *) warnCXXFLAGS="-Wall -Wno-unused" ;;
+ esac
+
+ ## -W is not all that useful. And it cannot be controlled
+ ## with individual -Wno-xxx flags, unlike -Wall
+ if test "x$enable_cxx_warnings" = "xyes"; then
+ warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
+ fi
+ fi
+ fi
+ AC_MSG_RESULT($warnCXXFLAGS)
+
+ AC_ARG_ENABLE(iso-cxx,
+ AS_HELP_STRING([--enable-iso-cxx],
+ [Try to warn if code is not ISO C++ ]),,
+ [enable_iso_cxx=no])
+
+ AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
+ complCXXFLAGS=
+ if test "x$enable_iso_cxx" != "xno"; then
+ if test "x$GXX" = "xyes"; then
+ case " $CXXFLAGS " in
+ *[\ \ ]-ansi[\ \ ]*) ;;
+ *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
+ esac
+
+ case " $CXXFLAGS " in
+ *[\ \ ]-pedantic[\ \ ]*) ;;
+ *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
+ esac
+ fi
+ fi
+ AC_MSG_RESULT($complCXXFLAGS)
+
+ WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
+ AC_SUBST(WARN_CXXFLAGS)
+])
+
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnome-epub-thumbnailer-1.3/configure
new/gnome-epub-thumbnailer-1.4/configure
--- old/gnome-epub-thumbnailer-1.3/configure 2013-08-08 17:23:07.000000000
+0200
+++ new/gnome-epub-thumbnailer-1.4/configure 2014-03-23 17:56:06.000000000
+0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gnome-epub-thumbnailer 1.3.
+# Generated by GNU Autoconf 2.69 for gnome-epub-thumbnailer 1.4.
#
# Report bugs to <[email protected]>.
#
@@ -580,8 +580,8 @@
# Identity of this package.
PACKAGE_NAME='gnome-epub-thumbnailer'
PACKAGE_TARNAME='gnome-epub-thumbnailer'
-PACKAGE_VERSION='1.3'
-PACKAGE_STRING='gnome-epub-thumbnailer 1.3'
+PACKAGE_VERSION='1.4'
+PACKAGE_STRING='gnome-epub-thumbnailer 1.4'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures gnome-epub-thumbnailer 1.3 to adapt to many kinds of
systems.
+\`configure' configures gnome-epub-thumbnailer 1.4 to adapt to many kinds of
systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1306,7 +1306,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of gnome-epub-thumbnailer 1.3:";;
+ short | recursive ) echo "Configuration of gnome-epub-thumbnailer 1.4:";;
esac
cat <<\_ACEOF
@@ -1408,7 +1408,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-gnome-epub-thumbnailer configure 1.3
+gnome-epub-thumbnailer configure 1.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1463,7 +1463,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by gnome-epub-thumbnailer $as_me 1.3, which was
+It was created by gnome-epub-thumbnailer $as_me 1.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2326,7 +2326,7 @@
# Define the identity of the package.
PACKAGE='gnome-epub-thumbnailer'
- VERSION='1.3'
+ VERSION='1.4'
cat >>confdefs.h <<_ACEOF
@@ -3661,6 +3661,8 @@
-Werror=missing-include-dirs \
"
+ additional_flags=""
+
case "$enable_compile_warnings" in
no)
warning_flags=
@@ -3668,11 +3670,8 @@
minimum)
warning_flags="-Wall"
;;
- yes)
- warning_flags="$base_warn_flags $base_error_flags"
- ;;
- maximum|error)
- warning_flags="$base_warn_flags $base_error_flags"
+ yes|maximum|error)
+ warning_flags="$base_warn_flags $base_error_flags $additional_flags"
;;
*)
as_fn_error $? "Unknown argument '$enable_compile_warnings' to
--enable-compile-warnings" "$LINENO" 5
@@ -4531,7 +4530,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by gnome-epub-thumbnailer $as_me 1.3, which was
+This file was extended by gnome-epub-thumbnailer $as_me 1.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4588,7 +4587,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //;
s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-gnome-epub-thumbnailer config.status 1.3
+gnome-epub-thumbnailer config.status 1.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnome-epub-thumbnailer-1.3/configure.ac
new/gnome-epub-thumbnailer-1.4/configure.ac
--- old/gnome-epub-thumbnailer-1.3/configure.ac 2013-08-08 17:22:32.000000000
+0200
+++ new/gnome-epub-thumbnailer-1.4/configure.ac 2014-03-23 17:55:52.000000000
+0100
@@ -1,6 +1,6 @@
AC_PREREQ(2.59)
-AC_INIT([gnome-epub-thumbnailer], [1.3], [[email protected]])
+AC_INIT([gnome-epub-thumbnailer], [1.4], [[email protected]])
AM_INIT_AUTOMAKE(1.9 dist-xz no-dist-gzip check-news)
# Enable silent build when available (Automake 1.11)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnome-epub-thumbnailer-1.3/gnome-epub-thumbnailer.c
new/gnome-epub-thumbnailer-1.4/gnome-epub-thumbnailer.c
--- old/gnome-epub-thumbnailer-1.3/gnome-epub-thumbnailer.c 2013-07-20
18:54:12.000000000 +0200
+++ new/gnome-epub-thumbnailer-1.4/gnome-epub-thumbnailer.c 2013-09-02
02:56:05.000000000 +0200
@@ -68,9 +68,17 @@
return NULL;
}
- while (archive_read_next_header(a, &entry) == ARCHIVE_OK) {
+ while (1) {
const char *name;
+ r = archive_read_next_header(a, &entry);
+
+ if (r != ARCHIVE_OK) {
+ if (r != ARCHIVE_EOF && r == ARCHIVE_FATAL)
+ g_warning ("Fatal error handling archive: %s",
archive_error_string (a));
+ break;
+ }
+
name = archive_entry_pathname (entry);
if (func (name, user_data) == 0) {
size_t size = archive_entry_size (entry);
@@ -81,6 +89,10 @@
read = archive_read_data (a, buf, size);
if (read <= 0) {
g_free (buf);
+ if (read < 0)
+ g_warning ("Fatal error reading '%s' in
archive: %s", name, archive_error_string (a));
+ else
+ g_warning ("Read an empty file from the
archive");
} else {
ret = buf;
*length = size;
@@ -207,8 +219,10 @@
cover_path = NULL;
root_path = get_root_file_from_metafile (metafile, length);
- if (!root_path)
+ if (!root_path) {
+ g_warning ("Couldn't get root path for metafile %s", metafile);
return NULL;
+ }
root_file = file_get_zipped_contents (input_filename, (GCompareFunc)
g_strcmp0, root_path, &root_length);
@@ -255,6 +269,10 @@
/* Look for the cover in the metafile */
metafile = file_get_zipped_contents (path, (GCompareFunc) g_strcmp0,
"META-INF/container.xml", &length);
+ if (metafile == NULL) {
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Could not find META-INF/container.xml file");
+ return NULL;
+ }
cover_path = get_cover_path_from_root_file (metafile, length, path);
g_free (metafile);
if (cover_path != NULL) {
@@ -275,7 +293,7 @@
}
if (cover_data == NULL) {
- g_warning ("Could not find cover file in '%s'", path);
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Could not find cover file");
return NULL;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnome-epub-thumbnailer-1.3/gnome-mobi-thumbnailer.c
new/gnome-epub-thumbnailer-1.4/gnome-mobi-thumbnailer.c
--- old/gnome-epub-thumbnailer-1.3/gnome-mobi-thumbnailer.c 2013-08-08
17:20:13.000000000 +0200
+++ new/gnome-epub-thumbnailer-1.4/gnome-mobi-thumbnailer.c 2013-11-13
18:21:13.000000000 +0100
@@ -166,13 +166,6 @@
header = get_section_data (G_INPUT_STREAM (stream), sections, 0, &len);
- /* Checking crypto type */
- if (get_guint16 (header + 0xC) != 0) {
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"File is encrypted");
- g_free (header);
- return -1;
- }
-
/* Checking metadata availability */
if (!(get_guint32 (header + 0x80) & 0x40)) {
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"File has no metadata");
@@ -190,6 +183,8 @@
}
image_num = get_cover_img_num (header);
+ if (image_num < 0)
+ return image_num;
return first_img + image_num;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnome-epub-thumbnailer-1.3/gnome-thumbnailer-skeleton.c
new/gnome-epub-thumbnailer-1.4/gnome-thumbnailer-skeleton.c
--- old/gnome-epub-thumbnailer-1.3/gnome-thumbnailer-skeleton.c 2013-07-21
20:23:58.000000000 +0200
+++ new/gnome-epub-thumbnailer-1.4/gnome-thumbnailer-skeleton.c 2014-01-06
12:39:35.000000000 +0100
@@ -34,6 +34,40 @@
static gboolean g_fatal_warnings = FALSE;
static char **filenames = NULL;
+static char *
+get_target_uri (GFile *file)
+{
+ GFileInfo *info;
+ char *target;
+
+ info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_TARGET_URI,
G_FILE_QUERY_INFO_NONE, NULL, NULL);
+ if (info == NULL)
+ return NULL;
+ target = g_strdup (g_file_info_get_attribute_string (info,
G_FILE_ATTRIBUTE_STANDARD_TARGET_URI));
+ g_object_unref (info);
+
+ return target;
+}
+
+static char *
+get_target_path (GFile *input)
+{
+ if (g_file_has_uri_scheme (input, "trash") != FALSE ||
+ g_file_has_uri_scheme (input, "recent") != FALSE) {
+ GFile *file;
+ char *input_uri;
+ char *input_path;
+
+ input_uri = get_target_uri (input);
+ file = g_file_new_for_uri (input_uri);
+ g_free (input_uri);
+ input_path = g_file_get_path (file);
+ g_object_unref (file);
+ return input_path;
+ }
+ return g_file_get_path (input);
+}
+
static const GOptionEntry entries[] = {
{ "size", 's', 0, G_OPTION_ARG_INT, &output_size, "Size of the
thumbnail in pixels", NULL },
{"g-fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &g_fatal_warnings, "Make
all warnings fatal", NULL},
@@ -84,9 +118,14 @@
}
input = g_file_new_for_commandline_arg (filenames[0]);
- input_filename = g_file_get_path (input);
+ input_filename = get_target_path (input);
g_object_unref (input);
+ if (input_filename == NULL) {
+ g_warning ("Could not get file path for %s", filenames[0]);
+ return 1;
+ }
+
output = filenames[1];
#ifdef THUMBNAILER_RETURNS_PIXBUF
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]