def filtered_packageversion(version, revision):
    """ Emit "version-revision" if version and revision are not null
        else "version" if version is not null
        else ""
    """
    return "" if (not version or version == "") else version if (not revision or revision == "") else version + "-" + revision