def METHOD_NAME(project, scope: str):
    try:
        self.tool.reset()
        self.tool.dry_run = self.options.dry
        return self.tool.update_and_solve_target(api, target_project, target_config, main_repo,
                                                 project=project, scope=scope, force=opts.force,
                                                 no_checkout=opts.no_checkout,
                                                 only_release_packages=opts.only_release_packages,
                                                 stop_after_solve=opts.stop_after_solve)
    except MismatchedRepoException:
        logging.error("Failed to create weakremovers.inc due to mismatch in repos - project most likey started building again.")
        # for stagings we have to be strict on the exit value
        if scope == 'staging':
            return 1
        return 0