Hello community,

here is the log from the commit of package xdg-utils for openSUSE:Factory 
checked in at 2016-06-13 21:54:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xdg-utils (Old)
 and      /work/SRC/openSUSE:Factory/.xdg-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xdg-utils"

Changes:
--------
--- /work/SRC/openSUSE:Factory/xdg-utils/xdg-utils.changes      2016-02-18 
12:35:20.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.xdg-utils.new/xdg-utils.changes 2016-06-13 
21:54:55.000000000 +0200
@@ -0,0 +1,11 @@
+Fri May 20 04:54:39 UTC 2016 - [email protected]
+
+- Update to 20160520
+  * xdg-mime: support for KDE Frameworks 5.6
+  * xdg-mime does not write the file it reads in a query (BR95051)
+  * xdg-screensaver: Add cinnamon-screensaver D-Bus API support.
+  * xdg-open: standardize output redirection style
+- Fix issues related to xdg-open/xdg-mime generic code paths.
+  * common-vendor-dirs-in-desktop_to_binary.patch
+  * xdg-mime-return-existing-desktop-files.patch
+  

Old:
----
  xdg-utils-20151219.tar.xz

New:
----
  common-vendor-dirs-in-desktop_to_binary.patch
  xdg-mime-return-existing-desktop-files.patch
  xdg-utils-20160520.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xdg-utils.spec ++++++
--- /var/tmp/diff_new_pack.Nanjz8/_old  2016-06-13 21:54:57.000000000 +0200
+++ /var/tmp/diff_new_pack.Nanjz8/_new  2016-06-13 21:54:57.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           xdg-utils
-Version:        20151219
+Version:        20160520
 Release:        0
 Summary:        Utilities to uniformly interface desktop environments
 License:        MIT
@@ -33,6 +33,9 @@
 Patch2:         fix-enlightenment-support.patch
 # PATCH-FIX-UPSTREAM xdg-terminal-fix-terminal--x-arg.patch fdo#93231 
[email protected] -- https://bugs.freedesktop.org/show_bug.cgi?id=93231#c5
 Patch3:         xdg-terminal-fix-terminal--x-arg.patch
