Hello community,
here is the log from the commit of package rpmlint-mini
checked in at Thu Nov 8 23:32:08 CET 2007.
--------
--- rpmlint-mini/rpmlint-mini.changes 2007-06-21 23:55:05.000000000 +0200
+++ /mounts/work_src_done/STABLE/rpmlint-mini/rpmlint-mini.changes 2007-10-29 12:56:50.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Oct 29 12:56:30 CET 2007 - dmueller@suse.de
+
+- update to (also) build rpmlint 0.81
+- update desktop-file-validate to 0.14
+
+-------------------------------------------------------------------
Old:
----
desktop-file-utils-0.13.tar.bz2
New:
----
desktop-file-utils-0.14.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rpmlint-mini.spec ++++++
--- /var/tmp/diff_new_pack.l16506/_old 2007-11-08 23:31:47.000000000 +0100
+++ /var/tmp/diff_new_pack.l16506/_new 2007-11-08 23:31:47.000000000 +0100
@@ -14,12 +14,12 @@
BuildRequires: glib2-devel pkg-config rpm-python rpmlint
Summary: Rpm correctness checker
Version: 1.0
-Release: 20
-URL: http://rpmlint.zarb.org/
-License: GNU General Public License (GPL)
+Release: 69
+Url: http://rpmlint.zarb.org/
+License: GPL v2 or later
Group: System/Packages
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: desktop-file-utils-0.13.tar.bz2
+Source: desktop-file-utils-0.14.tar.bz2
Patch10: static-desktop-file-validate.diff
Source100: rpmlint-deps.txt
Source101: rpmlint.wrapper
@@ -37,7 +37,7 @@
Gwenole Beauchesne
%prep
-%setup -q -n desktop-file-utils-0.13
+%setup -q -n desktop-file-utils-0.14
%patch10
%build
@@ -51,7 +51,6 @@
# test if the rpmlint works at all
. /.buildenv
/usr/bin/rpmlint /.rpm-cache/$BUILD_BASENAME/m4.rpm || exit 1
-rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/opt/testing/share/rpmlint
install -m 755 -D src/desktop-file-validate $RPM_BUILD_ROOT/opt/testing/bin/desktop-file-validate
cp -a /usr/share/rpmlint/*.py $RPM_BUILD_ROOT/opt/testing/share/rpmlint
@@ -69,7 +68,7 @@
rm -rf $RPM_BUILD_ROOT/{usr,etc}
rm -f $RPM_BUILD_ROOT/opt/testing/bin/rpmlint
install -m 755 -D %{SOURCE101} $RPM_BUILD_ROOT/opt/testing/bin/rpmlint
-install -D /usr/share/rpmlint/config $RPM_BUILD_ROOT/opt/testing/share/rpmlint/config
+install -m 644 -D /usr/share/rpmlint/config $RPM_BUILD_ROOT/opt/testing/share/rpmlint/config
# hackatlon
%define my_requires %{_builddir}/%{?buildsubdir}/%{name}-requires
cat << EOF > %my_requires
@@ -94,8 +93,10 @@
%files
%defattr(-,root,root,0755)
/opt/testing
-
%changelog
+* Mon Oct 29 2007 - dmueller@suse.de
+- update to (also) build rpmlint 0.81
+- update desktop-file-validate to 0.14
* Thu Jun 21 2007 - dmueller@suse.de
- refresh patches
* Thu Jun 07 2007 - dmueller@suse.de
++++++ desktop-file-utils-0.13.tar.bz2 -> desktop-file-utils-0.14.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/desktop-file-utils-0.13/ChangeLog new/desktop-file-utils-0.14/ChangeLog
--- old/desktop-file-utils-0.13/ChangeLog 2007-06-05 00:28:57.000000000 +0200
+++ new/desktop-file-utils-0.14/ChangeLog 2007-09-01 16:47:07.000000000 +0200
@@ -1,3 +1,82 @@
+2007-09-01 Vincent Untz
+
+ * NEWS: version 0.14
+
+2007-09-01 Vincent Untz
+
+ * README: small improvements
+
+2007-09-01 Vincent Untz
+
+ * src/install.c: (process_one_file): validate the desktop file after
+ modifying its content, but before doing anything else, so that we
+ don't unlink the original file if the created one is not valid.
+ Also, unlink the created file if it's not valid.
+
+2007-09-01 Vincent Untz
+
+ Don't exit(), but let the main() function do it with a proper error
+ message.
+
+ * src/install.c: (files_are_the_same): it's useless to exit() here if
+ we can't stat() the files. Just continue the operations without
+ removing the original file, that's the best option.
+ (process_one_file): don't exit(), but set the GError
+
+2007-09-01 Vincent Untz
+
+ * configure.in: require glib 2.8.0
+ * src/install.c: (mkdir_and_parents): kill
+ (main): directly use g_mkdir_with_parents()
+
+2007-09-01 Vincent Untz
+
+ * src/install.c: (process_one_file): simplify the code with a macro
+ (parse_options_callback): if --add-category="GNOME;GTK" is passed as
+ argument, parse the list of categories instead of assuming the user
+ only gave one category.
+ Fix bug #12207.
+
+2007-08-18 Vincent Untz
+
+ * src/install.c: (parse_options_callback): handle -m too.
+ Fix bug #12018.
+ Patch by Matthias Clasen
+
+2007-08-18 Vincent Untz
+
+ Handle X-Foo in environments.
+ Based on patch by Stanislav Brabec .
+ Fix bug #11565.
+
+ * src/validate.c: (handle_show_in_key): handle "X-Foo" and change the
+ error message to mention X-
+ (handle_categories_key): change a bit the error message to mention X-
+
+2007-07-27 Vincent Untz
+
+ * src/validate.c: (handle_icon_key): new, checks that the value is
+ either an absolute path to a file, or that the value looks like an
+ icon name without an extension (png, xpm or svg). Rejects relative
+ pathes too.
+
+2007-07-08 Vincent Untz
+
+ * src/install.c: (process_one_file): pass the GError to
+ g_key_file_load_from_file(), so we know when we can't load a file and
+ print an error about this. Fix bug #11500.
+
+2007-06-30 Vincent Untz
+
+ * misc/desktop-entry-mode.el: updated to desktop entry spec 1.0.
+ Patch by Ville Skyttä
+
+2007-06-05 Vincent Untz
+
+ * configure.in: post-release bump to 0.14
+
+==================== 0.13 ====================
+
2007-06-05 Vincent Untz
* NEWS: version 0.13
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/desktop-file-utils-0.13/configure new/desktop-file-utils-0.14/configure
--- old/desktop-file-utils-0.13/configure 2007-06-05 00:33:51.000000000 +0200
+++ new/desktop-file-utils-0.14/configure 2007-09-01 16:47:32.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for desktop-file-utils 0.13.
+# Generated by GNU Autoconf 2.60 for desktop-file-utils 0.14.
#
# Report bugs to https://bugs.freedesktop.org/enter_bug.cgi?product=desktop-file-utils.
#
@@ -713,8 +713,8 @@
# Identity of this package.
PACKAGE_NAME='desktop-file-utils'
PACKAGE_TARNAME='desktop-file-utils'
-PACKAGE_VERSION='0.13'
-PACKAGE_STRING='desktop-file-utils 0.13'
+PACKAGE_VERSION='0.14'
+PACKAGE_STRING='desktop-file-utils 0.14'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=desktop-file-utils'
ac_unique_file="src/validate.h"
@@ -1382,7 +1382,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 desktop-file-utils 0.13 to adapt to many kinds of systems.
+\`configure' configures desktop-file-utils 0.14 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1452,7 +1452,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of desktop-file-utils 0.13:";;
+ short | recursive ) echo "Configuration of desktop-file-utils 0.14:";;
esac
cat <<\_ACEOF
@@ -1561,7 +1561,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-desktop-file-utils configure 0.13
+desktop-file-utils configure 0.14
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1575,7 +1575,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by desktop-file-utils $as_me 0.13, which was
+It was created by desktop-file-utils $as_me 0.14, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -2215,7 +2215,7 @@
# Define the identity of the package.
PACKAGE='desktop-file-utils'
- VERSION='0.13'
+ VERSION='0.14'
cat >>confdefs.h <<_ACEOF
@@ -20066,12 +20066,12 @@
pkg_cv_DESKTOP_FILE_UTILS_CFLAGS="$DESKTOP_FILE_UTILS_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.6.0\"") >&5
- ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.6.0") 2>&5
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.8.0\"") >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.8.0") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_DESKTOP_FILE_UTILS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.6.0" 2>/dev/null`
+ pkg_cv_DESKTOP_FILE_UTILS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.8.0" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -20084,12 +20084,12 @@
pkg_cv_DESKTOP_FILE_UTILS_LIBS="$DESKTOP_FILE_UTILS_LIBS"
else
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.6.0\"") >&5
- ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.6.0") 2>&5
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.8.0\"") >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.8.0") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_DESKTOP_FILE_UTILS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.6.0" 2>/dev/null`
+ pkg_cv_DESKTOP_FILE_UTILS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.8.0" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -20108,14 +20108,14 @@
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- DESKTOP_FILE_UTILS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.6.0"`
+ DESKTOP_FILE_UTILS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.8.0"`
else
- DESKTOP_FILE_UTILS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.6.0"`
+ DESKTOP_FILE_UTILS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.8.0"`
fi
# Put the nasty error message in config.log where it belongs
echo "$DESKTOP_FILE_UTILS_PKG_ERRORS" >&5
- { { echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= 2.6.0) were not met:
+ { { echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= 2.8.0) were not met:
$DESKTOP_FILE_UTILS_PKG_ERRORS
@@ -20126,7 +20126,7 @@
and DESKTOP_FILE_UTILS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" >&5
-echo "$as_me: error: Package requirements (glib-2.0 >= 2.6.0) were not met:
+echo "$as_me: error: Package requirements (glib-2.0 >= 2.8.0) were not met:
$DESKTOP_FILE_UTILS_PKG_ERRORS
@@ -20677,7 +20677,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by desktop-file-utils $as_me 0.13, which was
+This file was extended by desktop-file-utils $as_me 0.14, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20730,7 +20730,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-desktop-file-utils config.status 0.13
+desktop-file-utils config.status 0.14
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/desktop-file-utils-0.13/configure.in new/desktop-file-utils-0.14/configure.in
--- old/desktop-file-utils-0.13/configure.in 2007-03-15 23:14:06.000000000 +0100
+++ new/desktop-file-utils-0.14/configure.in 2007-09-01 16:09:27.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT([desktop-file-utils], [0.13],
+AC_INIT([desktop-file-utils], [0.14],
[https://bugs.freedesktop.org/enter_bug.cgi?product=desktop-file-utils])
AC_CONFIG_SRCDIR(src/validate.h)
@@ -94,7 +94,7 @@
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ +/ /g'`
changequote([,])dnl
-PKG_CHECK_MODULES(DESKTOP_FILE_UTILS, glib-2.0 >= 2.6.0)
+PKG_CHECK_MODULES(DESKTOP_FILE_UTILS, glib-2.0 >= 2.8.0)
AM_PATH_LISPDIR
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/desktop-file-utils-0.13/Makefile.in new/desktop-file-utils-0.14/Makefile.in
--- old/desktop-file-utils-0.13/Makefile.in 2007-06-05 00:33:50.000000000 +0200
+++ new/desktop-file-utils-0.14/Makefile.in 2007-09-01 16:47:31.000000000 +0200
@@ -158,8 +158,8 @@
check-recursive installcheck-recursive
DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \
COPYING ChangeLog INSTALL Makefile.am NEWS aclocal.m4 \
- config.guess config.h.in config.sub configure.in depcomp \
- elisp-comp install-sh ltmain.sh missing mkinstalldirs
+ config.guess config.h.in config.sub configure configure.in \
+ depcomp elisp-comp install-sh ltmain.sh missing mkinstalldirs
DIST_SUBDIRS = $(SUBDIRS)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/desktop-file-utils-0.13/misc/desktop-entry-mode.el new/desktop-file-utils-0.14/misc/desktop-entry-mode.el
--- old/desktop-file-utils-0.13/misc/desktop-entry-mode.el 2006-11-07 17:13:38.000000000 +0100
+++ new/desktop-file-utils-0.14/misc/desktop-entry-mode.el 2007-06-30 14:52:15.000000000 +0200
@@ -1,8 +1,8 @@
;;; desktop-entry-mode.el --- freedesktop.org desktop entry editing
-;; Copyright (C) 2003-2004, 2006, Ville Skytt�, <scop at xemacs.org>
+;; Copyright (C) 2003-2004, 2006-2007 Ville Skyttä, <scop at xemacs.org>
-;; Author: Ville Skytt�, <scop at xemacs.org>
+;; Author: Ville Skyttä, <scop at xemacs.org>
;; Keywords: unix, desktop entry
;; This file is part of XEmacs.
@@ -45,11 +45,14 @@
;; For more information about desktop entry files, see
;; http://www.freedesktop.org/Standards/desktop-entry-spec
;;
-;; This version is up to date with version 0.9.8 of the specification.
+;; This version is up to date with version 1.0 of the specification.
;;; Code:
-(defconst desktop-entry-mode-version "0.98 (spec 0.9.8)"
+(eval-when-compile
+ (require 'regexp-opt))
+
+(defconst desktop-entry-mode-version "1.0 (spec 1.0)"
"Version of `desktop-entry-mode'.")
(defgroup desktop-entry nil
@@ -74,6 +77,19 @@
"*Face for highlighting desktop entry group headers."
:group 'desktop-entry-faces)
+(defface desktop-entry-deprecated-keyword-face
+ '((((class color)) (:background "yellow" :foreground "black" :strikethru t))
+ )
+ "*Face for highlighting deprecated desktop entry keys."
+ :group 'desktop-entry-faces)
+
+(defface desktop-entry-unknown-keyword-face
+ '((((class color)) (:foreground "red3" :underline t))
+ (t (:underline t))
+ )
+ "*Face for highlighting unknown desktop entry keys."
+ :group 'desktop-entry-faces)
+
(defface desktop-entry-value-face
'((((class color) (background light)) (:foreground "darkgreen"))
(((class color) (background dark)) (:foreground "lightgreen"))
@@ -90,7 +106,6 @@
(defconst desktop-entry-keywords
(eval-when-compile
- (require 'regexp-opt)
(concat
"\\(?:"
(regexp-opt
@@ -125,7 +140,16 @@
"MountPoint"
"ReadOnly"
"UnmountIcon"
- ;; Deprecated
+ ) 'words)
+ "\\|X-[A-Za-z0-9-]+\\)"))
+ "Expression for matching desktop entry keys.")
+
+(defconst desktop-entry-deprecated-keywords
+ (eval-when-compile
+ (concat
+ "\\(\\\\|"
+ (regexp-opt
+ '(
"Patterns"
"DefaultApp"
"Encoding"
@@ -140,8 +164,8 @@
"SortOrder"
"FilePattern"
) 'words)
- "\\|X-[A-Za-z0-9-]+\\)"))
- "Expression for matching desktop entry keys.")
+ "\\)"))
+ "Expression for matching deprecated desktop entry keys.")
(defconst desktop-entry-group-header-re
"^\\[\\(X-[^\][]+\\|\\(?:Desktop \\(?:Entry\\|Action [a-zA-Z]+\\)\\)\\)\\]"
@@ -150,7 +174,10 @@
(defconst desktop-entry-font-lock-keywords
(list
(cons "^\\s-*#.*$" '(0 'font-lock-comment-face))
+ (cons (concat "^" desktop-entry-deprecated-keywords)
+ '(0 'desktop-entry-deprecated-keyword-face))
(cons (concat "^" desktop-entry-keywords) '(0 'font-lock-keyword-face))
+ (cons "^[A-Za-z0-9-]+" '(0 'desktop-entry-unknown-keyword-face))
(cons desktop-entry-group-header-re '(1 'desktop-entry-group-header-face))
(cons "^[A-Za-z0-9-]+?\\s-*=\\s-*\\(.*\\)"
'(1 'desktop-entry-value-face))
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/desktop-file-utils-0.13/NEWS new/desktop-file-utils-0.14/NEWS
--- old/desktop-file-utils-0.13/NEWS 2007-06-05 00:32:55.000000000 +0200
+++ new/desktop-file-utils-0.14/NEWS 2007-09-01 16:46:52.000000000 +0200
@@ -1,4 +1,23 @@
============
+Version 0.14
+============
+
+ o update of the Emacs editing mode for .desktop files (Ville Skyttä)
+ o make desktop-file-install print an error when trying to install a
+ non-existing desktop file, or a desktop file that can't be read (Vincent)
+ o make the validator check the content of the Icon key (Vincent)
+ o make the validator accept X-Foo as a valid environment (this was added to
+ the spec) (Stanislav Brabec, Vincent)
+ o really handle the -m command line argument for desktop-file-install
+ (Matthias Clasen)
+ o make desktop-file-install accept as one valid argument multiple
+ categories/only-show-in/mime-types values. Now --add-category="GNOME;GTK"
+ works as expected. (Vincent)
+ o make desktop-file-install validate the created desktop file before removing
+ the original file, and unlink it if it's not valid (Vincent)
+ o code cleanups for desktop-file-install (Vincent)
+
+============
Version 0.13
============
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/desktop-file-utils-0.13/README new/desktop-file-utils-0.14/README
--- old/desktop-file-utils-0.13/README 2007-03-15 23:14:06.000000000 +0100
+++ new/desktop-file-utils-0.14/README 2007-09-01 16:38:41.000000000 +0200
@@ -1,6 +1,11 @@
Utilities for manipulating desktop files.
+http://www.freedesktop.org/wiki/Software/desktop-file-utils
-desktop-file-validate: validates a desktop file and prints warnings/errors about spec violations.
+desktop-file-validate: validates a desktop file and prints warnings/errors
+ about desktop entry specification violations.
-desktop-file-install: installs a desktop file to the applications directory, optionally munging
- it a bit in transit.
+desktop-file-install: installs a desktop file to the applications directory,
+ optionally munging it a bit in transit.
+
+More information about desktop files can be found at:
+http://freedesktop.org/wiki/Specifications/desktop-entry-spec
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/desktop-file-utils-0.13/src/install.c new/desktop-file-utils-0.14/src/install.c
--- old/desktop-file-utils-0.13/src/install.c 2007-06-04 19:39:52.000000000 +0200
+++ new/desktop-file-utils-0.14/src/install.c 2007-09-01 16:27:35.000000000 +0200
@@ -9,7 +9,6 @@
#include
#include
#include
-#include
#include
#include "keyfileutils.h"
@@ -47,13 +46,13 @@
if (stat (first, &first_sb) < 0)
{
g_printerr (_("Could not stat \"%s\": %s\n"), first, g_strerror (errno));
- exit (1);
+ return TRUE;
}
if (stat (second, &second_sb) < 0)
{
g_printerr (_("Could not stat \"%s\": %s\n"), first, g_strerror (errno));
- exit (1);
+ return TRUE;
}
return ((first_sb.st_dev == second_sb.st_dev) &&
@@ -101,14 +100,16 @@
if (!g_key_file_load_from_file (kf, filename,
G_KEY_FILE_KEEP_COMMENTS|
G_KEY_FILE_KEEP_TRANSLATIONS,
- NULL)) {
+ err)) {
g_key_file_free (kf);
return;
}
if (!desktop_file_fixup (kf, filename)) {
g_key_file_free (kf);
- exit (1);
+ g_set_error (err, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_PARSE,
+ _("Failed to fix the content of the desktop file"));
+ return;
}
if (copy_name_to_generic_name)
@@ -126,45 +127,30 @@
g_key_file_set_string (kf, GROUP_DESKTOP_ENTRY,
"X-Desktop-File-Install-Version", VERSION);
- /* Add categories */
- tmp = added_categories;
- while (tmp != NULL)
- {
- dfu_key_file_merge_list (kf, GROUP_DESKTOP_ENTRY,
- "Categories", tmp->data);
-
- tmp = tmp->next;
- }
-
- /* Remove categories */
- tmp = removed_categories;
- while (tmp != NULL)
- {
- dfu_key_file_remove_list (kf, GROUP_DESKTOP_ENTRY,
- "Categories", tmp->data);
-
- tmp = tmp->next;
- }
-
- /* Add onlyshowin */
- tmp = added_only_show_in;
- while (tmp != NULL)
- {
- dfu_key_file_merge_list (kf, GROUP_DESKTOP_ENTRY,
- "OnlyShowIn", tmp->data);
-
- tmp = tmp->next;
+#define PROCESS_LIST(key, added, removed) \
+ /* Add to the list */ \
+ tmp = added; \
+ while (tmp != NULL) \
+ { \
+ dfu_key_file_merge_list (kf, GROUP_DESKTOP_ENTRY, \
+ key, tmp->data); \
+ tmp = tmp->next; \
+ } \
+ \
+ /* Remove from the list */ \
+ tmp = removed; \
+ while (tmp != NULL) \
+ { \
+ dfu_key_file_remove_list (kf, GROUP_DESKTOP_ENTRY, \
+ key, tmp->data); \
+ tmp = tmp->next; \
}
- /* Remove onlyshowin */
- tmp = removed_only_show_in;
- while (tmp != NULL)
- {
- dfu_key_file_remove_list (kf, GROUP_DESKTOP_ENTRY,
- "OnlyShowIn", tmp->data);
+ /* Add/remove categories */
+ PROCESS_LIST ("Categories", added_categories, removed_categories);
- tmp = tmp->next;
- }
+ /* Add/remove onlyshowin */
+ PROCESS_LIST ("OnlyShowIn", added_only_show_in, removed_only_show_in);
/* Remove keys */
tmp = removed_keys;
@@ -175,25 +161,8 @@
tmp = tmp->next;
}
- /* Add mime-types */
- tmp = added_mime_types;
- while (tmp != NULL)
- {
- dfu_key_file_merge_list (kf, GROUP_DESKTOP_ENTRY,
- "MimeType", tmp->data);
-
- tmp = tmp->next;
- }
-
- /* Remove mime-types */
- tmp = removed_mime_types;
- while (tmp != NULL)
- {
- dfu_key_file_remove_list (kf, GROUP_DESKTOP_ENTRY,
- "MimeType", tmp->data);
-
- tmp = tmp->next;
- }
+ /* Add/remove mime-types */
+ PROCESS_LIST ("MimeType", added_mime_types, removed_mime_types);
dirname = g_path_get_dirname (filename);
@@ -222,6 +191,16 @@
g_key_file_free (kf);
+ /* Load and validate the file we just wrote */
+ if (!desktop_file_validate (new_filename, FALSE, TRUE))
+ {
+ g_set_error (err, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_PARSE,
+ _("Failed to validate the created desktop file"));
+ g_unlink (new_filename);
+ g_free (new_filename);
+ return;
+ }
+
if (g_chmod (new_filename, permissions) < 0)
{
g_set_error (err, G_FILE_ERROR,
@@ -242,14 +221,6 @@
filename, g_strerror (errno));
}
- /* Load and validate the file we just wrote */
- if (!desktop_file_validate (new_filename, FALSE, TRUE))
- {
- g_printerr (_("desktop-file-install created an invalid desktop file!\n"));
- g_free (new_filename);
- exit (1);
- }
-
if (rebuild_mime_info_cache)
{
rebuild_error = NULL;
@@ -429,8 +400,13 @@
gpointer data,
GError **error)
{
- /* skip "--" */
- option_name += 2;
+ char **list;
+ int i;
+
+ /* skip "-" or "--" */
+ option_name++;
+ if (*option_name == '-')
+ option_name++;
if (strcmp (OPTION_VENDOR, option_name) == 0)
{
@@ -456,31 +432,40 @@
target_dir = g_strdup (value);
}
+#define PARSE_OPTION_LIST(glist) \
+ do { \
+ list = g_strsplit (value, ";", 0); \
+ for (i = 0; list[i]; i++) \
+ { \
+ if (*list[i] == '\0') \
+ continue; \
+ \
+ glist = g_slist_prepend (glist, g_strdup (list[i])); \
+ } \
+ } while (0)
+
else if (strcmp (OPTION_ADD_CATEGORY, option_name) == 0)
{
- added_categories = g_slist_prepend (added_categories,
- g_strdup (value));
+ PARSE_OPTION_LIST (added_categories);
}
else if (strcmp (OPTION_REMOVE_CATEGORY, option_name) == 0)
{
- removed_categories = g_slist_prepend (removed_categories,
- g_strdup (value));
+ PARSE_OPTION_LIST (removed_categories);
}
else if (strcmp (OPTION_ADD_ONLY_SHOW_IN, option_name) == 0)
{
- added_only_show_in = g_slist_prepend (added_only_show_in,
- g_strdup (value));
+ PARSE_OPTION_LIST (added_only_show_in);
}
else if (strcmp (OPTION_REMOVE_ONLY_SHOW_IN, option_name) == 0)
{
- removed_only_show_in = g_slist_prepend (removed_only_show_in,
- g_strdup (value));
+ PARSE_OPTION_LIST (removed_only_show_in);
}
- else if (strcmp (OPTION_MODE, option_name) == 0)
+ else if (strcmp (OPTION_MODE, option_name) == 0 ||
+ strcmp ("m", option_name) == 0)
{
unsigned long ul;
char *end;
@@ -506,14 +491,12 @@
else if (strcmp (OPTION_ADD_MIME_TYPE, option_name) == 0)
{
- added_mime_types = g_slist_prepend (added_mime_types,
- g_strdup (value));
+ PARSE_OPTION_LIST (added_mime_types);
}
else if (strcmp (OPTION_REMOVE_MIME_TYPE, option_name) == 0)
{
- removed_mime_types = g_slist_prepend (removed_mime_types,
- g_strdup (value));
+ PARSE_OPTION_LIST (removed_mime_types);
}
else
@@ -527,27 +510,6 @@
return TRUE;
}
-static void
-mkdir_and_parents (const char *dirname,
- mode_t mode)
-{
- char *parent;
- char *slash;
-
- parent = g_strdup (dirname);
- slash = NULL;
- if (*parent != '\0')
- slash = strrchr (parent, '/');
- if (slash != NULL)
- {
- *slash = '\0';
- mkdir_and_parents (parent, mode);
- }
- g_free (parent);
-
- mkdir (dirname, mode);
-}
-
int
main (int argc, char **argv)
{
@@ -602,7 +564,7 @@
if (permissions & 0004)
dir_permissions |= 0001;
- mkdir_and_parents (target_dir, dir_permissions);
+ g_mkdir_with_parents (target_dir, dir_permissions);
i = 0;
while (args && args[i])
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/desktop-file-utils-0.13/src/validate.c new/desktop-file-utils-0.14/src/validate.c
--- old/desktop-file-utils-0.13/src/validate.c 2007-06-04 19:24:51.000000000 +0200
+++ new/desktop-file-utils-0.14/src/validate.c 2007-08-18 10:31:31.000000000 +0200
@@ -167,6 +167,10 @@
const char *locale_key,
const char *value);
static gboolean
+handle_icon_key (kf_validator *kf,
+ const char *locale_key,
+ const char *value);
+static gboolean
handle_show_in_key (kf_validator *kf,
const char *locale_key,
const char *value);
@@ -267,7 +271,7 @@
{ DESKTOP_LOCALESTRING_TYPE, "GenericName", FALSE, FALSE, FALSE, NULL },
{ DESKTOP_BOOLEAN_TYPE, "NoDisplay", FALSE, FALSE, FALSE, NULL },
{ DESKTOP_LOCALESTRING_TYPE, "Comment", FALSE, FALSE, FALSE, handle_comment_key },
- { DESKTOP_LOCALESTRING_TYPE, "Icon", FALSE, FALSE, FALSE, NULL },
+ { DESKTOP_LOCALESTRING_TYPE, "Icon", FALSE, FALSE, FALSE, handle_icon_key },
{ DESKTOP_BOOLEAN_TYPE, "Hidden", FALSE, FALSE, FALSE, NULL },
{ DESKTOP_STRING_LIST_TYPE, "OnlyShowIn", FALSE, FALSE, FALSE, handle_show_in_key },
{ DESKTOP_STRING_LIST_TYPE, "NotShowIn", FALSE, FALSE, FALSE, handle_show_in_key },
@@ -698,6 +702,52 @@
return TRUE;
}
+/* + If the name is an absolute path, the given file will be used.
+ * Checked.
+ * + If the name is not an absolute path, the algorithm described in the Icon
+ * Theme Specification will be used to locate the icon.
+ * Checked.
+ * FIXME: add clarification to desktop entry spec that the name doesn't
+ * contain an extension
+ */
+static gboolean
+handle_icon_key (kf_validator *kf,
+ const char *locale_key,
+ const char *value)
+{
+ if (g_path_is_absolute (value)) {
+ if (g_str_has_suffix (value, "/")) {
+ print_fatal (kf, "value \"%s\" for key \"%s\" in group \"%s\" is an "
+ "absolute path to a directory, instead of being an "
+ "absolute path to an icon or an icon name\n",
+ value, locale_key, kf->current_group);
+ return FALSE;
+ } else
+ return TRUE;
+ }
+
+ if (strchr (value, '/')) {
+ print_fatal (kf, "value \"%s\" for key \"%s\" in group \"%s\" looks like "
+ "a relative path, instead of being an absolute path to "
+ "an icon or an icon name\n",
+ value, locale_key, kf->current_group);
+ return FALSE;
+ }
+
+ if (g_str_has_suffix (value, ".png") ||
+ g_str_has_suffix (value, ".xpm") ||
+ g_str_has_suffix (value, ".svg")) {
+ print_fatal (kf, "value \"%s\" for key \"%s\" in group \"%s\" is an icon "
+ "name with an extension, but there should be no extension "
+ "as described in the Icon Theme Specification if the "
+ "value is not an absolute path\n",
+ value, locale_key, kf->current_group);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
/* + Only one of these keys, either OnlyShowIn or NotShowIn, may appear in a
* group.
* Checked.
@@ -705,6 +755,8 @@
* Checked.
* FIXME: this is not perfect because it could fail if a new value with
* a semicolon is registered.
+ * + All values extending the format should start with "X-".
+ * Checked.
* + FIXME: is this okay to have only ";"? (gnome-theme-installer.desktop does)
*/
static gboolean
@@ -746,6 +798,9 @@
g_hash_table_insert (hashtable, show[i], show[i]);
+ if (!strncmp (show[i], "X-", 2))
+ continue;
+
for (j = 0; j < G_N_ELEMENTS (show_in_registered); j++) {
if (!strcmp (show[i], show_in_registered[j]))
break;
@@ -753,7 +808,8 @@
if (j == G_N_ELEMENTS (show_in_registered)) {
print_fatal (kf, "value \"%s\" for key \"%s\" in group \"%s\" "
- "contains an unregistered value \"%s\"\n",
+ "contains an unregistered value \"%s\"; values "
+ "extending the format should start with \"X-\"\n",
value, locale_key, kf->current_group, show[i]);
retval = FALSE;
}
@@ -1163,7 +1219,8 @@
}
print_fatal (kf, "value \"%s\" for key \"%s\" in group \"%s\" "
- "contains an unregistered value \"%s\"\n",
+ "contains an unregistered value \"%s\"; values "
+ "extending the format should start with \"X-\"\n",
value, locale_key, kf->current_group, categories[i]);
retval = FALSE;
}
++++++ rpmlint-deps.txt ++++++
--- rpmlint-mini/rpmlint-deps.txt 2007-06-05 00:36:12.000000000 +0200
+++ /mounts/work_src_done/STABLE/rpmlint-mini/rpmlint-deps.txt 2007-10-29 12:44:11.000000000 +0100
@@ -63,6 +63,7 @@
locale.pyo
_locale.so
locale.so
+math.so
operatormodule.so
operator.pyo
operator.so
@@ -150,6 +151,7 @@
struct.pyo
_struct.so
struct.so
+tempfile.pyo
textwrapmodule.so
textwrap.pyo
textwrap.so
@@ -159,6 +161,8 @@
typesmodule.so
types.pyo
types.so
+random.pyo
+_random.so
UserDictmodule.so
UserDict.pyo
UserDict.so
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org