-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Copy symlinks when creating android cipd package, and update to package w/ symlinks #177638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| array_length=${#split[@]} | ||
| for (( i=1; i<${array_length}; i++ )); do | ||
| cp -r "$sdk_root/${split[$i]}" "$upload_dir/sdk" | ||
| cp -a "$sdk_root/${split[$i]}" "$upload_dir/sdk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using rsync:
flutter/packages/flutter_tools/lib/src/base/os.dart
Lines 444 to 447 in f4d77a1
| // rsync --delete the unzipped files so files removed from the archive are also removed from the target. | |
| // Add the '-8' parameter to avoid mangling filenames with encodings that do not match the current locale. | |
| _processUtils.runSync( | |
| <String>['rsync', '-8', '-av', '--delete', unzippedFile.path, targetDirectory.path], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had originally used rsync, but I looked up the difference and it sounds like rsync is mostly preferred for its ability to efficiently do partial copies (like transferring updates of existing files) to keep directories in sync, making efficient decisions.
The general advice seemed to be that if you are doing entirely copy, not updates of existing files, that is what cp is for. But also I don't have a strong opinion and can change if you prefer - I think either tool accomplishes the preservation of symlinks here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably doesn't matter since the script created it in a new tmp directory. cp works.
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
|
test-exempt: team-facing utility script implementation detail |
|
autosubmit label was removed for flutter/flutter/177638, because - The status or check suite Linux linux_web_engine_tests has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
autosubmit label was removed for flutter/flutter/177638, because - The status or check suite Linux linux_web_engine_tests has failed. Please fix the issues identified (or deflake) before re-applying this label. |
…ge w/ symlinks (flutter#177638) `cp -r` isn't [well defined](https://unix.stackexchange.com/questions/18712/difference-between-cp-r-and-cp-r-copy-command), but on my mac (and probably on the other android team members macs) it doesn't copy symlinks (instead it follows the symlink and copies the file). `cp -a` is well defined, and copies the symlinks. This will probably fix flutter#177286, the symlinks are there for sure locally so it is just a question of if the upload process tramples them. But it sounds like cipd supports this, so I imagine it will fix the issue. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Gray Mackall <[email protected]>
…e to package w/ symlinks (flutter/flutter#177638)
flutter/flutter@df72035...6f8abdd 2025-10-30 [email protected] Roll Skia from 5035cdc7de31 to 18457971c30f (1 revision) (flutter/flutter#177767) 2025-10-30 [email protected] Roll Skia from 018e2cdba2fe to 5035cdc7de31 (3 revisions) (flutter/flutter#177764) 2025-10-30 [email protected] Roll Dart SDK from a0480f399f8f to 4785d5971d64 (21 revisions) (flutter/flutter#177760) 2025-10-30 [email protected] Roll Skia from c803f12d2e26 to 018e2cdba2fe (1 revision) (flutter/flutter#177759) 2025-10-30 [email protected] Roll Skia from 51267d4a2cea to c803f12d2e26 (2 revisions) (flutter/flutter#177756) 2025-10-30 [email protected] Roll Fuchsia Linux SDK from 3EF6k6lqXPWDwrdyj... to ksXeDDo2yYBXJ4uEu... (flutter/flutter#177754) 2025-10-30 [email protected] impeller: allow setting image sampler uniforms by name (flutter/flutter#176749) 2025-10-30 [email protected] Roll Skia from 0a0c9f8c704f to 51267d4a2cea (21 revisions) (flutter/flutter#177752) 2025-10-30 [email protected] Copy symlinks when creating android cipd package, and update to package w/ symlinks (flutter/flutter#177638) 2025-10-30 [email protected] [web] Add GEMINI.md for web engine customizations (flutter/flutter#177413) 2025-10-30 [email protected] Added computeDryBaseline implementation in RenderAligningShiftedBox (flutter/flutter#171250) 2025-10-29 [email protected] Refactor OverlayPortal semantics (flutter/flutter#173005) 2025-10-29 [email protected] [web] Delete unused canvaskit utils (flutter/flutter#177684) 2025-10-29 [email protected] Fixed image links in //README.md (flutter/flutter#177750) 2025-10-29 [email protected] Disable LTO in CI builder configurations for Linux targets (flutter/flutter#177694) 2025-10-29 [email protected] [web] Move webparagraph tests to their right location (flutter/flutter#177739) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…ge w/ symlinks (flutter#177638) `cp -r` isn't [well defined](https://unix.stackexchange.com/questions/18712/difference-between-cp-r-and-cp-r-copy-command), but on my mac (and probably on the other android team members macs) it doesn't copy symlinks (instead it follows the symlink and copies the file). `cp -a` is well defined, and copies the symlinks. This will probably fix flutter#177286, the symlinks are there for sure locally so it is just a question of if the upload process tramples them. But it sounds like cipd supports this, so I imagine it will fix the issue. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md --------- Co-authored-by: Gray Mackall <[email protected]>
cp -risn't well defined, but on my mac (and probably on the other android team members macs) it doesn't copy symlinks (instead it follows the symlink and copies the file).cp -ais well defined, and copies the symlinks. This will probably fix #177286, the symlinks are there for sure locally so it is just a question of if the upload process tramples them. But it sounds like cipd supports this, so I imagine it will fix the issue.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.