"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "common/flatpak-dir.c" between
flatpak-1.9.1.tar.xz and flatpak-1.9.2.tar.xz

About: Flatpak is a Linux application sandboxing and distribution framework. Pre-release.

flatpak-dir.c  (flatpak-1.9.1.tar.xz):flatpak-dir.c  (flatpak-1.9.2.tar.xz)
skipping to change at line 70 skipping to change at line 70
#ifdef HAVE_LIBMALCONTENT #ifdef HAVE_LIBMALCONTENT
#include <libmalcontent/malcontent.h> #include <libmalcontent/malcontent.h>
#include "flatpak-parental-controls-private.h" #include "flatpak-parental-controls-private.h"
#endif #endif
#ifdef HAVE_LIBSYSTEMD #ifdef HAVE_LIBSYSTEMD
#define SD_JOURNAL_SUPPRESS_LOCATION #define SD_JOURNAL_SUPPRESS_LOCATION
#include <systemd/sd-journal.h> #include <systemd/sd-journal.h>
#endif #endif
#define OSTREE_COMMIT_TIMESTAMP "ostree.commit.timestamp"
#define NO_SYSTEM_HELPER ((FlatpakSystemHelper *) (gpointer) 1) #define NO_SYSTEM_HELPER ((FlatpakSystemHelper *) (gpointer) 1)
#define SUMMARY_CACHE_TIMEOUT_SEC (60 * 5) #define SUMMARY_CACHE_TIMEOUT_SEC (60 * 5)
#define FILTER_MTIME_CHECK_TIMEOUT_MSEC 500 #define FILTER_MTIME_CHECK_TIMEOUT_MSEC 500
#define SYSCONF_INSTALLATIONS_DIR "installations.d" #define SYSCONF_INSTALLATIONS_DIR "installations.d"
#define SYSCONF_INSTALLATIONS_FILE_EXT ".conf" #define SYSCONF_INSTALLATIONS_FILE_EXT ".conf"
#define SYSCONF_REMOTES_DIR "remotes.d" #define SYSCONF_REMOTES_DIR "remotes.d"
#define SYSCONF_REMOTES_FILE_EXT ".flatpakrepo" #define SYSCONF_REMOTES_FILE_EXT ".flatpakrepo"
skipping to change at line 14309 skipping to change at line 14307
flatpak_dir_update_remote_configuration (FlatpakDir *self, flatpak_dir_update_remote_configuration (FlatpakDir *self,
const char *remote, const char *remote,
FlatpakRemoteState *optional_remote_sta te, FlatpakRemoteState *optional_remote_sta te,
gboolean *updated_out, gboolean *updated_out,
GCancellable *cancellable, GCancellable *cancellable,
GError **error) GError **error)
{ {
gboolean is_oci; gboolean is_oci;
g_autoptr(FlatpakRemoteState) local_state = NULL; g_autoptr(FlatpakRemoteState) local_state = NULL;
FlatpakRemoteState *state; FlatpakRemoteState *state;
gboolean has_changed = FALSE;
/* Initialize if we exit early */ /* Initialize if we exit early */
if (updated_out) if (updated_out)
*updated_out = FALSE; *updated_out = FALSE;
if (flatpak_dir_get_remote_disabled (self, remote)) if (flatpak_dir_get_remote_disabled (self, remote))
return TRUE; return TRUE;
is_oci = flatpak_dir_get_remote_oci (self, remote); is_oci = flatpak_dir_get_remote_oci (self, remote);
if (is_oci) if (is_oci)
skipping to change at line 14333 skipping to change at line 14332
else else
{ {
local_state = flatpak_dir_get_remote_state (self, remote, FALSE, cancellab le, error); local_state = flatpak_dir_get_remote_state (self, remote, FALSE, cancellab le, error);
if (local_state == NULL) if (local_state == NULL)
return FALSE; return FALSE;
state = local_state; state = local_state;
} }
if (flatpak_dir_use_system_helper (self, NULL)) if (flatpak_dir_use_system_helper (self, NULL))
{ {
gboolean has_changed = FALSE;
gboolean gpg_verify_summary; gboolean gpg_verify_summary;
gboolean gpg_verify; gboolean gpg_verify;
if (!ostree_repo_remote_get_gpg_verify_summary (self->repo, remote, &gpg_v erify_summary, error)) if (!ostree_repo_remote_get_gpg_verify_summary (self->repo, remote, &gpg_v erify_summary, error))
return FALSE; return FALSE;
if (!ostree_repo_remote_get_gpg_verify (self->repo, remote, &gpg_verify, e rror)) if (!ostree_repo_remote_get_gpg_verify (self->repo, remote, &gpg_verify, e rror))
return FALSE; return FALSE;
if (!gpg_verify_summary || !gpg_verify) if (!gpg_verify_summary || !gpg_verify)
skipping to change at line 14403 skipping to change at line 14401
cancellable, error) ) cancellable, error) )
return FALSE; return FALSE;
unlink (summary_path); unlink (summary_path);
if (summary_sig_path) if (summary_sig_path)
unlink (summary_sig_path); unlink (summary_sig_path);
if (!flatpak_dir_remote_clear_cached_summary (self, remote, cancellabl e, error)) if (!flatpak_dir_remote_clear_cached_summary (self, remote, cancellabl e, error))
return FALSE; return FALSE;
if (updated_out)
*updated_out = TRUE;
} }
if (updated_out)
*updated_out = has_changed;
return TRUE; return TRUE;
} }
if (!flatpak_dir_update_remote_configuration_for_state (self, state, FALSE, up dated_out, cancellable, error)) if (!flatpak_dir_update_remote_configuration_for_state (self, state, FALSE, &h as_changed, cancellable, error))
return FALSE; return FALSE;
if (!flatpak_dir_remote_clear_cached_summary (self, remote, cancellable, error if (has_changed &&
)) !flatpak_dir_remote_clear_cached_summary (self, remote, cancellable, error
))
return FALSE; return FALSE;
if (updated_out)
*updated_out = has_changed;
return TRUE; return TRUE;
} }
void void
flatpak_related_free (FlatpakRelated *self) flatpak_related_free (FlatpakRelated *self)
{ {
flatpak_decomposed_unref (self->ref); flatpak_decomposed_unref (self->ref);
g_free (self->commit); g_free (self->commit);
g_strfreev (self->subpaths); g_strfreev (self->subpaths);
g_free (self); g_free (self);
skipping to change at line 15813 skipping to change at line 15816
return NULL; return NULL;
/* If @self is a system installation, also check the per-user installation /* If @self is a system installation, also check the per-user installation
* for any apps there using runtimes in the system installation or runtimes * for any apps there using runtimes in the system installation or runtimes
* there with sdks or extensions in the system installation. Only do so if * there with sdks or extensions in the system installation. Only do so if
* the per-user installation exists; it wouldn't make sense to create it here * the per-user installation exists; it wouldn't make sense to create it here
* if not. * if not.
*/ */
if (!flatpak_dir_is_user (self)) if (!flatpak_dir_is_user (self))
{ {
g_autoptr(GFile) user_base_dir = flatpak_get_user_base_dir_location (); g_autoptr(FlatpakDir) user_dir = flatpak_dir_get_user ();
if (g_file_query_exists (user_base_dir, cancellable)) g_autoptr(GError) local_error = NULL;
{
g_autoptr(FlatpakDir) user_dir = flatpak_dir_get_user ();
if (!find_used_refs (self, user_dir, arch, metadata_injection, exclude if (!find_used_refs (self, user_dir, arch, metadata_injection, excluded_re
d_refs_ht, fs_ht,
used_refs, cancellable, error)) used_refs, cancellable, &local_error))
return NULL; {
/* We may get permission denied if the process is sandboxed with
* systemd's ProtectHome=
*/
if (!g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND) &
&
!g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_PERMISSION_D
ENIED))
{
g_propagate_error (error, g_steal_pointer (&local_error));
return NULL;
}
} }
} }
runtime_refs = flatpak_dir_list_refs (self, FLATPAK_KINDS_RUNTIME, cancellable , error); runtime_refs = flatpak_dir_list_refs (self, FLATPAK_KINDS_RUNTIME, cancellable , error);
if (runtime_refs == NULL) if (runtime_refs == NULL)
return NULL; return NULL;
refs = g_ptr_array_new_with_free_func (g_free); refs = g_ptr_array_new_with_free_func (g_free);
for (int i = 0; i < runtime_refs->len; i++) for (int i = 0; i < runtime_refs->len; i++)
 End of changes. 10 change blocks. 
16 lines changed or deleted 28 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)