ungoogled-software / ungoogled-chromium

Google Chromium, sans integration with Google
BSD 3-Clause "New" or "Revised" License
20.8k stars 844 forks source link

Move assert_no_deps fix to missing-dependencies.patch #3081

Closed dot-gov closed 2 weeks ago

dot-gov commented 2 weeks ago

missing-dependencies.patch contains a patch that adds //chrome/common:buildflags to deps: https://github.com/ungoogled-software/ungoogled-chromium/blob/89fe8ac0edf91ab1a9679f681f106acd815c13f5/patches/upstream-fixes/missing-dependencies.patch#L77 However, this causes an error while building:

ERROR at //build/config/BUILDCONFIG.gn:581:5: assert_no_deps failed.
    target(_target_type, _target_name) {
    ^-----------------------------------
//components:components_browsertests has an assert_no_deps entry:
  //chrome/*
which fails for the dependency path:
  //components:components_browsertests ->
  //components/autofill/content/browser:browser ->
  //components/keyed_service/content:content ->
  //content/public/browser:browser ->
  //content/public/browser:browser_sources ->
  //content/browser:browser ->
  //chrome/common:buildflags

The fix for this is in another, seemingly unrelated patch: https://github.com/ungoogled-software/ungoogled-chromium/blob/89fe8ac0edf91ab1a9679f681f106acd815c13f5/patches/extra/ungoogled-chromium/add-flags-for-referrer-customization.patch#L165-L193

Everything works out if you apply all patches, but if you're selectively applying patches it breaks the build. This PR moves the fix from add-flags-for-referrer-customization.patch to missing-dependencies.patch, which should address the aforementioned concern. The fix is also needed for add-flags-for-referrer-customization.patch, but presumably missing-dependencies.patch is mandatory so there's less of a chance that it's missed by someone selectively choosing which patches to apply.