Improve warning in is_valid_os_version(): explain worst-case

Open Beginner friendly
#2,744 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
84/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
c

Research direction

Open libpkg/utils.c at is_valid_os_version(), especially the warning near line 476, and review the current message. Update the warning so it explains the worst-case ABI risk for /usr/local while retaining the version details and ignore guidance. Done means users can understand the possible impact of proceeding from the warning alone.

Written by the indexing model from the issue text.

Description

Hi,
I would suggest for libpkg/utils.c to extend the warning text (e.g. with a worst-case scenario hint).

Example

Newer FreeBSD version for package foo:
This package was built for a newer ABI than the one currently running.
Installing/using it may cause shared libraries to be unresolvable.
advice: update your kernel
- package: 1501501
- running kernel: 1500507
To ignore this error set IGNORE_OSVERSION=yes

is_valid_os_version() warns when a package's FreeBSD_version is newer than the running system's ABI version, but the message currently only states the version numbers involved

For users unfamiliar with FreeBSD's ABI versioning scheme, this doesn't convey the actual risk of proceeding (or of having already installed such a package). In practice, a mismatch like this can mean that shared libraries under /usr/local/lib are no longer ABI-compatible, causing binaries that depend on them to fail to run — up to the point where large parts of /usr/local stop working.

Dominant language
C
Stars
826
Forks
310
Avg merge
6d 17h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from freebsd/pkg

All issues in freebsd/pkg

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.