+# PATCH-FIX-UPSTREAM (2 patches) xdg-mime / xdg-open generic implementations 
only return 1 item [email protected] (boo#979265)
+Patch4:         common-vendor-dirs-in-desktop_to_binary.patch
+Patch5:         xdg-mime-return-existing-desktop-files.patch
 BuildRequires:  make
 # for xmlto to be able to generate text from html
 BuildRequires:  w3m
@@ -71,6 +74,8 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
 %configure

++++++ common-vendor-dirs-in-desktop_to_binary.patch ++++++
commit 6e4d88e740b89a2766312fb544e4a22b7034d9e3
Author: Simon Lees <[email protected]>
Date:   Tue May 31 13:13:53 2016 +0930

    common: implement vendor dirs in desktop_file_to_binary

diff --git a/scripts/xdg-utils-common.in b/scripts/xdg-utils-common.in
index cf08cd3..19400a4 100644
--- a/scripts/xdg-utils-common.in
+++ b/scripts/xdg-utils-common.in
@@ -50,7 +50,6 @@ binary_to_desktop_file()
 
 #-------------------------------------------------------------
 # map a .desktop file to a binary
-## FIXME: handle vendor dir case
 desktop_file_to_binary()
 {
     
search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
@@ -58,14 +57,32 @@ desktop_file_to_binary()
     IFS=:
     for dir in $search; do
         unset IFS
-        [ "$dir" ] && [ -d "$dir/applications" ] || continue
-        file="$dir/applications/$desktop"
-        [ -r "$file" ] || continue
-        # Remove any arguments (%F, %f, %U, %u, etc.).
-        command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | 
first_word`"
-        command="`which "$command"`"
-        readlink -f "$command"
-        return
+        [ "$dir" ] && [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || 
continue
+        # Check if desktop file contains -
+        if [ "${desktop#*-}" != "$desktop" ]; then
+            vendor=${desktop%-*}
+            app=${desktop#*-}
+            if [ -r $dir/applications/$vendor/$app ]; then
+                file_path=$dir/applications/$vendor/$app
+            elif [ -r $dir/applnk/$vendor/$app ]; then
+                file_path=$dir/applnk/$vendor/$app
+            fi
+        else
+            for indir in "$dir"/applications/ "$dir"/applications/*/ 
"$dir"/applnk/ "$dir"/applnk/*/; do
+                file="$indir/$desktop"
+                if [ -r "$file" ]; then
+                    file_path=$file
+                    break
+                fi
+            done
+        fi
+        if [ -r "$file_path" ]; then
+            # Remove any arguments (%F, %f, %U, %u, etc.).
+            command="`grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 
2- | first_word`"
+            command="`which "$command"`"
+            readlink -f "$command"
+            return
+        fi
     done
 }
 
++++++ xdg-mime-return-existing-desktop-files.patch ++++++
commit 88deef3f4affa53680382540c2cd1ba9ce8e082d
Author: Simon Lees <[email protected]>
Date:   Fri Jun 3 16:45:08 2016 +0930

    xdg-mime only return desktop file for existing apps
    
    xdg-mime originally returned whatever was in the mimeapps.list
    file, now it only returns the first desktop file that exists
    and has a corrosponding binary that exists.
    
    fdo#44163

Index: xdg-utils-20160520/scripts/xdg-mime.in
===================================================================
--- xdg-utils-20160520.orig/scripts/xdg-mime.in
+++ xdg-utils-20160520/scripts/xdg-mime.in
@@ -372,8 +372,17 @@ check_mimeapps_list()
     }
 ' "$mimeapps_list" | cut -d ';' -f 1)
             if [ -n "$result" ]; then
-                echo "$result"
-                exit_success
+                # $result could be a ; separated list of .desktop files
+                # use the first on the system
+                IFS=\;
+                for app in $result; do
+                    IFS="$oldifs"
+                    exists=$(desktop_file_to_binary "$app")
+                    if [ -n "$exists" ]; then
+                        echo "$app"
+                        exit_success
+                    fi
+                done
             fi
         fi
     done
++++++ xdg-utils-20151219.tar.xz -> xdg-utils-20160520.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20151219/ChangeLog 
new/xdg-utils-20160520/ChangeLog
--- old/xdg-utils-20151219/ChangeLog    2016-01-22 15:12:24.000000000 +0100
+++ new/xdg-utils-20160520/ChangeLog    2016-06-07 07:21:43.000000000 +0200
@@ -1,5 +1,17 @@
 === xdg-utils 1.1.2 (unreleased) ===
 
+2016-05-20 Rex Dieter <[email protected]>
+   * xdg-mime: ensure check_mimeapps_list returns only primary item (BR44163)
+
+2016-05-05 Rex Dieter <[email protected]>
+   * xdg-mime: xdg-mime does not write the file it reads in a query (BR95051)
+
+2016-04-15 Rex Dieter <[email protected]>
+   * xdg-mime: properly handle varied ktraderclient5 output (BR94946)
+
+2016-02-16 Rex Dieter <[email protected]>
+   * xdg-screensaver: support cinnamon-screensaver (BR92966)
+
 2015-12-19 Rex Dieter <[email protected]>
    * xdg-open: improve fallbacks, add open_generic (almost) everywhere 
(BR93442)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20151219/scripts/xdg-mime.in 
new/xdg-utils-20160520/scripts/xdg-mime.in
--- old/xdg-utils-20151219/scripts/xdg-mime.in  2016-01-22 15:12:24.000000000 
+0100
+++ new/xdg-utils-20160520/scripts/xdg-mime.in  2016-06-07 07:21:43.000000000 
+0200
@@ -238,10 +238,10 @@
 {
     # $1 is vendor-name.desktop
     # $2 is mime/type
-    # Add $2=$1 to XDG_DATA_HOME/applications/mimeapps.list
-    xdg_user_dir="$XDG_DATA_HOME"
-    [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
-    default_file="$xdg_user_dir/applications/mimeapps.list"
+    # Add $2=$1 to XDG_CONFIG_HOME/mimeapps.list
+    xdg_config_home="$XDG_CONFIG_HOME"
+    [ -n "$xdg_config_home" ] || xdg_config_home="$HOME/.config"
+    default_file="$xdg_config_home/mimeapps.list"
     DEBUG 2 "make_default_generic $1 $2"
     DEBUG 1 "Updating $default_file"
     [ -f "$default_file" ] || touch "$default_file"
@@ -370,7 +370,7 @@
             found=1
         }
     }
-' "$mimeapps_list")
+' "$mimeapps_list" | cut -d ';' -f 1)
             if [ -n "$result" ]; then
                 echo "$result"
                 exit_success
@@ -428,13 +428,9 @@
       case "${KDE_SESSION_VERSION}" in
         4)
           KTRADER=`which ktraderclient 2> /dev/null`
-          MIMETYPE="--mimetype"
-          SERVICETYPE="--servicetype"
         ;;
         5)
           KTRADER=`which ktraderclient${KDE_SESSION_VERSION} 2> /dev/null`
-          MIMETYPE="--mimetype"
-          SERVICETYPE="--servicetype"
         ;;
       esac
     else
@@ -442,8 +438,8 @@
     fi
     if [ -n "$KTRADER" ] ; then
         DEBUG 1 "Running KDE trader query \"$MIME\" mimetype and 
\"Application\" servicetype"
-        trader_result=`$KTRADER $MIMETYPE "$MIME" $SERVICETYPE Application 
2>/dev/null \
-            | grep DesktopEntryPath | head -n 1 | cut -d ':' -f 2 | cut -d \' 
-f 2`
+        trader_result=`$KTRADER --mimetype "$MIME" --servicetype Application 
2>/dev/null \
+            | grep -E "^DesktopEntryPath : |\.desktop$" | head -n1 | sed 
"s/^DesktopEntryPath : '\(.*\.desktop\)'\$/\1/"`
         if [ -n "$trader_result" ] ; then
             basename "$trader_result"
             exit_success
@@ -954,4 +950,3 @@
 update_mime_database $xdg_base_dir
 
 exit_success
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-utils-20151219/scripts/xdg-screensaver.in 
new/xdg-utils-20160520/scripts/xdg-screensaver.in
--- old/xdg-utils-20151219/scripts/xdg-screensaver.in   2016-01-22 
15:12:24.000000000 +0100
+++ new/xdg-utils-20160520/scripts/xdg-screensaver.in   2016-06-07 
07:21:43.000000000 +0200
@@ -102,6 +102,10 @@
       screensaver_mate_screensaver "$1"
       ;;
 
+    cinnamon)
+      screensaver_cinnamon_screensaver "$1"
+      ;;
+
     xscreensaver)
       screensaver_xscreensaver "$1"
       ;;
@@ -631,6 +635,88 @@
         fi
         ;;
 
+        *)
+        echo "ERROR: Unknown command '$1" >&2
+        return 1
+        ;;
+    esac
+}
+
+screensaver_cinnamon_screensaver()
+{
+# DBUS interface for cinnamon-screensaver
+# 
https://raw.githubusercontent.com/linuxmint/cinnamon-screensaver/master/doc/dbus-interface.html
+    case "$1" in
+        suspend)
+        screensaver_suspend_loop \
+        dbus-send --session \
+                  --dest=org.cinnamon.ScreenSaver \
+                  --type=method_call \
+                  /org/cinnamon/ScreenSaver \
+                  org.cinnamon.ScreenSaver.SimulateUserActivity \
+                  2> /dev/null
+        result=$?
+        ;;
+
+        resume)
+        # Automatic resume when $screensaver_file disappears
+        result=0
+        ;;
+
+        activate)
+        dbus-send --session \
+                  --dest=org.cinnamon.ScreenSaver \
+                  --type=method_call \
+                  /org/cinnamon/ScreenSaver \
+                  org.cinnamon.ScreenSaver.SetActive \
+                  boolean:true \
+                  2> /dev/null
+        result=$?
+        ;;
+
+        lock)
+        dbus-send --session \
+                  --dest=org.cinnamon.ScreenSaver \
+                  --type=method_call \
+                  /org/cinnamon/ScreenSaver \
+                  org.cinnamon.ScreenSaver.Lock \
+                  string:"" \
+                  2> /dev/null
+
+        result=$?
+        ;;
+
+        reset)
+        # Turns the screensaver off right now
+        dbus-send --session \
+                  --dest=org.cinnamon.ScreenSaver \
+                  --type=method_call \
+                  /org/cinnamon/ScreenSaver \
+                  org.cinnamon.ScreenSaver.SimulateUserActivity \
+                 2> /dev/null
+        result=$?
+        ;;
+
+        status)
+        status=`dbus-send --session \
+                          --dest=org.cinnamon.ScreenSaver \
+                          --type=method_call \
+                          --print-reply \
+                          --reply-timeout=2000 \
+                          /org/cinnamon/ScreenSaver \
+                          org.cinnamon.ScreenSaver.GetActive \
+                          | grep boolean | cut -d ' ' -f 5`
+        result=$?
+        if [ x"$status" = "xtrue" ]; then
+            echo "enabled"
+        elif [ x"$status" = "xfalse" ]; then
+            echo "disabled"
+        else
+            echo "ERROR: dbus org.cinnamon.ScreenSaver.GetActive returned 
'$status'" >&2
+            return 1
+        fi
+        ;;
+
         *)
         echo "ERROR: Unknown command '$1" >&2
         return 1


Reply via email to