[darwinbuild-changes] [167] trunk/darwinbuild/darwinbuild.common
source_changes at macosforge.org
source_changes at macosforge.org
Wed Oct 4 01:53:18 PDT 2006
Revision: 167
http://trac.macosforge.org/projects/darwinbuild/changeset/167
Author: ssen
Date: 2006-10-04 01:53:18 -0700 (Wed, 04 Oct 2006)
Log Message:
-----------
When extracting prebuilt roots, register the contents
of the tarball in the database so that after the build
is finished you can do "resolveDeps" and probably get
all the dependencies!
We do this for header roots too on the assumption that
a full build of the dependency might be done later,
and this is a first approximation.
For self-built roots in Roots/, if there wasn't already
a receipt present (for example if you nuked rm -rf BuildRoot/)
we register the contents but don't write out a receipt,
because the root probably has a receipt already.
This is kind of a mess. Need to rethink receipt management
Modified Paths:
--------------
trunk/darwinbuild/darwinbuild.common
Modified: trunk/darwinbuild/darwinbuild.common
===================================================================
--- trunk/darwinbuild/darwinbuild.common 2005-08-09 15:25:32 UTC (rev 166)
+++ trunk/darwinbuild/darwinbuild.common 2006-10-04 08:53:18 UTC (rev 167)
@@ -139,6 +139,7 @@
if [ "$SRCDIR" -nt "$receipts/$X" ]; then
echo "Copying $X ..."
ditto $SRCDIR $BuildRoot
+ "$DARWINXREF" register "$X" "$SRCDIR" > /dev/null
touch "$receipts/$X"
elif [ ! -f "$receipts/$X" ]; then
# install a pre-built root, using the depsbuilds array, in preference order
@@ -151,6 +152,13 @@
cd "$BuildRoot"
tar xzf $CACHEDIR/Roots/$dbuild/$X.root.tar.gz
if [ "$?" == "0" ]; then
+ MANIFEST="$receipts/$X"
+ tar tzf $CACHEDIR/Roots/$dbuild/$X.root.tar.gz | \
+ "$DARWINXREF" register -stdin "$X" "$BuildRoot" \
+ > "$MANIFEST"
+ SHA1=$(cat "$MANIFEST" | openssl dgst -sha1)
+ mv -f "$MANIFEST" "$receipts/$SHA1"
+ ln -s "$SHA1" "$MANIFEST"
touch "$receipts/$X"
break
fi
@@ -199,6 +207,13 @@
cd "$BuildRoot"
tar xzf $CACHEDIR/Headers/$dbuild/$X.hdrs.tar.gz
if [ "$?" == "0" ]; then
+ MANIFEST="$receipts/$X"
+ tar tzf $CACHEDIR/Headers/$dbuild/$X.hdrs.tar.gz | \
+ "$DARWINXREF" register -stdin "$X" "$BuildRoot" \
+ > "$MANIFEST"
+ SHA1=$(cat "$MANIFEST" | openssl dgst -sha1)
+ mv -f "$MANIFEST" "$receipts/$SHA1"
+ ln -s "$SHA1" "$MANIFEST"
touch "$receipts/$X.hdrs"
break
fi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20061004/821ad3d5/attachment.html
More information about the darwinbuild-changes
mailing list