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

nilrt.inc: Change PACKAGE_FEED_* to default assignment #752

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

Conversation

rtollert
Copy link
Contributor

Locally-hosted package repositories are a longstanding NI Linux RT development pattern. While these can be trivially configured in /etc/opkg/ after installation, being able to customize the feed URLs in the base system image itself unlocks some unique automation possibilities.

While nilrt/scripts/tests/test_nilrt-ptest.py presently implements a feed server (and rewriting the post-install opkg configuration accordingly), its implementation is tightly coupled to the needs of ptest execution. Instead, the nominal way to accomplish this should be in site.conf: set PACKAGE_FEED_URIS to point at the local server, and clear out PACKAGE_FEED_BASE_PATHS, because the "extra/" and "main/" subdirectory distinction does not exist at the level of developer bitbake runs, nor arguably should it.

That's not presently possible because PACAKGE_FEED_URIS and PACKAGE_FEED_BASE_PATHS are assigned in the usual way (=) in nilrt.inc, overriding anything set in nilrt.inc. If we change nilrt.inc to only set default values, i.e. ?=, then customizing them in site.conf works. Note that almost all other variables in nilrt.inc are already default-assigned.

PACKAGE_FEED_ARCHS does not need to be customizing for this use case, but is also changed to default assignment for reasons of consistency.

Procedure

Locally-hosted package repositories are a longstanding NI Linux RT development
pattern. While these can be trivially configured in /etc/opkg/ after
installation, being able to customize the feed URLs in the base system image
itself unlocks some unique automation possibilities.

While nilrt/scripts/tests/test_nilrt-ptest.py presently implements a feed
server (and rewriting the post-install opkg configuration accordingly), its
implementation is tightly coupled to the needs of ptest execution. Instead, the
nominal way to accomplish this should be in site.conf: set PACKAGE_FEED_URIS to
point at the local server, and clear out PACKAGE_FEED_BASE_PATHS, because the
"extra/" and "main/" subdirectory distinction does not exist at the level of
developer bitbake runs, nor arguably should it.

That's not presently possible because PACAKGE_FEED_URIS and
PACKAGE_FEED_BASE_PATHS are assigned in the usual way (`=`) in nilrt.inc,
overriding anything set in nilrt.inc. If we change nilrt.inc to only set default
values, i.e. `?=`, then customizing them in site.conf works. Note that almost
all other variables in nilrt.inc are already default-assigned.

PACKAGE_FEED_ARCHS does not need to be customizing for this use case, but is
also changed to default assignment for reasons of consistency.

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
@amstewart
Copy link
Contributor

amstewart commented Oct 15, 2024

Looking at this some more, I wonder if your approach to overriding the feed URI only failed because you were attempting to assign to the x64 machine-override for PACKAGE_FEED_BASE_PATHS.

Does it instead satisfy your usecase to override the NILRT_FEEDS_URI_RELEASE in your local.conf/site.conf? If so, I think we should recommend that users use that approach.

@amstewart amstewart requested a review from a team October 15, 2024 19:32
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.

2 participants