Skip to content

Convert custom hacks to well defined DB Fields #4

@Azathothas

Description

@Azathothas

Due to some shortsightedness, the metadata isn't rich enough to provide all information needed by soar, especially as new formats & mechanisms of delivery (tar bundles) are introduced over time.
The metadata can indeed be made rich, but it will no longer be compatible with our old packages because we generate the metadata at build time.
This would break all old packages and snapshots.

A somewhat cleaner, not necessarily better solution is to make use of notes, since this can be adjusted post build and doesn't need us to rebuild our packages.
We already do one for,

  • [NO_DESKTOP_INTEGRATION]
"note": [
      "[NO_DESKTOP_INTEGRATION] (Does not need desktop integration)"

Warning

This needs to be set to true or 1 for all packages in bincache as they will not contain this note, but is implied.

And some proposals for others:

  • [BUNDLE]: (only if pkg_type == archive) treat the download_url or main ghcr_blob as tar (or tar.xz, tar.zstd) bundle (that contain SOAR_SYMS inside)
"note": [
    "[BUNDLE] (This is a tar.zstd bundle with SOAR_SYMS)"
  • [DEPRECATED]: Implies this pkg/repo is now deprecated i.e archived/abandoned etc. Usually these pkgs are slowly replaced with another alternative.

  • [NO_BUNDLE]: (only if pkg_type == archive) treat the download_url or main ghcr_blob as tar (or tar.xz, tar.zstd) bundle (that contain only executables inside)

    "note": [
      "[NO_BUNDLE] (This is an archive only with no SOAR_SYMS)",
  • [NO_INSTALL]: treat the package as download only i.e no symlink in SOAR_BIN or any other installation process, simply just soar dl

  • [NO_RECURSE_PROVIDES]: treat provides as seprate/additional pkg unless symlink with the main pkg itself. If it's not provided, then it's assumed, provides needs to be recursed or extracted (if bundle)

Warning

This needs to be set to true or 1 for all packages in both bincache /pkgcache as they will not contain this note, but is implied.

If these are fine, then it will be added as part of spec for https://docs.pkgforge.dev/sbuild/specification/15.note and will apply for any repository globally

Some that already exists:

    "note": [
      "[PORTABLE] (Works on AnyLinux)"
  • [EXTERNAL] : to mark a repository as an external repo (enabled by soar defconfig --external)
  "note": [
    "[EXTERNAL] (This is an unofficial, third-party repository)",
  • [UNTRUSTED]: Implies an untrusted repo or package, this is true for all our external repos, except for cargo-bins
  "note": [
    "[UNTRUSTED] (We CAN NOT guarantee the authenticity, validity or security)",

And lastly, when using soar query or install etc, these lines from the notes need to be hidden as they will bloat the install msg also

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentationenhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions