The original search pattern from-pr in the second grep returns the following:
[nessibot@login1 ~]$ grep ^+ /project/def-nessi/SHARED/jobs/2024.04/pr_301/9129/301.diff | grep from-pr
+ # Find lines that are added and use from-pr, make them unique, grab the
+ pr_exceptions=$(grep ^+ $2 | grep from-pr | uniq | awk '{print $3}' | xargs -i echo " || /'{}'/")
+ # We might have failed due to unmerged PRs. Try to make exceptions for --from-pr added in this PR
+ # Note that if no --from-pr's were used in this PR, $pr_exceptions will be empty and we might as
+ awk_command="awk '\!/'from-pr'/ EXCEPTIONS' $easystack"
+ msg="${msg} allowing for --from-pr's that were added in this PR..."
+ # If now we succeeded, the reason must be that we originally stripped the --from-pr's
+ from-pr: 20308
With this the full command to determine the pr_exceptions (in check_missing_installations.sh) returns:
[nessibot@login1 ~]$ grep ^+ /project/def-nessi/SHARED/jobs/2024.04/pr_301/9129/301.diff | grep from-pr | uniq | awk '{print $3}' | xargs -i echo " || /'{}'/"
|| /'Find'/
|| /'^+'/
|| /'We'/
|| /'Note'/
xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option
After modifying the search pattern to from-pr: in the second grep, we get the following
Ran into the issue in https://github.com/NorESSI/software-layer/pull/301 which tests the changes implemented in https://github.com/EESSI/software-layer/pull/494 Particularly, the https://github.com/NorESSI/software-layer/pull/301 includes several comments which contain the string
from-pr
in addition to the optionfrom-pr
in an easystack file. A simple fix seems to be to slightly modify the search pattern tofrom-pr:
in the secondgrep
. See example runs below.The original search pattern
from-pr
in the secondgrep
returns the following:With this the full command to determine the
pr_exceptions
(incheck_missing_installations.sh
) returns:After modifying the search pattern to
from-pr:
in the second grep, we get the followingand the full command returns