-
Notifications
You must be signed in to change notification settings - Fork 1
Fix the headless fetch and enable h265 #7
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Muvaffak Onus <me@muvaf.com>
Signed-off-by: Muvaffak Onus <me@muvaf.com>
Signed-off-by: Muvaffak Onus <me@muvaf.com>
Summary of ChangesHello @muvaf, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the build process by ensuring a seamless, non-interactive dependency installation, fixing a specific cross-architecture build issue for ARM64, and enhancing media capabilities by enabling the H265 video codec. These changes aim to make the build system more robust and up-to-date with modern video standards. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request aims to fix headless builds by correctly configuring environment variables for apt-get and ensuring they are passed through sudo and Python's subprocess calls. It also enables H.265 support and adds a build flag to resolve an arm64 build issue. The changes are logical and address the problems described. I've included a couple of suggestions in build.py to improve code readability and maintainability.
| os.environ.setdefault('DEBIAN_FRONTEND', 'noninteractive') | ||
| os.environ.setdefault('DEBIAN_PRIORITY', 'critical') | ||
| os.environ.setdefault('DEBCONF_NONINTERACTIVE_SEEN', 'true') | ||
| os.environ.setdefault('APT_LISTCHANGES_FRONTEND', 'none') | ||
| os.environ.setdefault('TZ', 'Etc/UTC') | ||
| os.environ.setdefault('LANG', 'C.UTF-8') | ||
| os.environ.setdefault('LC_ALL', 'C.UTF-8') | ||
| os.environ.setdefault('LANGUAGE', 'C.UTF-8') |
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.
To improve readability and make it easier to manage these environment variables, consider defining them in a dictionary and then iterating over it to set them. This groups related configuration together and makes it more maintainable.
| os.environ.setdefault('DEBIAN_FRONTEND', 'noninteractive') | |
| os.environ.setdefault('DEBIAN_PRIORITY', 'critical') | |
| os.environ.setdefault('DEBCONF_NONINTERACTIVE_SEEN', 'true') | |
| os.environ.setdefault('APT_LISTCHANGES_FRONTEND', 'none') | |
| os.environ.setdefault('TZ', 'Etc/UTC') | |
| os.environ.setdefault('LANG', 'C.UTF-8') | |
| os.environ.setdefault('LC_ALL', 'C.UTF-8') | |
| os.environ.setdefault('LANGUAGE', 'C.UTF-8') | |
| env_vars = { | |
| 'DEBIAN_FRONTEND': 'noninteractive', | |
| 'DEBIAN_PRIORITY': 'critical', | |
| 'DEBCONF_NONINTERACTIVE_SEEN': 'true', | |
| 'APT_LISTCHANGES_FRONTEND': 'none', | |
| 'TZ': 'Etc/UTC', | |
| 'LANG': 'C.UTF-8', | |
| 'LC_ALL': 'C.UTF-8', | |
| 'LANGUAGE': 'C.UTF-8', | |
| } | |
| for key, value in env_vars.items(): | |
| os.environ.setdefault(key, value) |
| build_opts = [] | ||
| if opts.official: | ||
| build_opts.append('--extra-gn-args=is_official_build=true') | ||
| build_opts.append('--extra-gn-args=rtc_use_h265=true is_official_build=true chrome_pgo_phase=0') |
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.
For better readability and maintainability, it's advisable to construct the gn_args string from a list of individual arguments. This approach makes it easier to add, remove, or conditionally include arguments in the future.
| build_opts.append('--extra-gn-args=rtc_use_h265=true is_official_build=true chrome_pgo_phase=0') | |
| gn_args = [ | |
| 'rtc_use_h265=true', | |
| 'is_official_build=true', | |
| 'chrome_pgo_phase=0', | |
| ] | |
| build_opts.append(f"--extra-gn-args={' '.join(gn_args)}") |
install-build-deps.shgets stuck at asking forapt-getconfirmation and locale, so these changes make sure the whole apt-get flow is headless, including for when it's done viasudochrome_pgo_phase=0is not given.