Skip to content

Conversation

@muvaf
Copy link

@muvaf muvaf commented Dec 26, 2025

  • The install-build-deps.sh gets stuck at asking for apt-get confirmation and locale, so these changes make sure the whole apt-get flow is headless, including for when it's done via sudo
  • The build fails for arm64 when it's built on linux/amd64 if chrome_pgo_phase=0 is not given.
  • Enable h265 as it's quite widespread at this point and Chrome & Safari adopted it for a long while.

Signed-off-by: Muvaffak Onus <me@muvaf.com>
Signed-off-by: Muvaffak Onus <me@muvaf.com>
Signed-off-by: Muvaffak Onus <me@muvaf.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @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

  • Headless Dependency Installation: The install-build-deps.sh script now runs fully non-interactively, preventing apt-get from getting stuck on confirmation or locale prompts, even when sudo is involved.
  • ARM64 Build Fix: Resolved a build failure for arm64 architectures when building on linux/amd64 by explicitly adding chrome_pgo_phase=0 to the build arguments.
  • H265 Codec Enablement: H265 video codec support has been enabled, aligning with its widespread adoption in browsers like Chrome and Safari.

🧠 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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a 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.

Comment on lines +65 to +72
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')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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)}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant