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

debian-patches.sh: clean up maintainer script #23759

Closed
wants to merge 2 commits into from

Conversation

butterflya
Copy link
Contributor

Set correct interpreter, fix quoting

Motivation for this change
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

butterflya and others added 2 commits March 11, 2017 17:45
@Mic92
Copy link
Member

Mic92 commented Mar 12, 2017

Looks like the tracker url was replaced by: https://tracker.debian.org/pkg/patch

@@ -1,17 +1,17 @@
#!/bin/sh
#!/usr/bin/env bash
Copy link
Member

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

Copy link
Contributor Author

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]}
Copy link
Member

Choose a reason for hiding this comment

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

Why unquote here?

Copy link
Contributor Author

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 ' }'
Copy link
Member

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?

Copy link
Contributor Author

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.

@7c6f434c
Copy link
Member

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…

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

6 participants