Skip to content

packagesite.yaml's format and file extension doesn't match #1250

@mchoo7

Description

@mchoo7

Prerequisites

  • Have you checked for an existing issue describing your problem?
  • Are you running the latest version?
  • Is your ports tree recent?
  • Is your FreeBSD Host on a supported release?

Describe the bug

packagesite.yaml is not in YAML, but in a broken JSON format. I don't know whether this problem was introduced by technical debt or not, but this makes parsing package metadata extremely difficult for third-party projects, including FreeBSD package dashboard.

How to reproduce

Simply unzip packagesite.tzst and open packagesite.yaml. You'll see it's not a YAML but a broken JSON.

Expected behavior

  1. Rename packagesite.yaml to packagesite (without no file extension) to reduce confusion.
  2. Use jq for packagesite.json in a valid JSON format, so third party projects can parse package metadata.

The first one is a non-breaking change until we stop producing packagesite.yaml (we can leave this as a symlink). The second one adds extra dependency for jq, but we can make this json output option configurable in config file, as some people don't need it at all.

Additional context

I'm willing to implement this task when this issue is approved to do so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions