socsvn commit: r254912 - in soc2013/mattbw/backend: . actions
mattbw at FreeBSD.org
mattbw at FreeBSD.org
Thu Jul 18 09:20:52 UTC 2013
Author: mattbw
Date: Thu Jul 18 09:20:51 2013
New Revision: 254912
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=254912
Log:
add stub for refresh_cache
Added:
soc2013/mattbw/backend/actions/refresh_cache.c
Modified:
soc2013/mattbw/backend/Makefile
soc2013/mattbw/backend/actions.h
soc2013/mattbw/backend/pk-backend-pkgng.c
Modified: soc2013/mattbw/backend/Makefile
==============================================================================
--- soc2013/mattbw/backend/Makefile Thu Jul 18 07:43:55 2013 (r254911)
+++ soc2013/mattbw/backend/Makefile Thu Jul 18 09:20:51 2013 (r254912)
@@ -18,6 +18,7 @@
actions/get_repo_list.c \
actions/install_files.c \
actions/install_packages.c \
+ actions/refresh_cache.c \
actions/remove_packages.c \
actions/resolve.c \
actions/search_groups.c \
Modified: soc2013/mattbw/backend/actions.h
==============================================================================
--- soc2013/mattbw/backend/actions.h Thu Jul 18 07:43:55 2013 (r254911)
+++ soc2013/mattbw/backend/actions.h Thu Jul 18 09:20:51 2013 (r254912)
@@ -33,8 +33,9 @@
gboolean get_repo_list_thread(PkBackend *backend);
gboolean install_files_thread(PkBackend *backend);
gboolean install_packages_thread(PkBackend *backend);
-gboolean resolve_thread(PkBackend *backend);
+gboolean refresh_cache_thread(PkBackend *backend);
gboolean remove_packages_thread(PkBackend *backend);
+gboolean resolve_thread(PkBackend *backend);
gboolean search_groups_thread(PkBackend *backend);
gboolean search_names_thread(PkBackend *backend);
gboolean simulate_install_files_thread(PkBackend *backend);
Added: soc2013/mattbw/backend/actions/refresh_cache.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2013/mattbw/backend/actions/refresh_cache.c Thu Jul 18 09:20:51 2013 (r254912)
@@ -0,0 +1,42 @@
+/*-
+ * Copyright (C) 2013 Matt Windsor <mattbw at FreeBSD.org>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <glib.h> /* gboolean */
+#include <stdbool.h> /* bool, true, false */
+#include "../pk-backend.h" /* pk..., Pk... */
+#include "pkg.h" /* pkg... */
+
+#include "../actions.h" /* refresh_cache_thread prototype */
+#include "../pkgutils.h" /* pkgutils_... */
+#include "../query.h" /* query_... */
+
+/*
+ * The thread that performs a RefreshCache operation. Should be invoked
+ * by the pk_backend_refresh_cache hook.
+ */
+gboolean
+refresh_cache_thread(PkBackend *backend)
+{
+ bool success;
+
+ success = false;
+ pk_backend_finished(backend);
+ return success ? TRUE : FALSE;
+}
Modified: soc2013/mattbw/backend/pk-backend-pkgng.c
==============================================================================
--- soc2013/mattbw/backend/pk-backend-pkgng.c Thu Jul 18 07:43:55 2013 (r254911)
+++ soc2013/mattbw/backend/pk-backend-pkgng.c Thu Jul 18 09:20:51 2013 (r254912)
@@ -166,6 +166,14 @@
}
void
+pk_backend_refresh_cache(PkBackend *backend, gboolean force)
+{
+
+ INTENTIONALLY_IGNORE(force); /* not yet supported */
+ THREAD(backend, refresh_cache_thread);
+}
+
+void
pk_backend_remove_packages(PkBackend *backend, gchar **package_ids,
gboolean allow_deps, gboolean autoremove)
{
More information about the svn-soc-all
mailing list