diff options
Diffstat (limited to 'net-misc/warpinator')
-rw-r--r-- | net-misc/warpinator/Manifest | 2 | ||||
-rw-r--r-- | net-misc/warpinator/files/warpinator-dbus-fallback.patch | 69 | ||||
-rw-r--r-- | net-misc/warpinator/warpinator-1.8.3.ebuild (renamed from net-misc/warpinator/warpinator-1.7.0-r2.ebuild) | 3 |
3 files changed, 72 insertions, 2 deletions
diff --git a/net-misc/warpinator/Manifest b/net-misc/warpinator/Manifest index e23fe847..969e2214 100644 --- a/net-misc/warpinator/Manifest +++ b/net-misc/warpinator/Manifest @@ -1 +1 @@ -DIST warpinator-1.7.0.tar.gz 48138258 BLAKE2B 61009cbb71849831a8110b48de9e971ae59ae5cc573da658d6c8cd1deba11a23f0d5abaf05985e2699273e0c03dfe0cc19e69c4984935355370eeb4de0655484 SHA512 1fd43a6dc857253fb5c1f82b6f4fdf6a03ad38c18f679a628f7a97ed782779982abeb673c9163876f901e6e556d6309ce49502f07e72b7a1dcb6ef88e284b7fd +DIST warpinator-1.8.3.tar.gz 48156643 BLAKE2B 69020a866adb8b8da361cb7d2b6bf9a8b86913c1a1799078038d6340f18ed7eb490e0d920ddcf9c1f837cfe52c21156ec2fdadc3f24ce79ec416824672cb9943 SHA512 914194f02849c3a9169bc208cc4c50f287f93575a4bd25d8321a884036898a22d19063d6d5877e93241b2cf7ccb7c94ace685b27e915aa4b391a038e0e03e856 diff --git a/net-misc/warpinator/files/warpinator-dbus-fallback.patch b/net-misc/warpinator/files/warpinator-dbus-fallback.patch new file mode 100644 index 00000000..f4f4f094 --- /dev/null +++ b/net-misc/warpinator/files/warpinator-dbus-fallback.patch @@ -0,0 +1,69 @@ +diff -Nur a/src/util.py b/src/util.py +--- a/src/util.py 2024-01-04 17:03:52.000000000 +0000 ++++ b/src/util.py 2024-01-14 03:01:42.318649562 +0000 +@@ -304,7 +304,7 @@ + # file manager might answer, if more than one is installed: + # https://github.com/linuxmint/nemo/commit/c9cbba6a2f08be69bf02ffcaf9b0faf4a03ace8b + +- bus = Gio.Application.get_default().get_dbus_connection() ++ bus = Gio.Application.get_default().get_dbus_connection() # this is likely to fail + + if filename is not None: + method = "ShowItems" +@@ -316,30 +316,32 @@ + file = Gio.File.new_for_path(abs_path) + startup_id = str(os.getpid()) + +- try: +- bus.call_sync("org.freedesktop.FileManager1", +- "/org/freedesktop/FileManager1", +- "org.freedesktop.FileManager1", +- method, +- GLib.Variant("(ass)", +- ([file.get_uri()], startup_id)), +- None, +- Gio.DBusCallFlags.NONE, +- 1000, +- None) +- logging.debug("Opening save folder using dbus") +- return +- except GLib.Error as e: +- logging.debug("Could not use dbus interface to launch file manager: %s" % e.message) +- +- # If dbus doesn't work, use xdg mimetype handlers. +- app = Gio.AppInfo.get_default_for_type("inode/directory", True) +- +- try: +- logging.debug("Opening save folder using Gio (mimetype)") +- Gio.AppInfo.launch_default_for_uri(prefs.get_save_uri(), None) +- except GLib.Error as e: +- logging.critical("Could not open received files location: %s" % e.message) ++ if bus is not None: ++ try: ++ bus.call_sync("org.freedesktop.FileManager1", ++ "/org/freedesktop/FileManager1", ++ "org.freedesktop.FileManager1", ++ method, ++ GLib.Variant("(ass)", ++ ([file.get_uri()], startup_id)), ++ None, ++ Gio.DBusCallFlags.NONE, ++ 1000, ++ None) ++ logging.debug("Opening save folder using dbus") ++ return ++ except GLib.Error as e: ++ logging.debug("Could not use dbus interface to launch file manager: %s" % e.message) ++ ++ else: ++ # If dbus doesn't work, use xdg mimetype handlers. ++ app = Gio.AppInfo.get_default_for_type("inode/directory", True) ++ ++ try: ++ logging.debug("Opening save folder using Gio (mimetype)") ++ Gio.AppInfo.launch_default_for_uri(prefs.get_save_uri(), None) ++ except GLib.Error as e: ++ logging.critical("Could not open received files location: %s" % e.message) + + def verify_save_folder(): + # Forbidden locations for incoming files, relative to home. diff --git a/net-misc/warpinator/warpinator-1.7.0-r2.ebuild b/net-misc/warpinator/warpinator-1.8.3.ebuild index d84ecffa..23eeb6d6 100644 --- a/net-misc/warpinator/warpinator-1.7.0-r2.ebuild +++ b/net-misc/warpinator/warpinator-1.8.3.ebuild @@ -25,7 +25,7 @@ DEPEND=" " RDEPEND="${DEPEND}" BDEPEND=" - >=dev-util/meson-0.45.0 + >=dev-build/meson-0.45.0 " S="${WORKDIR}/${PN}-master.lmde6" @@ -33,6 +33,7 @@ S="${WORKDIR}/${PN}-master.lmde6" PATCHES=( "${FILESDIR}/${PN}-bundled-grpcio-cython3.patch" "${FILESDIR}/${PN}-system-paths.patch" + "${FILESDIR}/${PN}-dbus-fallback.patch" ) src_configure() { |