def METHOD_NAME(self, req: InstallRequirement) -> None:
    """Add an InstallRequirement to build tracking."""
    assert req.link
    # Get the file to write information about this requirement.
    entry_path = self._entry_path(req.link)
    # Try reading from the file. If it exists and can be read from, a build
    # is already in progress, so a LookupError is raised.
    try:
        with open(entry_path) as fp:
            contents = fp.read()
    except FileNotFoundError:
        pass
    else:
        message = "{} is already being built: {}".format(req.link, contents)
        raise LookupError(message)
    # If we're here, req should really not be building already.
    assert req not in self._entries
    # Start tracking this requirement.
    with open(entry_path, "w", encoding="utf-8") as fp:
        fp.write(str(req))
    self._entries.METHOD_NAME(req)
    logger.debug("Added %s to build tracker %r", req, self._root)