[darwinbuild-changes] [92] trunk/darwinbuild/darwinbuild

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 4 01:44:40 PDT 2006


Revision: 92
          http://trac.macosforge.org/projects/darwinbuild/changeset/92
Author:   kevin
Date:     2006-10-04 01:44:40 -0700 (Wed, 04 Oct 2006)

Log Message:
-----------
- use perl to more accurately parse receipts contents

Modified Paths:
--------------
    trunk/darwinbuild/darwinbuild

Modified: trunk/darwinbuild/darwinbuild
===================================================================
--- trunk/darwinbuild/darwinbuild	2005-07-25 21:19:02 UTC (rev 91)
+++ trunk/darwinbuild/darwinbuild	2006-10-04 08:44:40 UTC (rev 92)
@@ -555,13 +555,25 @@
 done
 IFS="$OLDIFS"
 
-### 46 was derived from Tiger ls(1) output.
 cat <<-EOF >> $SCRIPT
 	echo '++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
 	echo 'Installed Roots:'
-	ls -l "/usr/local/darwinbuild/receipts" | cut -c 46- | sort
 EOF
-
+# I didn't really want to use perl(1) here, but ls(1) doesn't support this.
+# For now, execute this outside the chroot so we don't require perl to be
+# installed in there.  This should probably be re-written as a C tool
+# that can be installed into the chroot.
+# Uses tail +3 to avoid getting . and ..
+RECEIPTS=$DARWIN_BUILDROOT/BuildRoot/usr/local/darwinbuild/receipts
+perl -e "opendir(DIR,\"$RECEIPTS\");
+	@files = sort(readdir(DIR));
+	foreach my \$x (@files) {
+		print \"echo \\\"\$x\";
+		if ( -l \"$RECEIPTS/\$x\" ) {
+			print ' -> ' . readlink(\"$RECEIPTS/\$x\");
+		} 
+		print \"\\\"\n\";
+	} closedir(DIR);" | tail +3 >> $SCRIPT
 cat <<-EOF >> $SCRIPT
 	echo '++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
 	echo $buildtool $action '$build_string' < /dev/null

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20061004/ba0fb0a4/attachment-0001.html


More information about the darwinbuild-changes mailing list