prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  MD5 checking argument not passed to update_index
  I was happy to see that there was a `-c` argument to `conda index` which forces it to use md5 hashes instead of file modification times. However, looks like `main_index.py` never passes that argument on to the `update_index()` function, i.e., 
  
  ``` python
  ...
  update_index(path, verbose=(not args.quiet), force=args.force)
  ...
  ```
  
  should actually be:
  
  ``` python
  ...
  update_index(path, verbose=(not args.quiet), force=args.force, check_md5=args.check_md5)
  ...
  ```
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `conda_build/main_index.py`
  Content:
  ```
  1 from __future__ import absolute_import, division, print_function
  2 
  3 import argparse
  4 import os
  5 from locale import getpreferredencoding
  6 from os.path import abspath
  7 
  8 from conda.compat import PY3
  9 
  10 from conda_build.index import update_index
  11 
  12 
  13 def main():
  14     p = argparse.ArgumentParser(
  15         description="Update package index metadata files in given directories")
  16 
  17     p.add_argument('dir',
  18                    help='Directory that contains an index to be updated.',
  19                    nargs='*',
  20                    default=[os.getcwd()])
  21 
  22     p.add_argument('-c', "--check-md5",
  23                    action="store_true",
  24                    help="Use MD5 values instead of file modification times for\
  25                          determining if a package's metadata needs to be \
  26                          updated.")
  27 
  28     p.add_argument('-f', "--force",
  29                    action="store_true",
  30                    help="force reading all files")
  31 
  32     p.add_argument('-q', "--quiet",
  33                    action="store_true")
  34 
  35     args = p.parse_args()
  36 
  37     dir_paths = [abspath(path) for path in args.dir]
  38     # Don't use byte strings in Python 2
  39     if not PY3:
  40         dir_paths = [path.decode(getpreferredencoding()) for path in dir_paths]
  41 
  42     for path in dir_paths:
  43         update_index(path, verbose=(not args.quiet), force=args.force)
  44 
  45 
  46 if __name__ == '__main__':
  47     main()
  48
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/conda_build/main_index.py b/conda_build/main_index.py
  --- a/conda_build/main_index.py
  +++ b/conda_build/main_index.py
  @@ -40,7 +40,7 @@
           dir_paths = [path.decode(getpreferredencoding()) for path in dir_paths]
   
       for path in dir_paths:
  -        update_index(path, verbose=(not args.quiet), force=args.force)
  +        update_index(path, verbose=(not args.quiet), force=args.force, check_md5=args.check_md5)
   
   
   if __name__ == '__main__':
  
verification_info: {"golden_diff": "diff --git a/conda_build/main_index.py b/conda_build/main_index.py\n--- a/conda_build/main_index.py\n+++ b/conda_build/main_index.py\n@@ -40,7 +40,7 @@\n         dir_paths = [path.decode(getpreferredencoding()) for path in dir_paths]\n \n     for path in dir_paths:\n-        update_index(path, verbose=(not args.quiet), force=args.force)\n+        update_index(path, verbose=(not args.quiet), force=args.force, check_md5=args.check_md5)\n \n \n if __name__ == '__main__':\n", "issue": "MD5 checking argument not passed to update_index\nI was happy to see that there was a `-c` argument to `conda index` which forces it to use md5 hashes instead of file modification times. However, looks like `main_index.py` never passes that argument on to the `update_index()` function, i.e., \n\n``` python\n...\nupdate_index(path, verbose=(not args.quiet), force=args.force)\n...\n```\n\nshould actually be:\n\n``` python\n...\nupdate_index(path, verbose=(not args.quiet), force=args.force, check_md5=args.check_md5)\n...\n```\n\n", "before_files": [{"content": "from __future__ import absolute_import, division, print_function\n\nimport argparse\nimport os\nfrom locale import getpreferredencoding\nfrom os.path import abspath\n\nfrom conda.compat import PY3\n\nfrom conda_build.index import update_index\n\n\ndef main():\n    p = argparse.ArgumentParser(\n        description=\"Update package index metadata files in given directories\")\n\n    p.add_argument('dir',\n                   help='Directory that contains an index to be updated.',\n                   nargs='*',\n                   default=[os.getcwd()])\n\n    p.add_argument('-c', \"--check-md5\",\n                   action=\"store_true\",\n                   help=\"Use MD5 values instead of file modification times for\\\n                         determining if a package's metadata needs to be \\\n                         updated.\")\n\n    p.add_argument('-f', \"--force\",\n                   action=\"store_true\",\n                   help=\"force reading all files\")\n\n    p.add_argument('-q', \"--quiet\",\n                   action=\"store_true\")\n\n    args = p.parse_args()\n\n    dir_paths = [abspath(path) for path in args.dir]\n    # Don't use byte strings in Python 2\n    if not PY3:\n        dir_paths = [path.decode(getpreferredencoding()) for path in dir_paths]\n\n    for path in dir_paths:\n        update_index(path, verbose=(not args.quiet), force=args.force)\n\n\nif __name__ == '__main__':\n    main()\n", "path": "conda_build/main_index.py"}], "after_files": [{"content": "from __future__ import absolute_import, division, print_function\n\nimport argparse\nimport os\nfrom locale import getpreferredencoding\nfrom os.path import abspath\n\nfrom conda.compat import PY3\n\nfrom conda_build.index import update_index\n\n\ndef main():\n    p = argparse.ArgumentParser(\n        description=\"Update package index metadata files in given directories\")\n\n    p.add_argument('dir',\n                   help='Directory that contains an index to be updated.',\n                   nargs='*',\n                   default=[os.getcwd()])\n\n    p.add_argument('-c', \"--check-md5\",\n                   action=\"store_true\",\n                   help=\"Use MD5 values instead of file modification times for\\\n                         determining if a package's metadata needs to be \\\n                         updated.\")\n\n    p.add_argument('-f', \"--force\",\n                   action=\"store_true\",\n                   help=\"force reading all files\")\n\n    p.add_argument('-q', \"--quiet\",\n                   action=\"store_true\")\n\n    args = p.parse_args()\n\n    dir_paths = [abspath(path) for path in args.dir]\n    # Don't use byte strings in Python 2\n    if not PY3:\n        dir_paths = [path.decode(getpreferredencoding()) for path in dir_paths]\n\n    for path in dir_paths:\n        update_index(path, verbose=(not args.quiet), force=args.force, check_md5=args.check_md5)\n\n\nif __name__ == '__main__':\n    main()\n", "path": "conda_build/main_index.py"}]}