def METHOD_NAME(builddir, xml, cross):
    if cross:
        pbuilder_hook_dir = os.path.join(builddir, "pbuilder_cross", "hooks.d")
    else:
        pbuilder_hook_dir = os.path.join(builddir, "pbuilder", "hooks.d")
    with open(os.path.join(pbuilder_hook_dir, "H10elbe_apt_update"), "w") as f:
        f.write("#!/bin/sh\napt update\n")
    with open(os.path.join(pbuilder_hook_dir, "G10elbe_apt_sources"), "w") as f:
        local_http = f"deb http://127.0.0.1:8080{builddir}/repo {xml.prj.text('suite')} main\n"
        mirrors = xml.create_apt_sources_list(hostsysroot=cross)
        mirrors = local_http + mirrors
        keys = get_apt_keys(builddir, xml)
        f.write("#!/bin/sh\n")
        # cat reads from stdin (-) and redirect (>) to
        # /etc/apt/sources.list
        f.write(f"cat -> /etc/apt/sources.list <<EOF\n{mirrors}\nEOF\n")
        for key in keys:
            f.write(f"cat << EOF | apt-key add -\n{key}\nEOF\n")
        f.write("apt-get update\n")