From owner-svn-soc-all@FreeBSD.ORG Thu Jul 25 10:01:20 2013 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B6F50444 for ; Thu, 25 Jul 2013 10:01:20 +0000 (UTC) (envelope-from mattbw@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A3CF02D12 for ; Thu, 25 Jul 2013 10:01:20 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6PA1KBw055675 for ; Thu, 25 Jul 2013 10:01:20 GMT (envelope-from mattbw@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.7/8.14.6/Submit) id r6PA1KLw055659 for svn-soc-all@FreeBSD.org; Thu, 25 Jul 2013 10:01:20 GMT (envelope-from mattbw@FreeBSD.org) Date: Thu, 25 Jul 2013 10:01:20 GMT Message-Id: <201307251001.r6PA1KLw055659@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to mattbw@FreeBSD.org using -f From: mattbw@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r255152 - in soc2013/mattbw/backend: . query MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jul 2013 10:01:20 -0000 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 +# +# 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; }