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
debian-patches.sh: clean up maintainer script #23759
Conversation
Set correct interpreter, fix quoting
Looks like the tracker url was replaced by: https://tracker.debian.org/pkg/patch |
@@ -1,17 +1,17 @@ | |||
#!/bin/sh | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think right now our setup is to have mandatory /bin/sh
but optional /ur/bin/env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shell script uses features outside of POSIX sh. Specifically, these are bash features.
url="${prefix}/${deb_patches[$i]}" | ||
sha256=$(nix-prefetch-url $url) | ||
echo " {" | ||
url=${prefix}/${deb_patches[$i]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why unquote here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the quotes are redundant.
echo " url = \"\${prefix}/${deb_patches[$i]}\";" | ||
echo " sha256 = \"$sha256\";" | ||
echo " }" | ||
echo ' }' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you want to change the quote type here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's a constant.
I am not a fitting reviewer for these changes, I find the result harder to read. Some non-purely-cosmetical catches are useful, though. Convenient GitHub interface doesn't let me to dismiss my change request as obsolete… |
Set correct interpreter, fix quoting
Motivation for this change
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)