[totem-pl-parser/wip/hadess/fix-ci] ci: Fix problems accessing gvfs
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser/wip/hadess/fix-ci] ci: Fix problems accessing gvfs
- Date: Thu, 28 Jan 2021 14:02:15 +0000 (UTC)
commit 2f0eef59dd8ecafe357bb3349164f20557804baf
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jan 28 11:26:53 2021 +0100
ci: Fix problems accessing gvfs
.gitlab-ci.yml | 11 ++++++++---
plparse/totem-pl-parser.c | 30 ++++++++++++++++++++++++++----
2 files changed, 34 insertions(+), 7 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 73146aa..286a39d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,5 @@
variables:
- DEPENDENCIES: redhat-rpm-config meson git gettext gtk-doc meson glib2-devel libxml2-devel
gobject-introspection-devel libgcrypt-devel libarchive-devel
+ DEPENDENCIES: redhat-rpm-config meson git gettext gtk-doc meson glib2-devel libxml2-devel
gobject-introspection-devel libgcrypt-devel libarchive-devel shared-mime-info
DEPS_QUVI: libquvi-devel
DEPS_ABI_CHECK: libabigail libsoup-devel gmime-devel
TEST_DEPS: gvfs dbus-daemon
@@ -12,14 +12,19 @@ build-fedora:
- dnf -y update && dnf install -y $DEPENDENCIES
script:
- meson _build
+ - ninja -C _build
- dnf install -y $TEST_DEPS
- - GIO_USE_VOLUME_MONITOR=unix dbus-run-session ninja -C _build test
+ # gio info https://www.gnome.org
+ # gio: https://www.gnome.org: Operation not supported
+ - dbus-run-session gio info https://www.gnome.org
+ - dbus-run-session ninja -C _build test
- ninja -C _build install
# And now with quvi support
- rm -rf _build
- dnf install -y $DEPS_QUVI
- meson _build
- - GIO_USE_VOLUME_MONITOR=unix dbus-run-session ninja -C _build test
+ - ninja -C _build
+ - dbus-run-session ninja -C _build test
- ninja -C _build install
# ABI check
- dnf install -y $DEPS_ABI_CHECK
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c
index c1b0600..ed7a010 100644
--- a/plparse/totem-pl-parser.c
+++ b/plparse/totem-pl-parser.c
@@ -999,22 +999,28 @@ is_probably_dir (const char *filename)
gboolean ret;
char *content_type, *short_name;
+ g_debug ("filename: %s", filename);
short_name = relative_uri_remove_query (filename, NULL);
if (short_name == NULL)
short_name = g_strdup (filename);
+ g_debug ("short_name: %s", short_name);
content_type = g_content_type_guess (short_name, NULL, 0, NULL);
+ g_debug ("content_type: %s", content_type);
if (g_content_type_is_unknown (content_type) != FALSE) {
guint i;
for (i = 0; i < G_N_ELEMENTS (suffixes); i++) {
if (g_str_has_suffix (short_name, suffixes[i]) != FALSE) {
g_free (content_type);
g_free (short_name);
+ g_debug ("has suffix %s = FALSE", suffixes[i]);
return FALSE;
}
}
+ g_debug ("doesn't have dodgy content type");
ret = TRUE;
} else {
ret = FALSE;
+ g_debug ("is known content type");
}
g_free (content_type);
g_free (short_name);
@@ -1030,35 +1036,47 @@ totem_pl_parser_resolve_uri (GFile *base_gfile,
GFile *base_parent_gfile, *resolved_gfile;
if (relative_uri == NULL) {
+ g_debug ("No relative URI, returning URI from base_gfile");
if (base_gfile == NULL)
return NULL;
return g_file_get_uri (base_gfile);
}
- if (base_gfile == NULL)
+ if (base_gfile == NULL) {
+ g_debug ("No base_gfile, returning relative URI %s", relative_uri);
return g_strdup (relative_uri);
+ }
/* If |relative_uri| has a scheme, it's a full URI, just return it */
scheme = g_uri_parse_scheme (relative_uri);
if (scheme != NULL) {
+ g_debug ("Relative URI %s is a full URI, returning that", relative_uri);
g_free (scheme);
return g_strdup (relative_uri);
}
/* Check whether we need to get the parent for the base or not */
base_uri = g_file_get_path (base_gfile);
- if (base_uri == NULL)
+ g_debug ("Got a base_uri from path? %s", base_uri ? base_uri : "(none)");
+ if (base_uri == NULL) {
base_uri = g_file_get_uri (base_gfile);
- if (is_probably_dir (base_uri) == FALSE)
+ g_debug ("Got a base uri in the end: %s", base_uri);
+ }
+ if (is_probably_dir (base_uri) == FALSE) {
+ g_debug ("Is probably dir %s = FALSE", base_uri);
base_parent_gfile = g_file_get_parent (base_gfile);
- else
+ } else {
+ g_debug ("Is probably dir %s = TRUE", base_uri);
base_parent_gfile = g_object_ref (base_gfile);
+ }
g_free (base_uri);
+ g_debug ("Base parent GFile: %s", base_parent_gfile ? g_file_get_uri (base_parent_gfile) : "");
if (base_parent_gfile == NULL) {
resolved_gfile = g_file_resolve_relative_path (base_gfile, relative_uri);
uri = g_file_get_uri (resolved_gfile);
g_object_unref (resolved_gfile);
+ g_debug ("base_parent_gfile is NULL, returning %s", uri);
return uri;
}
@@ -1085,6 +1103,8 @@ totem_pl_parser_resolve_uri (GFile *base_gfile,
g_object_unref (resolved_gfile);
uri = g_strdup_printf ("%s%s", tmpuri, query);
+ g_debug ("new_relative_uri: %s", uri);
+
g_free (tmpuri);
g_free (new_relative_uri);
g_free (query);
@@ -1103,6 +1123,8 @@ totem_pl_parser_resolve_uri (GFile *base_gfile,
uri = g_file_get_uri (resolved_gfile);
g_object_unref (resolved_gfile);
+ g_debug ("not new_relative_uri: %s", uri);
+
return uri;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]