def parse_package_status(release, package, status_text, filepath):
    """
    parse ubuntu package status string format:
          <status code> (<version/notes>)
    :return: dict where
          'status'        : '<not-applicable | unknown | vulnerable | fixed>',
          'fix-version'   : '<version with issue fixed, if applicable>'
    """

    # break out status code and detail
    status_sections = status_text.strip().split(' ', 1)
    code = status_sections[0].strip().lower()
    detail = status_sections[1].strip('()') if len(status_sections) > 1 else None

    status = 'unknown'
    fix_version = None

    if code == 'dne':
        status = 'not-applicable'
    elif code in ['ignored', 'pending', 'deferred', 'needed', 'needs-triage']:
        status = 'vulnerable'
    elif code == 'not-affected':
        status = 'not-vulnerable'
    elif code in ['released', 'released-esm']:
        # if there isn't a release version, then just mark
        # as vulnerable to test for package existence
        if not detail:
            status = 'vulnerable'
        else:
            status = 'fixed'
            fix_version = detail
    else:
        print('Unsupported status "{0}" in {1}_{2} in "{3}". Setting to "unknown".'
              .format(code, release, package, filepath))

    result = {'status': status}
    if fix_version is not None:
        result['fix-version'] = fix_version
    return result