Fix parallel is not GNU #42

Merged
stefano merged 1 commit from Iam_Tj/BSSG:fix-parallel_is_not_GNU into main 2025-11-18 09:48:19 +01:00
Contributor

Whilst testing I hit this:

$ ./bssg.sh build
...
Pass 2: Processing posts...
Found 1 posts needing processing out of 1 (Skipped: 0).
Using GNU parallel to process 1 posts
PARALLEL --jobs 16 --will-cite process_single_file_for_rebuild {}
/usr/bin/parallel: invalid option -- '-'
parallel [OPTIONS] command -- arguments
        for each argument, run command with argument, in parallel
parallel [OPTIONS] -- commands
        run specified commands in parallel
Parallel post processing failed.

BSSG reports "Using GNU parallel" but this is incorrect. In this case it is parallel from moreutils:

$ dpkg -S bin/parallel
moreutils: /usr/bin/parallel

In the above PARALLEL --jobs 16 --will-cite process_single_file_for_rebuild {} is added by a debug interceptor script /usr/local/bin/parallel to see what arguments were passed:

$ cat /usr/local/bin/parallel
#!/usr/bin/env bash

>&2 echo "PARALLEL" "$@"
exec /usr/bin/parallel "$@"

With this commit it now does (with moreutils):

$ ./bssg.sh build
...
Checking dependencies...
GNU parallel not found. Using sequential processing.
All dependencies satisfied!

And with GNU:

$ ./bssg.sh build
...
Checking dependencies...
GNU parallel found! Using parallel processing.
All dependencies satisfied!
Whilst testing I hit this: ``` $ ./bssg.sh build ... Pass 2: Processing posts... Found 1 posts needing processing out of 1 (Skipped: 0). Using GNU parallel to process 1 posts PARALLEL --jobs 16 --will-cite process_single_file_for_rebuild {} /usr/bin/parallel: invalid option -- '-' parallel [OPTIONS] command -- arguments for each argument, run command with argument, in parallel parallel [OPTIONS] -- commands run specified commands in parallel Parallel post processing failed. ``` BSSG reports "Using GNU parallel" but this is incorrect. In this case it is `parallel` from moreutils: ``` $ dpkg -S bin/parallel moreutils: /usr/bin/parallel ``` In the above `PARALLEL --jobs 16 --will-cite process_single_file_for_rebuild {}` is added by a debug interceptor script `/usr/local/bin/parallel` to see what arguments were passed: ``` $ cat /usr/local/bin/parallel #!/usr/bin/env bash >&2 echo "PARALLEL" "$@" exec /usr/bin/parallel "$@" ``` With this commit it now does (with moreutils): ``` $ ./bssg.sh build ... Checking dependencies... GNU parallel not found. Using sequential processing. All dependencies satisfied! ``` And with GNU: ``` $ ./bssg.sh build ... Checking dependencies... GNU parallel found! Using parallel processing. All dependencies satisfied! ```
Iam_Tj force-pushed fix-parallel_is_not_GNU from dfbd5a35b9 to c252f106c8 2025-10-13 22:55:28 +02:00 Compare
stefano merged commit b5e1888d7a into main 2025-11-18 09:48:19 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: stefano/BSSG#42
No description provided.