| The xref database by DarwinBuild is roughly the equivalent to a package manager database on other systems. This page is intended to describe what is in the xref database, and how to use it. xref.db file formatThe file xref.db is located in the .build directory of your DarwinBuild working directory (the one that contains BuildRoot, among other things). It is a mysql3 database file, which makes it convenient to open end edit using mysql3 (which comes with Leopard):
sqlite3 .build/xref.db
You can now use sqlite SQL commands. However, you should limit yourself to read operations.
darwinxrefdarwinxref is the command line client for the xref database that comes with DarwinBuild. It abstracts from the actual sqlite3 commands.
For example, to get a list of all the files contained in your BuildRoot and which projects they belong to, do:
darwinxref exportFiles > darwinxref.exportFiles.txt
This is handy to keep around.
darwinxref binary_sitesThis command shows the URL(s) from which binary roots are tried to be downloaded. For example:
darwinxref binary_sites
http://src.macosforge.org/Roots/9A581/
Since each individual project can specify additional binary_sites, you can also pass the name of a certain project to it:
darwinxref binary_sites xnu
http://src.macosforge.org/Roots/9A581/
http://some.more.specific.to.xnu
darwinxref source_sitesThis command shows the URL(s) from which source packages are tried to be downloaded. For example:
darwinxref source_sites
http://src.macosforge.org/Projects/
Since each individual project can specify additional binary_sites, you can also pass the name of a certain project to it as in the binary_sites example.
darwinxref patchfilesShows patchfiles that will be applied to a project, if any. For Example:
sh-3.2# darwinxref patchfiles xnu
(more text to be written) darwinxref dependenciesShows build-time or run-time dependencies of a given project, For example: sh-3.2# darwinxref dependencies -build boot shows a (recursive) list of build-time dependencies of the boot project. (more text to be written) darwinxref plug-insdarwinxref functionality can be extended by plug-ins. See descrip.txt for the currently available ones.
Contents of xref.dbThe xref database contains the following tables, with the following fields:
To be continued Would it make sense to base a package manager on xref.db, darwinup and some package format like xar?
|
The goal of this project is to make Darwin more usable by providing an installation ISO, documentation, and add-on software. You are welcome to join #puredarwin on irc.freenode.net if you would like to join PureDarwin development and to add to this site.