[gnome-software: 6/18] gs-utils: Drop support for reading cache from /usr/share/gnome-software




commit 1f2165be669ac7dae5f3409be6f0d14325e3afe9
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Mar 4 22:25:42 2021 +0000

    gs-utils: Drop support for reading cache from /usr/share/gnome-software
    
    `/usr/share` is not for cache data. It’s for read-only
    architecture-independent data.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1147

 lib/gs-utils.c | 15 ---------------
 1 file changed, 15 deletions(-)
---
diff --git a/lib/gs-utils.c b/lib/gs-utils.c
index 1c8a3056d..4528ee5d4 100644
--- a/lib/gs-utils.c
+++ b/lib/gs-utils.c
@@ -185,21 +185,6 @@ gs_utils_get_cache_filename (const gchar *kind,
                }
        }
 
-       /* not writable, so try the system cache first */
-       if (!(flags & GS_UTILS_CACHE_FLAG_WRITEABLE)) {
-               g_autofree gchar *cachefn = NULL;
-               cachefn = g_build_filename (DATADIR,
-                                           "gnome-software",
-                                           "cache",
-                                           kind,
-                                           basename,
-                                           NULL);
-               if (g_file_test (cachefn, G_FILE_TEST_EXISTS)) {
-                       g_ptr_array_add (candidates,
-                                        g_steal_pointer (&cachefn));
-               }
-       }
-
        /* create the cachedir in a per-release location, creating
         * if it does not already exist */
        cachedir = g_build_filename (g_get_user_cache_dir (),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]