[darwinbuild] -logdeps option
Shantonu Sen
ssen at opendarwin.org
Sun Jul 10 14:03:10 PDT 2005
Cool, no rush.
I was mostly curious about creating build aliases myself for
system_cmds so that I wouldn't need to drag in the world (i.e.
DirectoryServices.framework) into a chroot to do builds. It's
possible I'd need the entire populated database of
"unresolved_dependencies", delete system_cmds, rebuild my versions of
system_cmds_arch and system_cmds_other, and then call "resolveDeps".
Is it even desirable to break apart deps like that (and diverge from
the Apple makefiles?). Is that a conversation appropriate to this
list, or should it be taken to hackers@?
Shantonu
On Jul 10, 2005, at 1:18 PM, Kevin Van Vechten wrote:
> Yes, your patch to resolveDeps.c looks correct. I admit I haven't
> really tested loadDeps and resolveDeps since the Darwin 8.0.1 release.
>
> "dependencies" was a parallel to "unresolved_dependencies",
> however, now all project properties, including dependencies, are
> stored in the "properties" table.
>
> "dependencies" is now a dictionary, with the keys "lib", "header",
> "build", each of which is an array of project names.
>
> Apparently I still have some work to do to make the dependencies
> modules use the new layout.
>
> - Kevin
>
> On Jul 9, 2005, at 11:40 PM, Shantonu Sen wrote:
>
>
>> 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