Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jul 2013 10:01:20 GMT
From:      mattbw@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r255152 - in soc2013/mattbw/backend: . query
Message-ID:  <201307251001.r6PA1KLw055659@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mattbw
Date: Thu Jul 25 10:01:20 2013
New Revision: 255152
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=255152

Log:
  (untested) quick runoff of UpdatePackages as a copypaste of InstallPackages

Modified:
  soc2013/mattbw/backend/Makefile
  soc2013/mattbw/backend/actions.h
  soc2013/mattbw/backend/pk-backend-pkgng.c
  soc2013/mattbw/backend/query/jobs.c

Modified: soc2013/mattbw/backend/Makefile
==============================================================================
--- soc2013/mattbw/backend/Makefile	Thu Jul 25 09:30:00 2013	(r255151)
+++ soc2013/mattbw/backend/Makefile	Thu Jul 25 10:01:20 2013	(r255152)
@@ -1,3 +1,22 @@
+#-
+# Copyright (C) 2013 Matt Windsor <mattbw@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.
+
 # $FreeBSD$
 
 LIB=		pk_backend_pkgng
@@ -24,7 +43,8 @@
 		actions/resolve.c		\
 		actions/search_files.c		\
 		actions/search_groups.c		\
-		actions/search_names.c
+		actions/search_names.c		\
+		actions/update_packages.c
 
 SRCS+=						\
 		query/core.c			\

Modified: soc2013/mattbw/backend/actions.h
==============================================================================
--- soc2013/mattbw/backend/actions.h	Thu Jul 25 09:30:00 2013	(r255151)
+++ soc2013/mattbw/backend/actions.h	Thu Jul 25 10:01:20 2013	(r255152)
@@ -43,5 +43,7 @@
 gboolean	simulate_install_files_thread(PkBackend *backend);
 gboolean	simulate_install_packages_thread(PkBackend *backend);
 gboolean	simulate_remove_packages_thread(PkBackend *backend);
+gboolean	simulate_update_packages_thread(PkBackend *backend);
+gboolean	update_packages_thread(PkBackend *backend);
 
 #endif				/* !_PKGNG_BACKEND_ACTIONS_H_ */

Modified: soc2013/mattbw/backend/pk-backend-pkgng.c
==============================================================================
--- soc2013/mattbw/backend/pk-backend-pkgng.c	Thu Jul 25 09:30:00 2013	(r255151)
+++ soc2013/mattbw/backend/pk-backend-pkgng.c	Thu Jul 25 10:01:20 2013	(r255152)
@@ -255,6 +255,7 @@
 {
 
 	INTENTIONALLY_IGNORE(package_ids);	/* retrieved from backend */
+	assert(backend != NULL);
 	THREAD(backend, simulate_install_packages_thread);
 }
 
@@ -265,5 +266,26 @@
 
 	INTENTIONALLY_IGNORE(package_ids);	/* retrieved from backend */
 	INTENTIONALLY_IGNORE(autoremove);	/* not yet supported */
+	assert(backend != NULL);
 	THREAD(backend, simulate_remove_packages_thread);
 }
+
+void
+pk_backend_simulate_update_packages(PkBackend *backend, gchar **package_ids)
+{
+
+	INTENTIONALLY_IGNORE(package_ids);	/* retrieved from backend */
+	assert(backend != NULL);
+	THREAD(backend, simulate_update_packages_thread);
+}
+
+void
+pk_backend_update_packages(PkBackend *backend, gboolean only_trusted,
+    gchar **package_ids)
+{
+
+	INTENTIONALLY_IGNORE(only_trusted);	/* not yet supported */
+	INTENTIONALLY_IGNORE(package_ids);	/* retrieved from backend */
+	assert(backend != NULL);
+	THREAD(backend, update_packages_thread);
+}

Modified: soc2013/mattbw/backend/query/jobs.c
==============================================================================
--- soc2013/mattbw/backend/query/jobs.c	Thu Jul 25 09:30:00 2013	(r255151)
+++ soc2013/mattbw/backend/query/jobs.c	Thu Jul 25 10:01:20 2013	(r255152)
@@ -155,6 +155,7 @@
 		pkgutils_emit(pkg, backend, info(pkg));
 	}
 
+	pkg_jobs_free(jobs);
 	query_set_percentage(q, 100);
 	return true;    	
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307251001.r6PA1KLw055659>