def _package_to_str(package):
    """
    Represent a package tuple with a string hash.

    Example: in: Package('mesa-libwayland-egl-devel', 'rhel7-optional', ('wayland', '4.2'))
             out: 'mesa-libwayland-egl-devel:rhel7-optional:wayland:4.2'
    """
    return '{n}:{ms}:{r}'.format(n=package.name,
                                 r=package.repository,
                                 ms=':'.join(package.modulestream) if package.modulestream else 'None')