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

parallel: fix calculation of max line length #101472

Merged
merged 1 commit into from Oct 24, 2020

Conversation

bjornfor
Copy link
Contributor

Motivation for this change

parallel >= 20200822 uses /bin/echo to calculate the max allowed line
length. Patch it to a correct path, so that it doesn't (silently) fail
and fall back to a low value of 324.

Before:
$ parallel --max-line-length-allowed
324

After:
$ parallel --max-line-length-allowed
131063

Fixes: 16ca872 ("parallel: 20200722 -> 20200822")

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

parallel >= 20200822 uses /bin/echo to calculate the max allowed line
length. Patch it to a correct path, so that it doesn't (silently) fail
and fall back to a low value of 324.

Before:
  $ parallel --max-line-length-allowed
  324

After:
  $ parallel --max-line-length-allowed
  131063

Fixes: 16ca872 ("parallel: 20200722 -> 20200822")
@ajs124
Copy link
Member

ajs124 commented Oct 23, 2020

This could probably be a replace without a patch, but I can confirm that I've run into this, as well.

@bjornfor
Copy link
Contributor Author

Rationale: I chose to use a patch so that when this file changes in the future we are more likely to get a build error than runtime error.

@bjornfor
Copy link
Contributor Author

I sent an email about this to bug-parallel@gnu.org.

@bjornfor
Copy link
Contributor Author

Oh, and there are multiple hits for "/bin/echo" in the code base, but the remaining ones are only in the test suite. I guess we could mass-replace "/bin/echo", but I'm not feeling like it.

@tomberek
Copy link
Contributor

Result of nixpkgs-review pr 101472 1

9 packages built:
  • adapta-gtk-theme
  • image_optim
  • jpeg-archive
  • last
  • parallel
  • parallel-full
  • plata-theme
  • profile-cleaner
  • tebreak

@bjornfor bjornfor merged commit 3d4e133 into NixOS:master Oct 24, 2020
@bjornfor
Copy link
Contributor Author

Thanks, @tomberek!

@bjornfor bjornfor deleted the parallel-fix-max-line-length branch October 24, 2020 08:05
@bjornfor
Copy link
Contributor Author

I ran nixpkgs-review on release-20.09 (success) and backported in 95d26c9.

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

Successfully merging this pull request may close these issues.

None yet

3 participants