From owner-svn-soc-all@FreeBSD.ORG Sat Jul 6 01:34:44 2013 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8EAF5627 for ; Sat, 6 Jul 2013 01:34:44 +0000 (UTC) (envelope-from mattbw@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) by mx1.freebsd.org (Postfix) with ESMTP id 66AF91F09 for ; Sat, 6 Jul 2013 01:34:44 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.7/8.14.7) with ESMTP id r661YitP060242 for ; Sat, 6 Jul 2013 01:34:44 GMT (envelope-from mattbw@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.7/8.14.6/Submit) id r661YifN060232 for svn-soc-all@FreeBSD.org; Sat, 6 Jul 2013 01:34:44 GMT (envelope-from mattbw@FreeBSD.org) Date: Sat, 6 Jul 2013 01:34:44 GMT Message-Id: <201307060134.r661YifN060232@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: r254207 - in soc2013/mattbw: . backend 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: Sat, 06 Jul 2013 01:34:44 -0000 Author: mattbw Date: Sat Jul 6 01:34:44 2013 New Revision: 254207 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=254207 Log: added subdir makefile; fixed no-license problem. Modified: soc2013/mattbw/Makefile soc2013/mattbw/README soc2013/mattbw/backend/licenses.c Modified: soc2013/mattbw/Makefile ============================================================================== --- soc2013/mattbw/Makefile Sat Jul 6 01:07:57 2013 (r254206) +++ soc2013/mattbw/Makefile Sat Jul 6 01:34:44 2013 (r254207) @@ -1,12 +1,6 @@ -# To be BSD-ified later. +# $FreeBSD$ -PKGS= pkg packagekit-plugin -CC= clang -CFLAGS= `pkg-config --cflags $(PKGS)` -LIBS= `pkg-config --libs $(PKGS)` +SUBDIR= backend \ + tests/get-details-output -test: test.o - $(CC) $(LIBS) -o test test.o - -test.o: test.c - $(CC) $(CFLAGS) -c -o test.o test.c +.include Modified: soc2013/mattbw/README ============================================================================== --- soc2013/mattbw/README Sat Jul 6 01:07:57 2013 (r254206) +++ soc2013/mattbw/README Sat Jul 6 01:34:44 2013 (r254207) @@ -39,6 +39,9 @@ - Edit /usr/local/PackageKit/PackageKit.conf such that "DefaultBackend=pkgng" (or manually invoke packagekitd with backend=pkgng). +One can also use the Makefile in the root directory; this will build the +backend as well as any utilities and tests included with it. + -------------------------------------------------------------------------------- TESTING Modified: soc2013/mattbw/backend/licenses.c ============================================================================== --- soc2013/mattbw/backend/licenses.c Sat Jul 6 01:07:57 2013 (r254206) +++ soc2013/mattbw/backend/licenses.c Sat Jul 6 01:34:44 2013 (r254207) @@ -64,6 +64,12 @@ sbuf_cat(sb, logic_str); sbuf_cat(sb, pkg_license_name(lic)); } + /* Stop the following code from bombing if there was no license + * available. + */ + if (sbuf_len(sb) == 0) + sbuf_cat(sb, logic_str); + sb_err = sbuf_finish(sb); /* Make sure that we remove the initial logic string instance! */ license = (sb_err