socsvn commit: r254207 - in soc2013/mattbw: . backend

mattbw at FreeBSD.org mattbw at FreeBSD.org
Sat Jul 6 01:34:44 UTC 2013


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 <bsd.subdir.mk>

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


More information about the svn-soc-all mailing list