code: def unpack(container, path):
      
      from benchbuild.utils.run import run
      from benchbuild.utils.uchroot import no_args
  
      path = local.path(path)
      c_filename = local.path(container.filename)
      name = c_filename.basename
  
      if not path.exists():
          path.mkdir()
  
      with local.cwd(path):
          Wget(container.remote, name)
  
          uchroot = no_args()
          uchroot = uchroot["-E", "-A", "-C", "-r", "/", "-w",
                            os.path.abspath("."), "--"]
  
          # Check, if we need erlent support for this archive.
          has_erlent = bash[
              "-c", "tar --list -f './{0}' | grep --silent '.erlent'".format(
                  name)]
          has_erlent = (has_erlent & TF)
  
          untar = local["/bin/tar"]["xf", "./" + name]
          if not has_erlent:
              untar = uchroot[untar]
  
          run(untar["--exclude=dev/*"])
          if not os.path.samefile(name, container.filename):
              rm(name)
          else:
              LOG.warning("File contents do not match: %s != %s", name,
                          container.filename)
          cp(container.filename + ".hash", path)
docs: Unpack a container usable by uchroot.
  
      Method that checks if a directory for the container exists,
      checks if erlent support is needed and then unpacks the
      container accordingly.
  
      Args:
          path: The location where the container is, that needs to be unpacked.