def query(port, prop, repo=False):
    """Query q property of a package."""
    args = ("pkg", "rquery" if repo else "query", port.attr["pkgname"])
    if prop == "config":
        args += ("%Ok %Ov",)
    else:
        assert not "unknown package property '%s'" % prop
    return args