[darwinbuild-changes] [565] trunk/darwinxref/plugins/resolveDeps.c

source_changes at macosforge.org source_changes at macosforge.org
Thu Sep 17 07:49:36 PDT 2009


Revision: 565
          http://trac.macosforge.org/projects/darwinbuild/changeset/565
Author:   wsiegrist at apple.com
Date:     2009-09-17 07:49:32 -0700 (Thu, 17 Sep 2009)
Log Message:
-----------
When committing, use properties table when resolving dependencies so we process all projects, not just projects with unresolved dependencies. Limit query to "project IF NOT NULL" since properties table can have null project values for build-wide properties.

Modified Paths:
--------------
    trunk/darwinxref/plugins/resolveDeps.c

Modified: trunk/darwinxref/plugins/resolveDeps.c
===================================================================
--- trunk/darwinxref/plugins/resolveDeps.c	2009-09-17 01:53:16 UTC (rev 564)
+++ trunk/darwinxref/plugins/resolveDeps.c	2009-09-17 14:49:32 UTC (rev 565)
@@ -187,14 +187,17 @@
 	int resolvedCount = 0, unresolvedCount = 0;
 	CFMutableArrayRef params[2] = { builds, projects };
 
+	// if committing, use all projects, otherwise use unresolved projects
+	char *table = ( commit ? "properties" : "unresolved_dependencies" );
+
 	//
 	// If no project, version specified, resolve everything.
 	// Otherwise, resolve only that project or version.
 	//
 	if (project == NULL) {
-		SQL_CALLBACK(&addToCStrArrays, params, "SELECT DISTINCT build,project FROM unresolved_dependencies");
+		SQL_CALLBACK(&addToCStrArrays, params, "SELECT DISTINCT build,project FROM %Q WHERE project IS NOT NULL", table);
 	} else {
-		SQL_CALLBACK(&addToCStrArrays, params, "SELECT DISTINCT build,project FROM unresolved_dependencies WHERE project=%Q", project);
+		SQL_CALLBACK(&addToCStrArrays, params, "SELECT DISTINCT build,project FROM %Q WHERE project=%Q", table, project);
 	}
 	CFIndex i, count = CFArrayGetCount(projects);
 	for (i = 0; i < count; ++i) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20090917/8e944afd/attachment.html>


More information about the darwinbuild-changes mailing list