[darwinbuild-changes] [760] branches/PR-7593824/darwinup/Depot.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 10 15:48:01 PST 2010
Revision: 760
http://trac.macosforge.org/projects/darwinbuild/changeset/760
Author: wsiegrist at apple.com
Date: 2010-03-10 15:47:59 -0800 (Wed, 10 Mar 2010)
Log Message:
-----------
Account for OS upgrades superseding installed roots
Modified Paths:
--------------
branches/PR-7593824/darwinup/Depot.cpp
Modified: branches/PR-7593824/darwinup/Depot.cpp
===================================================================
--- branches/PR-7593824/darwinup/Depot.cpp 2010-03-10 22:15:23 UTC (rev 759)
+++ branches/PR-7593824/darwinup/Depot.cpp 2010-03-10 23:47:59 UTC (rev 760)
@@ -1148,9 +1148,25 @@
if (FOUND(res)) {
for (uint32_t i=0; i < count; i++) {
File* file = this->m_db->make_file(filelist[i]);
+
+ // check for being superseded by a root
res = this->m_db->get_next_file(&data, file, FILE_SUPERSEDED);
// XXX: need to send data to Table to free
- if (!FOUND(res)) return false;
+ if (FOUND(res)) continue;
+
+ // check for being superseded by external changes
+ char* actpath;
+ join_path(&actpath, this->prefix(), file->path());
+ File* actual = FileFactory(actpath);
+ free(actpath);
+ uint32_t flags = File::compare(file, actual);
+
+ // not found in database and no changes on disk,
+ // so file is the current version of actual
+ if (flags == FILE_INFO_IDENTICAL) return false;
+
+ // something external changed contents of actual,
+ // so we consider this file superseded (by OS upgrade?)
}
}
return true;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20100310/ef31c4e9/attachment.html>
More information about the darwinbuild-changes
mailing list