Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package thunar for openSUSE:Factory checked 
in at 2026-02-10 21:13:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/thunar (Old)
 and      /work/SRC/openSUSE:Factory/.thunar.new.1670 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "thunar"

Tue Feb 10 21:13:35 2026 rev:114 rq:1332298 version:4.20.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/thunar/thunar.changes    2026-01-27 
16:13:02.975892265 +0100
+++ /work/SRC/openSUSE:Factory/.thunar.new.1670/thunar.changes  2026-02-10 
21:14:42.757320598 +0100
@@ -1,0 +2,15 @@
+Tue Feb 10 16:51:52 UTC 2026 - Manfred Hollstein <[email protected]>
+
+- Fix Patch numbering.
+
+-------------------------------------------------------------------
+Tue Feb 10 14:08:30 UTC 2026 - Franck Bui <[email protected]>
+
+- Update 0001-Detect-CDROM-media-changes-using-ID_FD_UUID-udev-pro.patch to
+  match the version merged by upstream.
+
+- Add 0002-Fix-media_fs_uuids-not-being-initialized-with-existi.patch to fix
+  media_fs_uuids hash table not being initialized with existing media at
+  startup.
+
+-------------------------------------------------------------------

New:
----
  0002-Fix-media_fs_uuids-not-being-initialized-with-existi.patch

----------(New B)----------
  New:
- Add 0002-Fix-media_fs_uuids-not-being-initialized-with-existi.patch to fix
  media_fs_uuids hash table not being initialized with existing media at
----------(New E)----------

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

Other differences:
------------------
++++++ thunar.spec ++++++
--- /var/tmp/diff_new_pack.1gAEcn/_old  2026-02-10 21:14:43.453349764 +0100
+++ /var/tmp/diff_new_pack.1gAEcn/_new  2026-02-10 21:14:43.457349931 +0100
@@ -1,7 +1,6 @@
 #
 # spec file for package thunar
 #
-# Copyright (c) 2026 SUSE LLC
 # Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
@@ -27,7 +26,8 @@
 URL:            https://docs.xfce.org/xfce/thunar/start
 Source:         
https://archive.xfce.org/src/xfce/thunar/4.20/%{name}-%{version}.tar.bz2
 Source100:      %{name}-rpmlintrc
-Patch:          0001-Detect-CDROM-media-changes-using-ID_FD_UUID-udev-pro.patch
+Patch01:        0001-Detect-CDROM-media-changes-using-ID_FD_UUID-udev-pro.patch
+Patch02:        0002-Fix-media_fs_uuids-not-being-initialized-with-existi.patch
 BuildRequires:  appstream-glib
 BuildRequires:  fdupes
 BuildRequires:  gettext >= 0.19.8

++++++ 0001-Detect-CDROM-media-changes-using-ID_FD_UUID-udev-pro.patch ++++++
--- /var/tmp/diff_new_pack.1gAEcn/_old  2026-02-10 21:14:43.505351943 +0100
+++ /var/tmp/diff_new_pack.1gAEcn/_new  2026-02-10 21:14:43.513352278 +0100
@@ -1,7 +1,7 @@
-From 08fd8e74ff93ddadab908d00135770c0a59861bb Mon Sep 17 00:00:00 2001
+From 1cf1b2caf8201d52cdcd2c38cc8217d54dd32807 Mon Sep 17 00:00:00 2001
 From: Franck Bui <[email protected]>
 Date: Mon, 26 Jan 2026 09:59:38 +0100
-Subject: [PATCH 1/1] Detect CDROM media changes using ID_FD_UUID udev property
+Subject: [PATCH 1/2] Detect CDROM media changes using ID_FD_UUID udev property
 
 Thunar currently interprets every "change" uevent from a CD-ROM device as
 indicating that the media has changed, even when the uevent carries no
@@ -28,18 +28,18 @@
 updated only on confirmed changes. If no media is present, the stored UUID is
 cleared.
 ---
- thunar/thunar-application.c | 40 ++++++++++++++++++++++++++++++-------
- 1 file changed, 33 insertions(+), 7 deletions(-)
+ thunar/thunar-application.c | 50 +++++++++++++++++++++++++++++++------
+ 1 file changed, 43 insertions(+), 7 deletions(-)
 
 diff --git a/thunar/thunar-application.c b/thunar/thunar-application.c
-index a8de3549..5398c3ec 100644
+index a8de3549..81ac5589 100644
 --- a/thunar/thunar-application.c
 +++ b/thunar/thunar-application.c
 @@ -247,6 +247,7 @@ struct _ThunarApplication
    GSList *volman_udis;
    guint   volman_idle_id;
    guint   volman_watch_id;
