Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONTRIBUTING.md: remove incorrect info about PKG_VERSION #24971

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wehagy
Copy link
Contributor

@wehagy wehagy commented Sep 14, 2024

Description

The documentation stated that PKG_VERSION is the OpenWrt version and therefore includes the PKG_RELEASE, but this statement was incorrect and has been removed to avoid confusion.

Motivation and Context

Recently I have done a test commit 22e430c for netbird package, to write this I see others examples and read:

packages/CONTRIBUTING.md

Lines 200 to 205 in 86ad54b

Makefile. The script is executed with the two arguments `PKG_NAME` and
`PKG_VERSION`. The `PKG_NAME` can be used to distinguish package variants, e.g.
`foobar` vs. `foobar-full`. The `PKG_VERSION` can be used for a trivial test
checking if `foobar --version` prints the correct version. `PKG_VERSION` is the
OpenWrt version and therefore includes the `PKG_RELEASE`, which isn't usually
part of the running programs version.

The confusion is, the user can use PKG_VERSION to test the version of program, but at same time PKG_VERSION includes PKG_RELEASE and can't be used to test version?

Let's see how the contributors write their tests:

yq --version 2>&1 | grep "$PKG_VERSION"

sscep | grep -q "$PKG_VERSION"

v2raya --version | grep "$PKG_VERSION"

To be sure I dive in a little bit and see this:

# package version without release
PKG_VERSION=$(sed -ne 's#^Version: \(.*\)$#\1#p' ./control)
PKG_VERSION="${PKG_VERSION%-[!-]*}"

The documentation stated that `PKG_VERSION` is the OpenWrt version
and therefore includes the `PKG_RELEASE`, but this statement
was incorrect and has been removed to avoid confusion.

Signed-off-by: Wesley Gimenes <[email protected]>
@wehagy wehagy force-pushed the docs/fix-incorrect-information branch from ff70a6b to 82008eb Compare September 14, 2024 00:34
@wehagy
Copy link
Contributor Author

wehagy commented Sep 14, 2024

Have some way to disable build test for things like this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant