prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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)
  ...
  ```
  
  
  </issue>
  <code>
  [start of conda_build/main_index.py]
  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 of conda_build/main_index.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
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"}]}