-+  gchar  *cdrom_media_fs_uuid;
++  GHashTable *media_fs_uuids;
  #endif
  
    GList                         *files_to_launch;
@@ -48,7 +48,7 @@
    g_signal_connect (application->udev_client, "uevent",
                      G_CALLBACK (thunar_application_uevent), application);
 +
-+  application->cdrom_media_fs_uuid = NULL;
++  application->media_fs_uuids = g_hash_table_new_full (g_str_hash, 
g_str_equal, g_free, g_free);
  #endif
  
    thunar_application_dbus_init (application);
@@ -57,45 +57,53 @@
    /* disconnect from the udev client */
    g_object_unref (application->udev_client);
 +
-+  g_free(application->cdrom_media_fs_uuid);
++  g_hash_table_destroy (application->media_fs_uuids);
  #endif
  
    /* drop any running "show dialogs" timer */
-@@ -1068,6 +1073,33 @@ thunar_application_launch (ThunarApplication     
*application,
+@@ -1068,6 +1073,41 @@ thunar_application_launch (ThunarApplication     
*application,
  
  
  #ifdef HAVE_GUDEV
-+static gboolean has_cdrom_media_changed(GUdevDevice       *device,
-+                                      ThunarApplication *application)
++static gboolean
++has_cdrom_media_changed (GUdevDevice       *device,
++                         ThunarApplication *application)
 +{
-+  const gchar *media_fs_uuid = NULL;
++  const gchar *media_fs_uuid;
++  const gchar *sysfs_path;
++  gchar       *old_fs_uuid;
 +
 +  /* check if the device is a CD drive */
 +  if (!g_udev_device_get_property_as_boolean (device, "ID_CDROM"))
-+        return FALSE;
++    return FALSE;
++
++  sysfs_path = g_udev_device_get_sysfs_path (device);
 +
 +  /* check if the CD drive has a media */
-+  if (!g_udev_device_get_property_as_boolean (device, "ID_CDROM_MEDIA")) {
-+        g_free(application->cdrom_media_fs_uuid);
-+        application->cdrom_media_fs_uuid = NULL;
-+        return FALSE;
-+  }
++  if (!g_udev_device_get_property_as_boolean (device, "ID_CDROM_MEDIA"))
++    {
++      g_hash_table_remove (application->media_fs_uuids, sysfs_path);
++      return FALSE;
++    }
 +
++  /* check if the media on this drive has changed */
 +  media_fs_uuid = g_udev_device_get_property (device, "ID_FS_UUID");
++  old_fs_uuid = g_hash_table_lookup (application->media_fs_uuids, sysfs_path);
 +
-+  if (g_strcmp0 (application->cdrom_media_fs_uuid, media_fs_uuid) == 0)
-+        return FALSE;
++  if (g_strcmp0 (old_fs_uuid, media_fs_uuid) == 0)
++    return FALSE;
 +
-+  g_free(application->cdrom_media_fs_uuid);
-+  application->cdrom_media_fs_uuid = g_strdup(media_fs_uuid);
++  g_hash_table_insert (application->media_fs_uuids, g_strdup (sysfs_path), 
g_strdup (media_fs_uuid));
 +
 +  return TRUE;
 +}
 +
++
++
  static void
  thunar_application_uevent (GUdevClient       *client,
                             const gchar       *action,
-@@ -1075,8 +1107,6 @@ thunar_application_uevent (GUdevClient       *client,
+@@ -1075,8 +1115,6 @@ thunar_application_uevent (GUdevClient       *client,
                             ThunarApplication *application)
  {
    const gchar *sysfs_path;
@@ -104,7 +112,7 @@
    GSList      *lp;
  
    _thunar_return_if_fail (G_UDEV_IS_CLIENT (client));
-@@ -1088,13 +1118,9 @@ thunar_application_uevent (GUdevClient       *client,
+@@ -1088,13 +1126,9 @@ thunar_application_uevent (GUdevClient       *client,
    /* determine the sysfs path of the device */
    sysfs_path = g_udev_device_get_sysfs_path (device);
  
@@ -115,10 +123,19 @@
    /* distinguish between "add", "change" and "remove" actions, ignore "move" 
*/
    if (g_strcmp0 (action, "add") == 0
 -      || (is_cdrom && has_media && g_strcmp0 (action, "change") == 0))
-+      || (has_cdrom_media_changed(device, application) && g_strcmp0 (action, 
"change") == 0))
++      || (has_cdrom_media_changed (device, application) && g_strcmp0 (action, 
"change") == 0))
      {
        /* only insert the path if we don't have it already */
        if (g_slist_find_custom (application->volman_udis, sysfs_path,
+@@ -1123,6 +1157,8 @@ thunar_application_uevent (GUdevClient       *client,
+ 
+       if (G_LIKELY (lp != NULL))
+         {
++          g_hash_table_remove (application->media_fs_uuids, sysfs_path);
++
+           /* free the sysfs path string */
+           g_free (lp->data);
+ 
 -- 
 2.51.0
 

++++++ 0002-Fix-media_fs_uuids-not-being-initialized-with-existi.patch ++++++
>From c52ed176e69f0ecbe5f795ce6bd38d0be0468dfe Mon Sep 17 00:00:00 2001
From: Franck Bui <[email protected]>
Date: Mon, 9 Feb 2026 18:59:27 +0100
Subject: [PATCH 2/2] Fix media_fs_uuids not being initialized with existing
 media at startup

The media_fs_uuids hash table introduced for CD/DVD media change detection has
a bug: it starts empty even when discs are already present in drives at startup.

When Thunar starts with a CD/DVD already inserted, the first "change" uevent
finds no entry in media_fs_uuids (returns NULL), causing
has_cdrom_media_changed() to incorrectly report the media as "changed" since
g_strcmp0(NULL, current_uuid) != 0.

This triggers unwanted auto-mount and volume manager actions for media that was
present all along, defeating the purpose of the change detection mechanism.

Fix by adding thunar_application_initialize_media_fs_uuids() to scan existing
CD/DVD drives at startup and populate the hash table with any media currently
present. Now the first uevent after startup correctly compares against the
actual initial state instead of an empty table.
---
 thunar/thunar-application.c | 49 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/thunar/thunar-application.c b/thunar/thunar-application.c
index 81ac5589..8ae24f3e 100644
--- a/thunar/thunar-application.c
+++ b/thunar/thunar-application.c
@@ -201,6 +201,8 @@ thunar_application_volman_watch (GPid     pid,
                                  gpointer user_data);
 static void
 thunar_application_volman_watch_destroy (gpointer user_data);
+static void
+thunar_application_initialize_media_fs_uuids (ThunarApplication *application);
 #endif
 static gboolean
 thunar_application_show_progress_dialog_timeout (gpointer user_data);
@@ -408,7 +410,8 @@ thunar_application_startup (GApplication *gapp)
   g_signal_connect (application->udev_client, "uevent",
                     G_CALLBACK (thunar_application_uevent), application);
 
-  application->media_fs_uuids = g_hash_table_new_full (g_str_hash, 
g_str_equal, g_free, g_free);
+  /* create and populate the hash table with currently present media */
+  thunar_application_initialize_media_fs_uuids (application);
 #endif
 
   thunar_application_dbus_init (application);
@@ -1170,6 +1173,50 @@ thunar_application_uevent (GUdevClient       *client,
 
 
 
+static void
+thunar_application_initialize_media_fs_uuids (ThunarApplication *application)
+{
+  GList       *devices;
+  GList       *lp;
+  GUdevDevice *device;
+  const gchar *sysfs_path;
+  const gchar *media_fs_uuid;
+
+  _thunar_return_if_fail (THUNAR_IS_APPLICATION (application));
+  _thunar_return_if_fail (G_UDEV_IS_CLIENT (application->udev_client));
+  _thunar_return_if_fail (application->media_fs_uuids == NULL);
+
+  application->media_fs_uuids = g_hash_table_new_full (g_str_hash, 
g_str_equal, g_free, g_free);
+
+  /* query all block devices from udev */
+  devices = g_udev_client_query_by_subsystem (application->udev_client, 
"block");
+
+  for (lp = devices; lp != NULL; lp = lp->next)
+    {
+      device = G_UDEV_DEVICE (lp->data);
+
+      /* check if this is a CD/DVD drive with media currently present */
+      if (g_udev_device_get_property_as_boolean (device, "ID_CDROM") &&
+          g_udev_device_get_property_as_boolean (device, "ID_CDROM_MEDIA"))
+        {
+          sysfs_path = g_udev_device_get_sysfs_path (device);
+          media_fs_uuid = g_udev_device_get_property (device, "ID_FS_UUID");
+
+          /* store the filesystem UUID for this device if it has one */
+          if (media_fs_uuid != NULL)
+            {
+              g_hash_table_insert (application->media_fs_uuids,
+                                   g_strdup (sysfs_path),
+                                   g_strdup (media_fs_uuid));
+            }
+        }
+    }
+
+  g_list_free_full (devices, g_object_unref);
+}
+
+
+
 static gboolean
 thunar_application_volman_idle (gpointer user_data)
 {
-- 
2.51.0

Reply via email to