[darwinbuild] -logdeps option
Shantonu Sen
ssen at opendarwin.org
Sat Jul 9 23:40:47 PDT 2005
When I try -logdeps:
# /usr/local/bin/darwinbuild -build=8A428 -logdeps -nochroot file_cmds
...
/usr/share/man/man8/mtree.8
/usr/share/man/man8/rmt.8
file_cmds - 79 files registered.
loaded 213 unresolved dependencies.
usage: darwinxref [-f db] [-b build] resolveDeps [<project>]
# /usr/local/bin/darwinxref -b 8A428 resolveDeps file_cmds
usage: darwinxref [-f db] [-b build] resolveDeps [<project>]
#
Maybe the following is in order?
Index: plugins/resolveDeps.c
===================================================================
RCS file: /Volumes/src/cvs/od/proj/darwinbuild/darwinxref/plugins/
resolveDeps.c,v
retrieving revision 1.2
diff -u -p -u -r1.2 resolveDeps.c
--- plugins/resolveDeps.c 17 Jun 2005 23:49:44 -0000 1.2
+++ plugins/resolveDeps.c 10 Jul 2005 06:37:58 -0000
@@ -39,7 +39,7 @@ int resolve_dependencies(const char* bui
static int run(CFArrayRef argv) {
int res = 0;
CFIndex count = CFArrayGetCount(argv);
- if (count >= 1) return -1;
+ if (count > 1) return -1;
char* project = (count == 1) ? strdup_cfstr
(CFArrayGetValueAtIndex(argv, 0)) : NULL;
char* build = strdup_cfstr(DBGetCurrentBuild());
resolve_dependencies(build, project);
However, once I do this:
# /usr/local/bin/darwinxref -b 8A428 resolveDeps file_cmds
file_cmds (8A428)
Error: no such table: dependencies (1)
SQL: SELECT 1 FROM dependencies WHERE build='8A428' AND
project='file_cmds' AND type='build' AND dependency='file_cmds'
Error: no such table: dependencies (1)
SQL: INSERT INTO dependencies (build,project,type,dependency)
VALUES ('8A428','file_cmds','build','file_cmds')
file_cmds (build)
Error: no such table: dependencies (1)
...
My database looks like this:
# sqlite3 .xref.db .schema
CREATE TABLE files (build text, project text, path text);
CREATE TABLE properties (build TEXT, project TEXT, property TEXT, key
TEXT, value TEXT);
CREATE TABLE unresolved_dependencies (build text, project text, type
text, dependency);
CREATE INDEX files_index ON files (build, project, path);
CREATE INDEX properties_index ON properties (build, project,
property, key, value);
CREATE INDEX unresolved_dependencies_index ON unresolved_dependencies
(build, project, type, dependency);
Is "dependencies" just the obvious parallel to
"unresolved_dependencies"? Should this be created by loadIndex, or
maybe just resolveDeps?
Shantonu
More information about the darwinbuild-dev
mailing list