-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[Linux] Use up_client_get_devices2 when possible #127699
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
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). 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. |
The Linux platform channels sample makes a call to the libupower function `up_client_get_devices`, which was deprecated in libupower 0.99.8 in favour of `up_client_get_devices2`. In order to build both for users on older versions of libupower, such as 0.99.7, which ships with Ubuntu 18.04 (Bionic), as well as users on newer versions where `up_client_get_devices` is deprecated, this adds a preprocessor check and selects the function available on the host system on which the build takes place. The Flutter devicelab prod bots have been migrated to Ubuntu 20.04 LTS (Focal) which includes 0.99.11, but the trybots have not yet migrated. This allows the build to work on both, and makes life easier for users running on a variety of Linux distributions. See: https://upower.freedesktop.org/docs/UpClient.html#up-client-get-devices Issue: flutter#127611
|
test-exempt: needed to build on different versions I guess if we really wanted we could explicitly try to build against different versions but that seems like a path that leads to insanity rather quickly. |
Honestly, if there's a way to run on 18.04, 20.04, and 22.04 (and enough hardware) I would love to enable that. I'll ping the infra team to see whether that's reasonable given our current infra and capacity. |
flutter/flutter@ee162e4...3db9504 2023-05-28 [email protected] Roll Flutter Engine from 340936f7c03c to a4d4ad9dae1a (1 revision) (flutter/flutter#127772) 2023-05-28 [email protected] Roll Flutter Engine from 57e491a46e05 to 340936f7c03c (1 revision) (flutter/flutter#127767) 2023-05-28 [email protected] Roll Flutter Engine from a37b1a38d97a to 57e491a46e05 (1 revision) (flutter/flutter#127765) 2023-05-28 [email protected] Roll Flutter Engine from b1698020bd57 to a37b1a38d97a (1 revision) (flutter/flutter#127761) 2023-05-27 [email protected] Roll Flutter Engine from 9e97c7379c7f to b1698020bd57 (1 revision) (flutter/flutter#127758) 2023-05-27 [email protected] Roll Flutter Engine from 0f38a0f0a18a to 9e97c7379c7f (1 revision) (flutter/flutter#127755) 2023-05-27 [email protected] Roll Flutter Engine from 1187168472a7 to 0f38a0f0a18a (1 revision) (flutter/flutter#127752) 2023-05-27 [email protected] Roll Flutter Engine from 3426cb827efb to 1187168472a7 (1 revision) (flutter/flutter#127745) 2023-05-27 [email protected] Roll Flutter Engine from 795db50e7453 to 3426cb827efb (9 revisions) (flutter/flutter#127738) 2023-05-27 [email protected] Updated the `ToggleButtons` API doc to link to `SegmentedButton` (flutter/flutter#127021) 2023-05-26 [email protected] Remove more `test_api/src` imports (flutter/flutter#127716) 2023-05-26 [email protected] Move shared inline widget logic to `RenderInlineWidgetContainerDefaults` (flutter/flutter#127308) 2023-05-26 [email protected] Roll Flutter Engine from 3b5b5fc96b8f to 795db50e7453 (1 revision) (flutter/flutter#127720) 2023-05-26 [email protected] Update collection-fors to prefer final (as per updated `prefer_final_in_for_each`) (flutter/flutter#127511) 2023-05-26 [email protected] Roll Flutter Engine from eed12f36f595 to 3b5b5fc96b8f (1 revision) (flutter/flutter#127713) 2023-05-26 [email protected] Remove references to deprecated `ThemeData.primaryColorBrightness` (flutter/flutter#127238) 2023-05-26 [email protected] TwoDimensional scrolling foundation (flutter/flutter#125437) 2023-05-26 [email protected] Roll Flutter Engine from 858d9753453c to eed12f36f595 (2 revisions) (flutter/flutter#127702) 2023-05-26 [email protected] Remove button announcement for `MenuItemButton` and `SubmenuButton` (flutter/flutter#127620) 2023-05-26 [email protected] Reland "Update labeler action wildcards #127524" (flutter/flutter#127690) 2023-05-26 [email protected] Revert "Log all lines from ios-deploy (#127502)" (flutter/flutter#127684) 2023-05-26 [email protected] Roll Flutter Engine from ec7b0ae3599f to 858d9753453c (2 revisions) (flutter/flutter#127700) 2023-05-26 [email protected] Add M3 date range picker tests and fix header background theme color (flutter/flutter#127662) 2023-05-26 [email protected] Support minifcation for apps that depend on AGP 8 and integration_test (flutter/flutter#127628) 2023-05-26 [email protected] Bump Snippet version (flutter/flutter#127688) 2023-05-26 [email protected] [Linux] Use up_client_get_devices2 when possible (flutter/flutter#127699) 2023-05-26 [email protected] Roll Flutter Engine from 84f2fc16e55d to ec7b0ae3599f (3 revisions) (flutter/flutter#127698) 2023-05-26 [email protected] Fix `TextField` error in production environment because it wrongly uses ancestor render boxes (flutter/flutter#126324) 2023-05-26 [email protected] Interactive viewer doesn't appear to respect the trackpadScrollCausesScale parameter (flutter/flutter#127114) 2023-05-26 [email protected] Remove release timeline (flutter/flutter#127685) 2023-05-26 [email protected] Manual roll Flutter Engine from 8573f3b63a1f to 84f2fc16e55d (7 revisions) (flutter/flutter#127676) 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],[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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
The Linux platform channels sample makes a call to the libupower function
up_client_get_devices, which was deprecated in libupower 0.99.8 in favour ofup_client_get_devices2.In order to build both for users on older versions of libupower, such as 0.99.7, which ships with Ubuntu 18.04 (Bionic), as well as users on newer versions where
up_client_get_devicesis deprecated, this adds a preprocessor check and selects the function available on the host system on which the build takes place.The Flutter devicelab prod bots have been migrated to Ubuntu 20.04 LTS (Focal) which includes 0.99.11, but the trybots are still in the process of being migrated. This allows the build to work on both, and makes life easier for users running on a variety of Linux distributions.
No tests are added or modified since
up_client_get_devicesandup_client_get_devices2have the same semantics.See: https://upower.freedesktop.org/docs/UpClient.html#up-client-get-devices
See: https://gitlab.freedesktop.org/upower/upower/-/blob/master/libupower-glib/up-version.h.in
Note: the
UP_CHECK_VERSIONmacro has been around since 2010 (13 years ago), when DKP was forked into libupower. https://gitlab.freedesktop.org/upower/upower/-/commit/27fada20be7feba6783abc5b6cad91ee274ad3dfIssue: #127611
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.