diff --git a/pressure-vessel/wrap.c b/pressure-vessel/wrap.c index 0f6be0e66cf791af963ea8f62d0353cda1edd498..bff5bf4b6b3a530d6e655af462ff2feacc0f1214 100644 --- a/pressure-vessel/wrap.c +++ b/pressure-vessel/wrap.c @@ -381,6 +381,9 @@ bind_and_propagate_from_environ (FlatpakExports *exports, canon = g_canonicalize_filename (values[i], NULL); value_host = pv_current_namespace_path_to_host_path (canon); + if (flatpak_has_path_prefix (canon, "/usr")) + g_warning_once ("Binding directories that are located under \"/usr/\" is not supported!"); + g_info ("Bind-mounting %s=\"%s%s%s\" from the current env as %s=\"%s%s%s\" in the host", variable, before, values[i], after, variable, before, value_host, after); @@ -2374,6 +2377,9 @@ main (int argc, g_assert (g_path_is_absolute (opt_filesystems[i])); g_info ("Bind-mounting \"%s\"", opt_filesystems[i]); + if (flatpak_has_path_prefix (opt_filesystems[i], "/usr")) + g_warning_once ("Binding directories that are located under \"/usr/\" " + "is not supported!"); flatpak_exports_add_path_expose (exports, FLATPAK_FILESYSTEM_MODE_READ_WRITE, opt_filesystems[i]); diff --git a/steam-runtime-tools/glib-backports-internal.h b/steam-runtime-tools/glib-backports-internal.h index 3cc2516f76830005f7fbe896375e6b5d686f2aa9..5f82fa3a00e81ea0c62bd656586a9b14b065f795 100644 --- a/steam-runtime-tools/glib-backports-internal.h +++ b/steam-runtime-tools/glib-backports-internal.h @@ -126,3 +126,25 @@ gchar *my_g_utf8_make_valid (const gchar *str, G_LOG_LEVEL_INFO, \ __VA_ARGS__) #endif + +#if !GLIB_CHECK_VERSION(2, 64, 0) +#if defined(G_HAVE_ISO_VARARGS) && (!defined(G_ANALYZER_ANALYZING) || !G_ANALYZER_ANALYZING) +#define g_warning_once(...) \ + G_STMT_START { \ + static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; /* (atomic) */ \ + if (g_atomic_int_compare_and_exchange (&G_PASTE (_GWarningOnceBoolean, __LINE__), \ + 0, 1)) \ + g_warning (__VA_ARGS__); \ + } G_STMT_END +#elif defined(G_HAVE_GNUC_VARARGS) && (!defined(G_ANALYZER_ANALYZING) || !G_ANALYZER_ANALYZING) +#define g_warning_once(format...) \ + G_STMT_START { \ + static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; /* (atomic) */ \ + if (g_atomic_int_compare_and_exchange (&G_PASTE (_GWarningOnceBoolean, __LINE__), \ + 0, 1)) \ + g_warning (format); \ + } G_STMT_END +#else +#define g_warning_once g_warning +#endif +#endif