[darwinbuild-changes] [502] trunk
source_changes at macosforge.org
source_changes at macosforge.org
Thu Mar 26 13:24:24 PDT 2009
Revision: 502
http://trac.macosforge.org/projects/darwinbuild/changeset/502
Author: wsiegrist at apple.com
Date: 2009-03-26 13:24:24 -0700 (Thu, 26 Mar 2009)
Log Message:
-----------
Merging PR-6722857
Modified Paths:
--------------
trunk/darwinup/Depot.cpp
trunk/darwinup/Utils.cpp
trunk/darwinup/main.cpp
Added Paths:
-----------
trunk/testing/
trunk/testing/darwinup/
trunk/testing/darwinup/dest.tar.gz
trunk/testing/darwinup/root.tar.gz
trunk/testing/darwinup/root2.tar.gz
trunk/testing/darwinup/root3.tar.gz
trunk/testing/darwinup/run-tests.sh
Removed Paths:
-------------
trunk/testing/darwinup/
trunk/testing/darwinup/dest.tar.gz
trunk/testing/darwinup/root.tar.gz
trunk/testing/darwinup/root2.tar.gz
trunk/testing/darwinup/root3.tar.gz
trunk/testing/darwinup/run-tests.sh
Property Changed:
----------------
trunk/
trunk/darwinbuild/darwinbuild.in
trunk/darwinbuild/darwinmaster.sh.in
trunk/darwinbuild/installXcode.in
trunk/darwinbuild/packageRoots.sh.in
trunk/darwinbuild/thinPackages.sh.in
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/PR-4841388:399-419
/branches/PR-6358021:442-443
/branches/PR-6392966:423-427
/branches/PR-6398060:433-434
/branches/PR-6493844:460-461
/branches/PR-6497694:466-468,471
/branches/PR-6688645:479-490
/trunk:432-434
+ /branches/PR-4841388:399-419
/branches/PR-6358021:442-443
/branches/PR-6392966:423-427
/branches/PR-6398060:433-434
/branches/PR-6493844:460-461
/branches/PR-6497694:466-468,471
/branches/PR-6688645:479-490
/branches/PR-6722857:495-499
/trunk:432-434
Property changes on: trunk/darwinbuild/darwinbuild.in
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/PR-4841388/darwinbuild/darwinbuild:399-419
/branches/PR-6358021/darwinbuild/darwinbuild:442-443
/branches/PR-6392966/darwinbuild/darwinbuild:423-427
/branches/PR-6398060/darwinbuild/darwinbuild:433-434
/branches/PR-6493844/darwinbuild/darwinbuild.in:460-461
/branches/PR-6497694/darwinbuild/darwinbuild.in:466-468,471
/branches/PR-6688645/darwinbuild/darwinbuild.in:479-490
/trunk/darwinbuild/darwinbuild:432-434
+ /branches/PR-4841388/darwinbuild/darwinbuild:399-419
/branches/PR-6358021/darwinbuild/darwinbuild:442-443
/branches/PR-6392966/darwinbuild/darwinbuild:423-427
/branches/PR-6398060/darwinbuild/darwinbuild:433-434
/branches/PR-6493844/darwinbuild/darwinbuild.in:460-461
/branches/PR-6497694/darwinbuild/darwinbuild.in:466-468,471
/branches/PR-6688645/darwinbuild/darwinbuild.in:479-490
/branches/PR-6722857/darwinbuild/darwinbuild.in:495-499
/trunk/darwinbuild/darwinbuild:432-434
Property changes on: trunk/darwinbuild/darwinmaster.sh.in
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/PR-4841388/darwinbuild/darwinmaster.sh:399-419
/branches/PR-6358021/darwinbuild/darwinmaster.sh:442-443
/branches/PR-6392966/darwinbuild/darwinmaster.sh:423-427
/branches/PR-6398060/darwinbuild/darwinmaster.sh:433-434
/branches/PR-6493844/darwinbuild/darwinmaster.sh.in:460-461
/branches/PR-6497694/darwinbuild/darwinmaster.sh.in:466-468,471
/branches/PR-6688645/darwinbuild/darwinmaster.sh.in:479-490
/trunk/darwinbuild/darwinmaster.sh:432-434
+ /branches/PR-4841388/darwinbuild/darwinmaster.sh:399-419
/branches/PR-6358021/darwinbuild/darwinmaster.sh:442-443
/branches/PR-6392966/darwinbuild/darwinmaster.sh:423-427
/branches/PR-6398060/darwinbuild/darwinmaster.sh:433-434
/branches/PR-6493844/darwinbuild/darwinmaster.sh.in:460-461
/branches/PR-6497694/darwinbuild/darwinmaster.sh.in:466-468,471
/branches/PR-6688645/darwinbuild/darwinmaster.sh.in:479-490
/branches/PR-6722857/darwinbuild/darwinmaster.sh.in:495-499
/trunk/darwinbuild/darwinmaster.sh:432-434
Property changes on: trunk/darwinbuild/installXcode.in
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/PR-4841388/darwinbuild/installXcode:399-419
/branches/PR-6358021/darwinbuild/installXcode:442-443
/branches/PR-6392966/darwinbuild/installXcode:423-427
/branches/PR-6398060/darwinbuild/installXcode:433-434
/branches/PR-6493844/darwinbuild/installXcode.in:460-461
/branches/PR-6497694/darwinbuild/installXcode.in:466-468,471
/branches/PR-6688645/darwinbuild/installXcode.in:479-490
/trunk/darwinbuild/installXcode:432-434
+ /branches/PR-4841388/darwinbuild/installXcode:399-419
/branches/PR-6358021/darwinbuild/installXcode:442-443
/branches/PR-6392966/darwinbuild/installXcode:423-427
/branches/PR-6398060/darwinbuild/installXcode:433-434
/branches/PR-6493844/darwinbuild/installXcode.in:460-461
/branches/PR-6497694/darwinbuild/installXcode.in:466-468,471
/branches/PR-6688645/darwinbuild/installXcode.in:479-490
/branches/PR-6722857/darwinbuild/installXcode.in:495-499
/trunk/darwinbuild/installXcode:432-434
Property changes on: trunk/darwinbuild/packageRoots.sh.in
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/PR-4841388/darwinbuild/packageRoots.sh:399-419
/branches/PR-6358021/darwinbuild/packageRoots.sh:442-443
/branches/PR-6392966/darwinbuild/packageRoots.sh:423-427
/branches/PR-6398060/darwinbuild/packageRoots.sh:433-434
/branches/PR-6493844/darwinbuild/packageRoots.sh.in:460-461
/branches/PR-6497694/darwinbuild/packageRoots.sh.in:466-468,471
/branches/PR-6688645/darwinbuild/packageRoots.sh.in:479-490
/trunk/darwinbuild/packageRoots.sh:432-434
+ /branches/PR-4841388/darwinbuild/packageRoots.sh:399-419
/branches/PR-6358021/darwinbuild/packageRoots.sh:442-443
/branches/PR-6392966/darwinbuild/packageRoots.sh:423-427
/branches/PR-6398060/darwinbuild/packageRoots.sh:433-434
/branches/PR-6493844/darwinbuild/packageRoots.sh.in:460-461
/branches/PR-6497694/darwinbuild/packageRoots.sh.in:466-468,471
/branches/PR-6688645/darwinbuild/packageRoots.sh.in:479-490
/branches/PR-6722857/darwinbuild/packageRoots.sh.in:495-499
/trunk/darwinbuild/packageRoots.sh:432-434
Property changes on: trunk/darwinbuild/thinPackages.sh.in
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/PR-4841388/darwinbuild/thinPackages.sh:399-419
/branches/PR-6358021/darwinbuild/thinPackages.sh:442-443
/branches/PR-6392966/darwinbuild/thinPackages.sh:423-427
/branches/PR-6398060/darwinbuild/thinPackages.sh:433-434
/branches/PR-6493844/darwinbuild/thinPackages.sh.in:460-461
/branches/PR-6497694/darwinbuild/thinPackages.sh.in:466-468,471
/branches/PR-6688645/darwinbuild/thinPackages.sh.in:479-490
/trunk/darwinbuild/thinPackages.sh:432-434
+ /branches/PR-4841388/darwinbuild/thinPackages.sh:399-419
/branches/PR-6358021/darwinbuild/thinPackages.sh:442-443
/branches/PR-6392966/darwinbuild/thinPackages.sh:423-427
/branches/PR-6398060/darwinbuild/thinPackages.sh:433-434
/branches/PR-6493844/darwinbuild/thinPackages.sh.in:460-461
/branches/PR-6497694/darwinbuild/thinPackages.sh.in:466-468,471
/branches/PR-6688645/darwinbuild/thinPackages.sh.in:479-490
/branches/PR-6722857/darwinbuild/thinPackages.sh.in:495-499
/trunk/darwinbuild/thinPackages.sh:432-434
Modified: trunk/darwinup/Depot.cpp
===================================================================
--- trunk/darwinup/Depot.cpp 2009-03-26 20:24:05 UTC (rev 501)
+++ trunk/darwinup/Depot.cpp 2009-03-26 20:24:24 UTC (rev 502)
@@ -360,18 +360,9 @@
char path[PATH_MAX];
char* backup_dirpath;
- // we need the path minus our destination path for moving to the archive
- char *relpath = strstr(actual->path(), m_prefix);
- if (relpath) {
- // advance to just past the destination path
- relpath += strlen(m_prefix);
- }
+ // we need the path minus our destination prefix for moving to the archive
+ strlcpy(path, actual->path() + strlen(m_prefix) - 1, sizeof(path));
- size_t len = strlcpy(path, (relpath ? relpath : actual->path()),
- sizeof(path));
- assert(len <= sizeof(path));
-
-
const char* dir = dirname(path);
assert(dir != NULL);
@@ -444,21 +435,35 @@
InstallContext* context = (InstallContext*)ctx;
int res = 0;
+ IF_DEBUG("[DEBUG] backup_file: %s , %s \n", file->path(), context->archive->m_name);
+
if (INFO_TEST(file->info(), FILE_INFO_ROLLBACK_DATA)) {
- char *dstpath, *relpath, *uuidpath;
+ char *path; // the file's path
+ char *dstpath; // the path inside the archives
+ char *relpath; // the file's path minus the destination prefix
+ char *uuidpath; // archives path plus the uuid
char uuidstr[37];
+
// we need the path minus our destination path for moving to the archive
- relpath = strstr(file->path(), context->depot->m_prefix);
- if (relpath) {
- // advance to just past the destination path
- relpath += strlen(context->depot->m_prefix);
- }
+ size_t prefixlen = strlen(context->depot->m_prefix);
+ if (strncmp(context->archive->m_name, "<Rollback>", strlen("<Rollback>")) == 0) {
+ join_path(&path, context->depot->m_prefix, file->path());
+ } else {
+ asprintf(&path, "%s", file->path());
+ }
+ relpath = path;
+ if (strncmp(path, context->depot->m_prefix, prefixlen) == 0) {
+ relpath += prefixlen - 1;
+ }
+
uuid_unparse_upper(context->archive->uuid(), uuidstr);
asprintf(&uuidpath, "%s/%s", context->depot->m_archives_path, uuidstr);
assert(uuidpath != NULL);
- join_path(&dstpath, uuidpath, (relpath ? relpath : file->path()));
+ join_path(&dstpath, uuidpath, relpath);
assert(dstpath != NULL);
+ IF_DEBUG("[DEBUG] \npath = %s \nrelpath = %s \ndstpath = %s \nuuidpath = %s \n[/DEBUG]\n", path, relpath, dstpath, uuidpath);
+
++context->files_modified;
// XXX: res = file->backup()
@@ -478,20 +483,21 @@
"/usr/lib/libgcc_s"};
size_t numfiles = sizeof(tarfiles)/sizeof(*tarfiles);
for (i = 0; i < numfiles; i++) {
- if (strncmp(tarfiles[i], file->path(), strlen(tarfiles[i])) == 0) {
+ if (strncmp(tarfiles[i], relpath, strlen(tarfiles[i])) == 0) {
docopy = true;
break;
}
}
if (docopy) {
- IF_DEBUG("[backup] copyfile(%s, %s)\n", file->path(), dstpath);
- res = copyfile(file->path(), dstpath, NULL, COPYFILE_ALL);
+ IF_DEBUG("[backup] copyfile(%s, %s)\n", path, dstpath);
+ res = copyfile(path, dstpath, NULL, COPYFILE_ALL);
} else {
- IF_DEBUG("[backup] rename(%s, %s)\n", file->path(), dstpath);
- res = rename(file->path(), dstpath);
+ IF_DEBUG("[backup] rename(%s, %s)\n", path, dstpath);
+ res = rename(path, dstpath);
}
if (res != 0) fprintf(stderr, "%s:%d: backup failed: %s: %s (%d)\n", __FILE__, __LINE__, dstpath, strerror(errno), errno);
+ free(path);
free(dstpath);
free(uuidpath);
}
@@ -1067,6 +1073,16 @@
int Depot::insert(Archive* archive, File* file) {
int res = 0;
+
+ // check for the destination prefix in file's path, remove if found
+ char *path, *relpath;
+ size_t prefixlen = strlen(this->prefix());
+ asprintf(&path, "%s", file->path());
+ relpath = path;
+ if (strncmp(file->path(), this->prefix(), prefixlen) == 0) {
+ relpath += prefixlen - 1;
+ }
+
static sqlite3_stmt* stmt = NULL;
if (stmt == NULL && m_db) {
const char* query = "INSERT INTO files (archive, info, mode, uid, gid, digest, path) VALUES (?, ?, ?, ?, ?, ?, ?)";
@@ -1083,7 +1099,7 @@
Digest* dig = file->digest();
if (res == 0 && dig) res = sqlite3_bind_blob(stmt, i++, dig->data(), dig->size(), SQLITE_STATIC);
else if (res == 0) res = sqlite3_bind_blob(stmt, i++, NULL, 0, SQLITE_STATIC);
- if (res == 0) res = sqlite3_bind_text(stmt, i++, file->path(), -1, SQLITE_STATIC);
+ if (res == 0) res = sqlite3_bind_text(stmt, i++, relpath, -1, SQLITE_STATIC);
if (res == 0) res = sqlite3_step(stmt);
if (res == SQLITE_DONE) {
file->m_serial = (uint64_t)sqlite3_last_insert_rowid(m_db);
@@ -1093,6 +1109,7 @@
}
sqlite3_reset(stmt);
}
+ free(path);
return res;
}
Modified: trunk/darwinup/Utils.cpp
===================================================================
--- trunk/darwinup/Utils.cpp 2009-03-26 20:24:05 UTC (rev 501)
+++ trunk/darwinup/Utils.cpp 2009-03-26 20:24:24 UTC (rev 502)
@@ -60,7 +60,7 @@
if (res != 0 && errno == ENOENT) {
char tmp[PATH_MAX];
- strncpy(tmp, path, PATH_MAX);
+ strlcpy(tmp, path, PATH_MAX);
char* slash = strrchr(tmp, '/');
if (slash) { *slash = 0; }
res = mkdir_p(tmp);
Modified: trunk/darwinup/main.cpp
===================================================================
--- trunk/darwinup/main.cpp 2009-03-26 20:24:05 UTC (rev 501)
+++ trunk/darwinup/main.cpp 2009-03-26 20:24:24 UTC (rev 502)
@@ -54,8 +54,7 @@
int main(int argc, char* argv[]) {
char* progname = strdup(basename(argv[0]));
- char* path;
- int custom_path = 0;
+ char* path = NULL;
int ch;
while ((ch = getopt(argc, argv, "p:v")) != -1) {
@@ -69,8 +68,7 @@
fprintf(stderr, "Error: -p option value is too long \n");
exit(3);
}
- path = optarg;
- custom_path = 1;
+ join_path(&path, optarg, "/");
break;
case '?':
default:
@@ -82,7 +80,7 @@
int res = 0;
- if (!custom_path) {
+ if (!path) {
asprintf(&path, "/");
}
Depot* depot = new Depot(path);
@@ -151,9 +149,8 @@
} else {
usage(progname);
}
- if (!custom_path) {
- free(path);
- }
+
+ free(path);
exit(res);
return res;
}
Deleted: trunk/testing/darwinup/dest.tar.gz
===================================================================
(Binary files differ)
Copied: trunk/testing/darwinup/dest.tar.gz (from rev 499, branches/PR-6722857/testing/darwinup/dest.tar.gz)
===================================================================
(Binary files differ)
Deleted: trunk/testing/darwinup/root.tar.gz
===================================================================
(Binary files differ)
Copied: trunk/testing/darwinup/root.tar.gz (from rev 499, branches/PR-6722857/testing/darwinup/root.tar.gz)
===================================================================
(Binary files differ)
Deleted: trunk/testing/darwinup/root2.tar.gz
===================================================================
(Binary files differ)
Copied: trunk/testing/darwinup/root2.tar.gz (from rev 499, branches/PR-6722857/testing/darwinup/root2.tar.gz)
===================================================================
(Binary files differ)
Deleted: trunk/testing/darwinup/root3.tar.gz
===================================================================
(Binary files differ)
Copied: trunk/testing/darwinup/root3.tar.gz (from rev 499, branches/PR-6722857/testing/darwinup/root3.tar.gz)
===================================================================
(Binary files differ)
Deleted: trunk/testing/darwinup/run-tests.sh
===================================================================
--- branches/PR-6722857/testing/darwinup/run-tests.sh 2009-03-26 20:14:22 UTC (rev 499)
+++ trunk/testing/darwinup/run-tests.sh 2009-03-26 20:24:24 UTC (rev 502)
@@ -1,113 +0,0 @@
-#!/bin/bash
-
-#
-# Run tests on darwinup
-#
-
-PREFIX=/tmp/testing/darwinup
-ORIG=$PREFIX/orig
-DEST=$PREFIX/dest
-DESTTAR=dest.tar.gz
-
-ROOTS="root root2 root3"
-
-echo "INFO: Cleaning up testing area ..."
-rm -rf $PREFIX
-mkdir -p $PREFIX
-
-echo "INFO: Untarring the test files ..."
-tar zxvf $DESTTAR -C $PREFIX
-
-for R in $ROOTS;
-do
- tar zxvf $R.tar.gz -C $PREFIX
-done;
-
-mkdir -p $ORIG
-cp -R $DEST/* $ORIG/
-
-echo "TEST: Trying roots one at a time ..."
-for R in $ROOTS;
-do
- echo "INFO: Installing $R ...";
- darwinup -vv -p $DEST install $PREFIX/$R
- if [ $? -gt 0 ]; then exit 1; fi
- UUID=$(darwinup -p $DEST list | head -3 | tail -1 | awk '{print $1}')
- echo "INFO: Uninstalling $R ...";
- darwinup -vv -p $DEST uninstall $UUID
- if [ $? -gt 0 ]; then exit 1; fi
- echo "DIFF: diffing original test files to dest (should be no diffs) ..."
- diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
-done
-
-echo "TEST: Trying all roots at once, uninstall in reverse ...";
-for R in $ROOTS;
-do
- echo "INFO: Installing $R ...";
- darwinup -vv -p $DEST install $PREFIX/$R
- if [ $? -gt 0 ]; then exit 1; fi
-done
-for R in $ROOTS;
-do
- UUID=$(darwinup -p $DEST list | head -3 | tail -1 | awk '{print $1}')
- echo "INFO: Uninstalling $UUID ...";
- darwinup -vv -p $DEST uninstall $UUID
- if [ $? -gt 0 ]; then exit 1; fi
-done
-echo "DIFF: diffing original test files to dest (should be no diffs) ..."
-diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
-
-echo "TEST: Trying all roots at once, uninstall in install order ..."
-for R in $ROOTS;
-do
- echo "INFO: Installing $R ...";
- darwinup -vv -p $DEST install $PREFIX/$R
- if [ $? -gt 0 ]; then exit 1; fi
-done
-for R in $ROOTS;
-do
- UUID=$(darwinup -p $DEST list | grep $R$ | awk '{print $1}')
- echo "INFO: Uninstalling $UUID ...";
- darwinup -vv -p $DEST uninstall $UUID
- if [ $? -gt 0 ]; then exit 1; fi
-done
-echo "DIFF: diffing original test files to dest (should be no diffs) ..."
-diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
-
-echo "TEST: Trying all roots at once, uninstall root2, root3, root ..."
-for R in $ROOTS;
-do
- echo "INFO: Installing $R ...";
- darwinup -vv -p $DEST install $PREFIX/$R
- if [ $? -gt 0 ]; then exit 1; fi
-done
-for R in root2 root3 root;
-do
- UUID=$(darwinup -p $DEST list | grep $R$ | awk '{print $1}')
- echo "INFO: Uninstalling $UUID ...";
- darwinup -vv -p $DEST uninstall $UUID
- if [ $? -gt 0 ]; then exit 1; fi
-done
-echo "DIFF: diffing original test files to dest (should be no diffs) ..."
-diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
-
-echo "TEST: Trying roots in reverse, uninstall in install order ..."
-for R in root3 root2 root;
-do
- echo "INFO: Installing $R ...";
- darwinup -vv -p $DEST install $PREFIX/$R
- if [ $? -gt 0 ]; then exit 1; fi
-done
-for R in root3 root2 root;
-do
- UUID=$(darwinup -p $DEST list | grep $R$ | awk '{print $1}')
- echo "INFO: Uninstalling $UUID ...";
- darwinup -vv -p $DEST uninstall $UUID
- if [ $? -gt 0 ]; then exit 1; fi
-done
-echo "DIFF: diffing original test files to dest (should be no diffs) ..."
-diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
-
-
-echo "INFO: Done testing!"
-
Copied: trunk/testing/darwinup/run-tests.sh (from rev 499, branches/PR-6722857/testing/darwinup/run-tests.sh)
===================================================================
--- trunk/testing/darwinup/run-tests.sh (rev 0)
+++ trunk/testing/darwinup/run-tests.sh 2009-03-26 20:24:24 UTC (rev 502)
@@ -0,0 +1,113 @@
+#!/bin/bash
+
+#
+# Run tests on darwinup
+#
+
+PREFIX=/tmp/testing/darwinup
+ORIG=$PREFIX/orig
+DEST=$PREFIX/dest
+DESTTAR=dest.tar.gz
+
+ROOTS="root root2 root3"
+
+echo "INFO: Cleaning up testing area ..."
+rm -rf $PREFIX
+mkdir -p $PREFIX
+
+echo "INFO: Untarring the test files ..."
+tar zxvf $DESTTAR -C $PREFIX
+
+for R in $ROOTS;
+do
+ tar zxvf $R.tar.gz -C $PREFIX
+done;
+
+mkdir -p $ORIG
+cp -R $DEST/* $ORIG/
+
+echo "TEST: Trying roots one at a time ..."
+for R in $ROOTS;
+do
+ echo "INFO: Installing $R ...";
+ darwinup -vv -p $DEST install $PREFIX/$R
+ if [ $? -gt 0 ]; then exit 1; fi
+ UUID=$(darwinup -p $DEST list | head -3 | tail -1 | awk '{print $1}')
+ echo "INFO: Uninstalling $R ...";
+ darwinup -vv -p $DEST uninstall $UUID
+ if [ $? -gt 0 ]; then exit 1; fi
+ echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+ diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
+done
+
+echo "TEST: Trying all roots at once, uninstall in reverse ...";
+for R in $ROOTS;
+do
+ echo "INFO: Installing $R ...";
+ darwinup -vv -p $DEST install $PREFIX/$R
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+for R in $ROOTS;
+do
+ UUID=$(darwinup -p $DEST list | head -3 | tail -1 | awk '{print $1}')
+ echo "INFO: Uninstalling $UUID ...";
+ darwinup -vv -p $DEST uninstall $UUID
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
+
+echo "TEST: Trying all roots at once, uninstall in install order ..."
+for R in $ROOTS;
+do
+ echo "INFO: Installing $R ...";
+ darwinup -vv -p $DEST install $PREFIX/$R
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+for R in $ROOTS;
+do
+ UUID=$(darwinup -p $DEST list | grep $R$ | awk '{print $1}')
+ echo "INFO: Uninstalling $UUID ...";
+ darwinup -vv -p $DEST uninstall $UUID
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
+
+echo "TEST: Trying all roots at once, uninstall root2, root3, root ..."
+for R in $ROOTS;
+do
+ echo "INFO: Installing $R ...";
+ darwinup -vv -p $DEST install $PREFIX/$R
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+for R in root2 root3 root;
+do
+ UUID=$(darwinup -p $DEST list | grep $R$ | awk '{print $1}')
+ echo "INFO: Uninstalling $UUID ...";
+ darwinup -vv -p $DEST uninstall $UUID
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
+
+echo "TEST: Trying roots in reverse, uninstall in install order ..."
+for R in root3 root2 root;
+do
+ echo "INFO: Installing $R ...";
+ darwinup -vv -p $DEST install $PREFIX/$R
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+for R in root3 root2 root;
+do
+ UUID=$(darwinup -p $DEST list | grep $R$ | awk '{print $1}')
+ echo "INFO: Uninstalling $UUID ...";
+ darwinup -vv -p $DEST uninstall $UUID
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
+
+
+echo "INFO: Done testing!"
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20090326/f9b7ef0a/attachment-0001.html>
More information about the darwinbuild-changes
mailing list