Skip to content
Permalink
Browse files
Prevent empty folders being created during install builds
rdar://87777915

Patch by Elliott Williams <emw@apple.com> on 2022-01-20
Reviewed by Brady Eidson.

The "Copy Daemon Plists" script phase has output files which aren't always written to. Since
Xcode mkdir-p's these output directories, it ends up creating an empty directory under some
circumstances. Fix by removing these declared outputs: since this script is install-only
and executes quickly, it's not really a problem to have it run redundantly.

Once we use XCBuild everywhere, it can be rewritten as a Copy Files phase.

* WebKit.xcodeproj/project.pbxproj:


Canonical link: https://commits.webkit.org/246217@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
emw-apple authored and webkit-commit-queue committed Jan 20, 2022
1 parent 4ab8b54 commit 976a8df0b6397817388c995f47ae328924a75762
Showing 2 changed files with 17 additions and 4 deletions.
@@ -1,3 +1,19 @@
2022-01-20 Elliott Williams <emw@apple.com>

Prevent empty folders being created during install builds
rdar://87777915

Reviewed by Brady Eidson.

The "Copy Daemon Plists" script phase has output files which aren't always written to. Since
Xcode mkdir-p's these output directories, it ends up creating an empty directory under some
circumstances. Fix by removing these declared outputs: since this script is install-only
and executes quickly, it's not really a problem to have it run redundantly.

Once we use XCBuild everywhere, it can be rewritten as a Copy Files phase.

* WebKit.xcodeproj/project.pbxproj:

2022-01-19 Brent Fulgham <bfulgham@apple.com>

Grant access to GlobalPreferences and GlobalPreferences_m uniformly
@@ -15279,13 +15279,10 @@
outputFileListPaths = (
);
outputPaths = (
"$(DSTROOT)/System/Library/LaunchDaemons/com.apple.webkit.adattributiond.plist",
"$(DSTROOT)/System/Library/LaunchDaemons/com.apple.webkit.webpushd.plist",
"$(DSTROOT)/System/Library/LaunchAgents/com.apple.webkit.webpushd.plist",
);
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
shellScript = "if [[ \"${WK_PLATFORM_NAME}\" == iphoneos ]]; then\n ADATTRIBUTIOND_PLIST_SOURCE=\"${SRCROOT}/Shared/EntryPointUtilities/Cocoa/Daemon/com.apple.webkit.adattributiond.plist\"\n ADATTRIBUTIOND_PLIST_DESTINATION=\"${DSTROOT}/System/Library/LaunchDaemons/com.apple.webkit.adattributiond.plist\"\n echo \"copying adattributiond plist\"\n echo plutil -convert binary1 -o \"${ADATTRIBUTIOND_PLIST_DESTINATION}\" \"${ADATTRIBUTIOND_PLIST_SOURCE}\"\n plutil -convert binary1 -o \"${ADATTRIBUTIOND_PLIST_DESTINATION}\" \"${ADATTRIBUTIOND_PLIST_SOURCE}\"\nelse\n echo \"not copying adattributiond plist\"\nfi\n\nif [[ \"${WK_PLATFORM_NAME}\" == iphoneos || \"${WK_PLATFORM_NAME}\" == macosx ]]; then\n if [[ \"${WK_PLATFORM_NAME}\" == iphoneos ]]; then\n WEBPUSHD_PLIST_SOURCE=\"${SRCROOT}/webpushd/com.apple.webkit.webpushd.ios.plist\"\n WEBPUSHD_PLIST_DESTINATION=\"${DSTROOT}/System/Library/LaunchDaemons/com.apple.webkit.webpushd.plist\"\n else\n WEBPUSHD_PLIST_SOURCE=\"${SRCROOT}/webpushd/com.apple.webkit.webpushd.mac.plist\"\n WEBPUSHD_PLIST_DESTINATION=\"${DSTROOT}/System/Library/LaunchAgents/com.apple.webkit.webpushd.plist\"\n fi\n\n echo \"copying webpushd plist\"\n echo plutil -convert binary1 -o \"${WEBPUSHD_PLIST_DESTINATION}\" \"${WEBPUSHD_PLIST_SOURCE}\"\n plutil -convert binary1 -o \"${WEBPUSHD_PLIST_DESTINATION}\" \"${WEBPUSHD_PLIST_SOURCE}\"\nelse\n echo \"not copying webpushd plist\"\nfi\n";
shellScript = "if [[ \"${WK_PLATFORM_NAME}\" == iphoneos ]]; then\n ADATTRIBUTIOND_PLIST_SOURCE=\"${SRCROOT}/Shared/EntryPointUtilities/Cocoa/Daemon/com.apple.webkit.adattributiond.plist\"\n ADATTRIBUTIOND_PLIST_DESTINATION=\"${DSTROOT}/System/Library/LaunchDaemons/com.apple.webkit.adattributiond.plist\"\n echo \"copying adattributiond plist\"\n mkdir -p \"$(dirname \"${ADATTRIBUTIOND_PLIST_DESTINATION}\")\"\n echo plutil -convert binary1 -o \"${ADATTRIBUTIOND_PLIST_DESTINATION}\" \"${ADATTRIBUTIOND_PLIST_SOURCE}\"\n plutil -convert binary1 -o \"${ADATTRIBUTIOND_PLIST_DESTINATION}\" \"${ADATTRIBUTIOND_PLIST_SOURCE}\"\nelse\n echo \"not copying adattributiond plist\"\nfi\n\nif [[ \"${WK_PLATFORM_NAME}\" == iphoneos || \"${WK_PLATFORM_NAME}\" == macosx ]]; then\n if [[ \"${WK_PLATFORM_NAME}\" == iphoneos ]]; then\n WEBPUSHD_PLIST_SOURCE=\"${SRCROOT}/webpushd/com.apple.webkit.webpushd.ios.plist\"\n WEBPUSHD_PLIST_DESTINATION=\"${DSTROOT}/System/Library/LaunchDaemons/com.apple.webkit.webpushd.plist\"\n else\n WEBPUSHD_PLIST_SOURCE=\"${SRCROOT}/webpushd/com.apple.webkit.webpushd.mac.plist\"\n WEBPUSHD_PLIST_DESTINATION=\"${DSTROOT}/System/Library/LaunchAgents/com.apple.webkit.webpushd.plist\"\n fi\n\n echo \"copying webpushd plist\"\n mkdir -p \"$(dirname \"${WEBPUSHD_PLIST_DESTINATION}\")\"\n echo plutil -convert binary1 -o \"${WEBPUSHD_PLIST_DESTINATION}\" \"${WEBPUSHD_PLIST_SOURCE}\"\n plutil -convert binary1 -o \"${WEBPUSHD_PLIST_DESTINATION}\" \"${WEBPUSHD_PLIST_SOURCE}\"\nelse\n echo \"not copying webpushd plist\"\nfi\n";
};
E1AC2E2C20F7B95800B0897D /* Unlock Keychain */ = {
isa = PBXShellScriptBuildPhase;

0 comments on commit 976a8df

Please sign in to comment.