Hello community, here is the log from the commit of package desktop-file-utils for openSUSE:Factory checked in at Mon Oct 11 12:11:20 CEST 2010. -------- --- desktop-file-utils/desktop-file-utils.changes 2010-09-10 12:42:58.000000000 +0200 +++ desktop-file-utils/desktop-file-utils.changes 2010-10-07 14:13:37.000000000 +0200 @@ -1,0 +2,9 @@ +Thu Oct 7 14:11:12 CEST 2010 - vuntz@opensuse.org + +- Add rpm macros to update the mime database: + %desktop_database_post and %desktop_database_postun. This will + replace SuSEconfig.desktop-file-utils in the future, once we have + converted packages. +- Add a %post scriptlet to update the desktop database. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- macros.desktop-file-utils ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ desktop-file-utils.spec ++++++ --- /var/tmp/diff_new_pack.MWmq2A/_old 2010-10-11 12:10:17.000000000 +0200 +++ /var/tmp/diff_new_pack.MWmq2A/_new 2010-10-11 12:10:17.000000000 +0200 @@ -19,13 +19,14 @@ Name: desktop-file-utils Version: 0.17 -Release: 1 +Release: 2 License: GPLv2+ Summary: Utilities for Manipulating Desktop Files Url: http://www.freedesktop.org/wiki/Software/desktop-file-utils Group: Development/Tools/Other Source0: %{name}-%{version}.tar.bz2 Source1: SuSEconfig.desktop-file-utils +Source2: macros.desktop-file-utils # PATCH-FEATURE-OPENSUSE desktop-file-utils-suse-keys.patch vuntz@opensuse.org -- Handle SUSE-specific keys in validator. This is not strictly necessary, since they are prefixed with X-, but we can verify that the value has the right type. Patch0: desktop-file-utils-suse-keys.patch BuildRequires: glib2-devel @@ -61,6 +62,8 @@ # SuSEconfig script mkdir -p %{buildroot}/sbin/conf.d install %{S:1} %{buildroot}/sbin/conf.d +# Install rpm macros +install -D -m644 %{S:2} %{buildroot}%{_sysconfdir}/rpm/macros.desktop-file-utils # Create ghosts based on default $XDG_DATA_DIRS: mkdir -p %{buildroot}%{_datadir}/applications touch %{buildroot}%{_datadir}/applications/mimeinfo.cache @@ -68,6 +71,9 @@ %clean rm -rf %{buildroot} +%post +%{_bindir}/update-desktop-database --quiet %{_datadir}/applications || true + %postun # It is not allowed by FHS to own this file in RPM package, but we can # purge it. Removal on update can be ignored, SuSEconfig will create it @@ -91,6 +97,7 @@ %dir %{_datadir}/emacs %dir %{_datadir}/emacs/site-lisp %{_datadir}/emacs/site-lisp/*.el* +%{_sysconfdir}/rpm/macros.desktop-file-utils /sbin/conf.d/SuSEconfig.* %changelog ++++++ macros.desktop-file-utils ++++++ # RPM macros for packages installing desktop files # ### # # When a package installs a desktop file, it should use both macros: # # - %desktop_database_post in %post # - %desktop_database_postun in %postun # # Note that these macros can optionally take as argument the directory # where the desktop file is installed. If no argument is passed, then # %{_datadir}/applications will be used (which is where applications # usually install their desktop file). # ### # On install, update the desktop database %desktop_database_post() \ if test -x %{_bindir}/update-desktop-database; then \ %if "x%1" != "x%%1" \ %{_bindir}/update-desktop-database --quiet "%1" || true \ %endif \ %{_bindir}/update-desktop-database --quiet "%{_datadir}/applications" || true \ %else \ fi # On uninstall, update the desktop database. Note: we ignore upgrades (already # handled in %post of the new package). %desktop_database_postun() \ if [ $1 -eq 0 ]; then \ if test -x %{_bindir}/update-desktop-database; then \ %{_bindir}/update-desktop-database --quiet "${DESKTOP_DIR}" || true \ %if "x%1" != "x%%1" \ %{_bindir}/update-desktop-database --quiet "%1" || true \ %endif \ %{_bindir}/update-desktop-database --quiet "%{_datadir}/applications" || true \ %else \ fi \ fi ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org