[darwinbuild-changes] [1007] branches/PR-10821792/darwinup

source_changes at macosforge.org source_changes at macosforge.org
Tue Feb 7 18:31:24 PST 2012


Revision: 1007
          http://trac.macosforge.org/projects/darwinbuild/changeset/1007
Author:   mww at apple.com
Date:     2012-02-07 18:31:23 -0800 (Tue, 07 Feb 2012)
Log Message:
-----------
Trigger xpchelper on sandbox profile installation. Fix logic. Fix update_xpc_services_cache.

Modified Paths:
--------------
    branches/PR-10821792/darwinup/Depot.cpp
    branches/PR-10821792/darwinup/Utils.cpp

Modified: branches/PR-10821792/darwinup/Depot.cpp
===================================================================
--- branches/PR-10821792/darwinup/Depot.cpp	2012-02-08 02:31:16 UTC (rev 1006)
+++ branches/PR-10821792/darwinup/Depot.cpp	2012-02-08 02:31:23 UTC (rev 1007)
@@ -545,16 +545,17 @@
 					this->m_modified_extensions = true;
 				}
 
-				if (!this->m_modified_xpc_services &&
-					(strstr(file->path(), ".xpc/") != NULL)) {
-
-					bool modified = (has_suffix(file->path(), "Info.plist") ||
-									 has_suffix(file->path(), "framework.sb"));
-
-					if (modified) {
+				if (!this->m_modified_xpc_services) {
+					if ((strstr(file->path(), ".xpc/") != NULL) && has_suffix(file->path(), "Info.plist")) {
 						IF_DEBUG("[analyze]    xpc service detected\n");
 						this->m_modified_xpc_services = true;
 					}
+
+					if ((strncmp(file->path(), "/System/Library/Sandbox/Profiles", 33) == 0) ||
+						(has_suffix(file->path(), "framework.sb"))) {
+						IF_DEBUG("[analyze]    profile modification detected\n");
+						this->m_modified_xpc_services = true;
+					}
 				}
 			}
 

Modified: branches/PR-10821792/darwinup/Utils.cpp
===================================================================
--- branches/PR-10821792/darwinup/Utils.cpp	2012-02-08 02:31:16 UTC (rev 1006)
+++ branches/PR-10821792/darwinup/Utils.cpp	2012-02-08 02:31:23 UTC (rev 1007)
@@ -371,6 +371,14 @@
 	res = find_base_system_path(&base, path);
 	if (res) return res;
 
+	// xpchelper expects the --root value to *not* end in a slash.
+	if (has_suffix(base, "/")) {
+		char *ptr = strrchr(base, '/');
+		if (ptr) {
+			*ptr = '\0';
+		}
+	}
+
 	if (verbosity) {
 		fprintf(stdout, "Updating xpc services cache for %s ...", base);
 		fflush(stdout);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20120207/07c8bdab/attachment.html>


More information about the darwinbuild-changes mailing list