llvm_tools: Remove unused patch_metadata_file arg

This argument is not actually used anymore. Technically
it was never actually needed and it was passed in
other ways to the patch_manager.py even before the
refactoring. This just removes it from one function's
arguments.

It's hard to clean the forwarded patch_metadata_file arg
in every situation, so let's just do it for this function
that we introduced.

BUG=None
TEST=./run_tests_for llvm_tools/

Change-Id: I5c3f2a217df082cd51362aa70c8b585ad5135e47
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3780680
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
diff --git a/llvm_tools/modify_a_tryjob.py b/llvm_tools/modify_a_tryjob.py
index cea8106..bed9993 100755
--- a/llvm_tools/modify_a_tryjob.py
+++ b/llvm_tools/modify_a_tryjob.py
@@ -119,7 +119,6 @@
       git_hash,
       svn_version,
       chroot_path,
-      patch_metadata_file,
       failure_modes.FailureModes.DISABLE_PATCHES,
       svn_option,
       extra_commit_msg=None)
diff --git a/llvm_tools/update_chromeos_llvm_hash.py b/llvm_tools/update_chromeos_llvm_hash.py
index fe13f70..8825774 100755
--- a/llvm_tools/update_chromeos_llvm_hash.py
+++ b/llvm_tools/update_chromeos_llvm_hash.py
@@ -467,8 +467,7 @@
 
 
 def UpdatePackages(packages, llvm_variant, git_hash, svn_version,
-                   chroot_path: Path, patch_metadata_file, mode,
-                   git_hash_source, extra_commit_msg):
+                   chroot_path: Path, mode, git_hash_source, extra_commit_msg):
   """Updates an LLVM hash and uprevs the ebuild of the packages.
 
   A temporary repo is created for the changes. The changes are
@@ -480,8 +479,6 @@
     git_hash: The new git hash.
     svn_version: The SVN-style revision number of git_hash.
     chroot_path: The absolute path to the chroot.
-    patch_metadata_file: The name of the .json file in '$FILESDIR/' that has
-    the patches and its metadata.
     mode: The mode of the patch manager when handling an applicable patch
     that failed to apply.
       Ex. 'FailureModes.FAIL'
@@ -674,7 +671,6 @@
                                git_hash,
                                svn_version,
                                args_output.chroot_path,
-                               args_output.patch_metadata_file,
                                failure_modes.FailureModes(
                                    args_output.failure_mode),
                                git_hash_source,
diff --git a/llvm_tools/update_chromeos_llvm_hash_unittest.py b/llvm_tools/update_chromeos_llvm_hash_unittest.py
index 3587232..d4fbfb2 100755
--- a/llvm_tools/update_chromeos_llvm_hash_unittest.py
+++ b/llvm_tools/update_chromeos_llvm_hash_unittest.py
@@ -654,7 +654,6 @@
     git_hash = 'a123testhash4'
     svn_version = 1000
     chroot_path = Path('/some/path/to/chroot')
-    patch_metadata_file = 'PATCHES.json'
     git_hash_source = 'google3'
     branch = 'update-LLVM_NEXT_HASH-a123testhash4'
     extra_commit_msg = None
@@ -664,8 +663,7 @@
     with self.assertRaises(ValueError) as err:
       update_chromeos_llvm_hash.UpdatePackages(
           packages_to_update, llvm_variant, git_hash, svn_version, chroot_path,
-          patch_metadata_file, failure_modes.FailureModes.FAIL,
-          git_hash_source, extra_commit_msg)
+          failure_modes.FailureModes.FAIL, git_hash_source, extra_commit_msg)
 
     self.assertEqual(str(err.exception), 'Failed to uprev the ebuild.')
 
@@ -733,10 +731,10 @@
 
       self.assertEqual(chroot_path, Path('/some/path/to/chroot'))
       self.assertEqual(svn_version, 1000)
-      self.assertEqual(patch_metadata_file, 'PATCHES.json')
       self.assertListEqual(packages, ['path/to'])
       self.assertEqual(mode, failure_modes.FailureModes.DISABLE_PATCHES)
 
+      patch_metadata_file = 'PATCHES.json'
       PatchInfo = collections.namedtuple('PatchInfo', [
           'applied_patches', 'failed_patches', 'non_applicable_patches',
           'disabled_patches', 'removed_patches', 'modified_metadata'
@@ -786,7 +784,6 @@
     llvm_variant = update_chromeos_llvm_hash.LLVMVariant.next
     git_hash = 'a123testhash5'
     svn_version = 1000
-    patch_metadata_file = 'PATCHES.json'
     chroot_path = Path('/some/path/to/chroot')
     git_hash_source = 'tot'
     branch = 'update-LLVM_NEXT_HASH-a123testhash5'
@@ -794,8 +791,8 @@
 
     change_list = update_chromeos_llvm_hash.UpdatePackages(
         packages_to_update, llvm_variant, git_hash, svn_version, chroot_path,
-        patch_metadata_file, failure_modes.FailureModes.DISABLE_PATCHES,
-        git_hash_source, extra_commit_msg)
+        failure_modes.FailureModes.DISABLE_PATCHES, git_hash_source,
+        extra_commit_msg)
 
     self.assertEqual(change_list.url,
                      'https://some_name/path/to/commit/+/12345')
diff --git a/llvm_tools/update_packages_and_run_tests.py b/llvm_tools/update_packages_and_run_tests.py
index 258a395..1d12280 100755
--- a/llvm_tools/update_packages_and_run_tests.py
+++ b/llvm_tools/update_packages_and_run_tests.py
@@ -19,6 +19,7 @@
 import get_llvm_hash
 import update_chromeos_llvm_hash
 
+
 VALID_CQ_TRYBOTS = ['llvm', 'llvm-next', 'llvm-tot']
 
 
@@ -395,8 +396,6 @@
 
   args_output = GetCommandLineArgs()
 
-  patch_metadata_file = 'PATCHES.json'
-
   svn_option = args_output.llvm_version
 
   git_hash, svn_version = get_llvm_hash.GetLLVMHashAndVersionFromSVNOption(
@@ -442,7 +441,6 @@
       git_hash,
       svn_version,
       args_output.chroot_path,
-      patch_metadata_file,
       failure_modes.FailureModes.DISABLE_PATCHES,
       svn_option,
       extra_commit_msg=extra_commit_msg)