From 3ac16dd6a82e7cc8799aa94e5073c2f5283a5cb9 Mon Sep 17 00:00:00 2001 From: Christian Falch Date: Tue, 6 May 2025 02:19:54 -0700 Subject: [PATCH] replaced use of rsync with cp in prebuild scripts (#51095) Summary: When building the RNDependencies XCFrameworks we saw some errors in the CI servers about rsync failing: `rsync(3031): error: poll: hangup on nonblocking write` We decided to fix this by changing from using rsync to cp. This commit fixes this by replacing rsync with cp, and adding a cleanup step after copying the XCFramework files. ## Changelog: [INTERNAL] [FIXED] - Replacing rsync with cp, and adding a cleanup step after copying the XCFramework files. Pull Request resolved: https://github.com/facebook/react-native/pull/51095 Test Plan: Run RNDependencies scripts on CI and verify that they're working as expected. Reviewed By: fabriziocucci Differential Revision: D74236114 Pulled By: cipolleschi fbshipit-source-id: accd84abf7601919cfdbc1b6a8681a61d4293ca5 --- .../third-party-podspecs/ReactNativeDependencies.podspec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-native/third-party-podspecs/ReactNativeDependencies.podspec b/packages/react-native/third-party-podspecs/ReactNativeDependencies.podspec index 33bb25261ad..c259def49c3 100644 --- a/packages/react-native/third-party-podspecs/ReactNativeDependencies.podspec +++ b/packages/react-native/third-party-podspecs/ReactNativeDependencies.podspec @@ -49,9 +49,10 @@ Pod::Spec.new do |spec| mkdir -p Headers XCFRAMEWORK_PATH=$(find "$CURRENT_PATH" -type d -name "ReactNativeDependencies.xcframework") HEADERS_PATH=$(find "$XCFRAMEWORK_PATH" -type d -name "Headers" | head -n 1) - rsync -a "$HEADERS_PATH/" Headers + cp -R "$HEADERS_PATH/" Headers mkdir -p framework/packages/react-native - rsync -a --remove-source-files "$XCFRAMEWORK_PATH/.." framework/packages/react-native/ + cp -R "$XCFRAMEWORK_PATH/.." framework/packages/react-native/ + find "$XCFRAMEWORK_PATH/.." -type f -exec rm {} + find "$CURRENT_PATH" -type d -empty -delete CMD