Skip to content

Drop environment variables from EPICS base that are too long#87

Open
simon-ess wants to merge 1 commit into
masterfrom
drop_too_long_env_vars
Open

Drop environment variables from EPICS base that are too long#87
simon-ess wants to merge 1 commit into
masterfrom
drop_too_long_env_vars

Conversation

@simon-ess

Copy link
Copy Markdown
Contributor

This is configured in CONFIG_SITE(.local) using the variable IOCSTATS_MAX_ENV_VAR_LENGTH; the default is 40, but a given site should tune it for their own PV prefix needs.

Fixes #86.

@anjohnson my perl isn't particularly great, I wouldn't mind a review from you.

This is configured in CONFIG_SITE(.local) using the variable
`IOCSTATS_MAX_ENV_VAR_LENGTH`; the default is 40, but a given
site should tune it for their own PV prefix needs.
@simon-ess

Copy link
Copy Markdown
Contributor Author

"Fixes" the (closed) PR on EPICS base: epics-base/epics-base#885

if ($opt_l) {
$max_length = $opt_l;
} else {
$max_length = 15;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

15 seems arbitrary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite right. It's also overriddent by a CONFIG_SITE variable anyhow...

print STDERR "Warning: Variable $_ is potentially too long for a ";
print STDERR "PV name given a typical prefix. Skipping.\n";
next
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO a build failure would be better than having a truncated PV name by mistake. But this works also.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point here is that we skip anything that's too long, we don't truncate those PVs. This relates to the fact that there is a variable from EPICS base that is annoyingly long, see #86. So we should not fail, but warn and move on.

@lucmaga

lucmaga commented Jun 22, 2026

Copy link
Copy Markdown

LGTM.

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.

Configuration variables that are too long still cause problems

2 participants