gplugin/gplugin

4c9f60803079
flow: Merged '0.27' to ('default').
--- a/CMakeLists.txt Thu Mar 03 22:12:01 2016 -0600
+++ b/CMakeLists.txt Mon Apr 18 22:32:13 2016 -0500
@@ -25,7 +25,7 @@
project(gplugin C)
set(GPLUGIN_MAJOR_VERSION 0)
-set(GPLUGIN_MINOR_VERSION 26)
+set(GPLUGIN_MINOR_VERSION 27)
set(GPLUGIN_MICRO_VERSION 0)
set(GPLUGIN_EXTRA_VERSION)
@@ -106,7 +106,7 @@
include(help2man)
endif(BUILD_HELP2MAN)
-pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32.0 gobject-2.0)
+pkg_check_modules(GLIB REQUIRED glib-2.0>=2.34.0 gobject-2.0)
# we separate gmodule out so our test aren't linked to it
pkg_check_modules(GMODULE REQUIRED gmodule-2.0)
@@ -145,6 +145,7 @@
add_definitions(
-std=c99
-g -g3
+ -O2
-DPREFIX="${CMAKE_INSTALL_PREFIX}"
-DLIBDIR="${CMAKE_INSTALL_LIBDIR}"
-DGPLUGIN_WEBSITE="http://bitbucket.org/gplugin/main"
--- a/ChangeLog Thu Mar 03 22:12:01 2016 -0600
+++ b/ChangeLog Mon Apr 18 22:32:13 2016 -0500
@@ -1,3 +1,7 @@
+0.27.0: 2016/04/18
+ * Bumped the glib requirement to 2.34.0
+ * Fix some error reporting with the native loader
+
0.26.0: 2016/03/03
* Added a load-failed signal which is emitted when a plugin fails to load
* Removed pre glib 2.32.0 code
--- a/gplugin/gplugin-native-loader.c Thu Mar 03 22:12:01 2016 -0600
+++ b/gplugin/gplugin-native-loader.c Mon Apr 18 22:32:13 2016 -0500
@@ -132,7 +132,7 @@
if(module)
g_module_close(module);
- if(error) {
+ if(error && !*error) {
*error = g_error_new(GPLUGIN_DOMAIN, 0,
_("the query function did not return a "
"GPluginPluginInfo instance"));
@@ -151,7 +151,7 @@
if(!GPLUGIN_IS_PLUGIN_INFO(info)) {
g_module_close(module);
- if(error) {
+ if(error && !*error) {
*error = g_error_new(GPLUGIN_DOMAIN, 0,
_("the query function did not return a "
"GPluginPluginInfo instance"));
--- a/gplugin/tests/CMakeLists.txt Thu Mar 03 22:12:01 2016 -0600
+++ b/gplugin/tests/CMakeLists.txt Mon Apr 18 22:32:13 2016 -0500
@@ -31,6 +31,7 @@
add_subdirectory(load-on-query-fail)
add_subdirectory(versioned-dependencies)
add_subdirectory(bind-local)
+add_subdirectory(unresolved-symbol)
###############################################################################
# Tests
@@ -116,6 +117,15 @@
add_dependencies(test-bind-local bind-local)
add_definitions(-DTEST_BIND_LOCAL_DIR="${CMAKE_CURRENT_BINARY_DIR}/bind-local/")
+#######################################
+# Unresolved Symbol
+#######################################
+add_gtest(test-unresolved-symbol)
+add_dependencies(test-unresolved-symbol unresolved-symbol)
+add_definitions(
+ -DPLUGIN_DIR="${CMAKE_CURRENT_BINARY_DIR}/unresolved-symbol"
+)
+
###############################################################################
# GTester Stuff
###############################################################################
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/test-unresolved-symbol.c Mon Apr 18 22:32:13 2016 -0500
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2011-2016 Gary Kramlich <grim@reaperworld.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdlib.h>
+
+#include <gplugin.h>
+#include <gplugin-native.h>
+
+#include <glib.h>
+
+/******************************************************************************
+ * Tests
+ *****************************************************************************/
+
+static void
+test_unresolved_symbol(void) {
+ g_test_expect_message(
+ G_LOG_DOMAIN,
+ G_LOG_LEVEL_WARNING,
+ "*undefined symbol: some_unresolved_symbol"
+ );
+
+ gplugin_manager_remove_paths();
+ gplugin_manager_append_path(PLUGIN_DIR);
+ gplugin_manager_refresh();
+
+ g_test_assert_expected_messages();
+}
+
+/******************************************************************************
+ * Main
+ *****************************************************************************/
+gint
+main(gint argc, gchar **argv) {
+
+ g_test_init(&argc, &argv, NULL);
+
+ gplugin_init();
+
+ /* test the load on query flag */
+ g_test_add_func("/loaders/native/unresolved-symbol",
+ test_unresolved_symbol);
+
+ return g_test_run();
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/unresolved-symbol/CMakeLists.txt Mon Apr 18 22:32:13 2016 -0500
@@ -0,0 +1,1 @@
+add_test_plugin(unresolved-symbol)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/unresolved-symbol/unresolved-symbol.c Mon Apr 18 22:32:13 2016 -0500
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2011-2016 Gary Kramlich <grim@reaperworld.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gplugin.h>
+#include <gplugin-native.h>
+
+G_MODULE_EXPORT GPluginPluginInfo *
+gplugin_query(GPLUGIN_UNUSED GError **error) {
+ some_unresolved_symbol();
+
+ return NULL;
+}
+
+G_MODULE_EXPORT gboolean
+gplugin_load(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
+ GPLUGIN_UNUSED GError **error)
+{
+ return TRUE;
+}
+
+G_MODULE_EXPORT gboolean
+gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
+ GPLUGIN_UNUSED GError **error)
+{
+ return TRUE;
+}
+
--- a/packaging/debian/changelog Thu Mar 03 22:12:01 2016 -0600
+++ b/packaging/debian/changelog Mon Apr 18 22:32:13 2016 -0500
@@ -1,8 +1,14 @@
+gplugin (0.27) unstable; urgency=medium
+
+ * New upstream release, see official changelog
+
+ -- Gary Kramlich <grim@reaperworld.com> Mon, 18 Apr 2016 22:31:45 -0500
+
gplugin (0.26) unstable; urgency=medium
* New upstream release, see official changelog
- -- Gary Kramlich <grim@reaperworld.com> Thu, 03 Mar 2016 22:09:12 -0600
+ -- Gary Kramlich <grim@reaperworld.com> Mon, 18 Apr 2016 22:31:30 -0500
gplugin (0.25) unstable; urgency=medium