Remove USE="-runhooks" hacks

These are no longer needed.

BUG=b:328715440
TEST=CQ

Cq-Depend: chromium:5377074
Change-Id: Ic2e31ffcf4c674a0b164b5ffe178416d91c70102
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/bazel/+/5394934
Tested-by: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Commit-Queue: Ryo Hashimoto <hashimoto@chromium.org>
diff --git a/portage/bin/alchemist/src/bin/alchemist/alchemist.rs b/portage/bin/alchemist/src/bin/alchemist/alchemist.rs
index d4891ed..2057020 100644
--- a/portage/bin/alchemist/src/bin/alchemist/alchemist.rs
+++ b/portage/bin/alchemist/src/bin/alchemist/alchemist.rs
@@ -234,36 +234,10 @@
         }
     }
 
-    let mut nodes = vec![
-        ConfigNode {
-            sources: vec![],
-            value: ConfigNodeValue::PackageMasks(masked),
-        },
-        // We run the hooks in the chrome repository rule, so prevent them
-        // from running in the ebuild action. We also have this USE flag hard
-        // coded in build_package.sh.
-        ConfigNode {
-            sources: vec![],
-            value: ConfigNodeValue::Uses(vec![
-                UseUpdate {
-                    kind: UseUpdateKind::Set,
-                    filter: UseUpdateFilter {
-                        atom: Some("chromeos-base/chrome-icu".parse().unwrap()),
-                        stable_only: false,
-                    },
-                    use_tokens: "-runhooks".to_string(),
-                },
-                UseUpdate {
-                    kind: UseUpdateKind::Set,
-                    filter: UseUpdateFilter {
-                        atom: Some("chromeos-base/chromeos-chrome".parse().unwrap()),
-                        stable_only: false,
-                    },
-                    use_tokens: "-runhooks".to_string(),
-                },
-            ]),
-        },
-    ];
+    let mut nodes = vec![ConfigNode {
+        sources: vec![],
+        value: ConfigNodeValue::PackageMasks(masked),
+    }];
 
     // When using Portage site configs inside the chroot, we need to override
     // the PKGDIR, PORTAGE_TMPDIR, and PORT_LOGDIR that are defined in
diff --git a/portage/bin/build_package/build_package.sh b/portage/bin/build_package/build_package.sh
index 8980cd4..f52a80d 100755
--- a/portage/bin/build_package/build_package.sh
+++ b/portage/bin/build_package/build_package.sh
@@ -8,10 +8,6 @@
 export PORTAGE_CONFIGROOT="${ROOT}"
 
 if [[ -d /home/root/chrome_root/src/third_party/depot_tools ]]; then
-  # The src tarball has already had the hooks ran, so no need to run it in the
-  # ebuild. It also won't run in the ebuild since the hooks need to access
-  # the network.
-  export USE="-runhooks ${USE}"
   # Use the CIPD cache provided by the tarball to avoid network access.
   export CIPD_CACHE_DIR="/home/root/chrome_root/.cipd-cache"
 
diff --git a/portage/bin/xpaktool/src/validate_package.rs b/portage/bin/xpaktool/src/validate_package.rs
index 1c37e4d..024c6dd 100644
--- a/portage/bin/xpaktool/src/validate_package.rs
+++ b/portage/bin/xpaktool/src/validate_package.rs
@@ -172,32 +172,24 @@
             .collect();
 
         if actual_use_flags != expected_use_flags {
-            let is_chromeos_chrome = package
-                .category_pf()
-                .starts_with("chromeos-base/chromeos-chrome");
-
-            // Ignore USE flag mismatch for chromeos-chrome.
-            // We add "-runhooks" for it, but the prebuilt doesn't have it.
-            if !is_chromeos_chrome {
-                report(format_args!(
-                    "\n* USE Flag mismatch!\n  \
-                    Expected USE: {}\n  \
-                    Actual USE: {}\n  \
-                    Extra flags: {}\n  \
-                    Missing flags: {}\n  \
-                    ",
-                    expected_use_flags.iter().sorted().join(", "),
-                    actual_use_flags.iter().sorted().join(", "),
-                    actual_use_flags
-                        .difference(&expected_use_flags)
-                        .sorted()
-                        .join(", "),
-                    expected_use_flags
-                        .difference(&actual_use_flags)
-                        .sorted()
-                        .join(", "),
-                ))?;
-            }
+            report(format_args!(
+                "\n* USE Flag mismatch!\n  \
+                Expected USE: {}\n  \
+                Actual USE: {}\n  \
+                Extra flags: {}\n  \
+                Missing flags: {}\n  \
+                ",
+                expected_use_flags.iter().sorted().join(", "),
+                actual_use_flags.iter().sorted().join(", "),
+                actual_use_flags
+                    .difference(&expected_use_flags)
+                    .sorted()
+                    .join(", "),
+                expected_use_flags
+                    .difference(&actual_use_flags)
+                    .sorted()
+                    .join(", "),
+            ))?;
         }
 
         let actual_iuse_effective_flags = extract_iuse_effective_flags(&package)?;