Repository navigation
guix, refactor: Minor script cleanups and improvements - #35131
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35131. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
| @@ -0,0 +1,29 @@ | |||
| #!/usr/bin/env bash | |||
| export LC_ALL=C | |||
| set -e -o pipefail | |||
There was a problem hiding this comment.
style nit: My preference would be to use the long self-explanatory form. Also, is there a reason to tolerate unset? I.e. set -o errexit -o pipefail -o nounset, possibly with -o xtrace, but that may be more verbose. Just a style-nit/question, so feel free to ignore.
There was a problem hiding this comment.
style nit: My preference would be to use the long self-explanatory form.
Thanks! Taken.
Not using -o nounset, as it proliferates to the parent script and breaks it.
93e0dd4 to
dead33f
Compare
dead33f to
9496c44
Compare
|
My Guix build: |
My Guix Build OutputHost architecture: Matches : hebasto's b3fe990939c2c9da54cbfe983354236021a4839050797195fdcbe0131a24de73 guix-build-9496c44e2720/output/aarch64-linux-gnu/SHA256SUMS.part
a98d0f282a41856af2d9413749b6623d94e8c8d13d87083f918e07e451e7b72d guix-build-9496c44e2720/output/aarch64-linux-gnu/bitcoin-9496c44e2720-aarch64-linux-gnu-debug.tar.gz
7912144c50e341afe53d7c33b4d473666b97117585b334d3843cd47ff8b2da39 guix-build-9496c44e2720/output/aarch64-linux-gnu/bitcoin-9496c44e2720-aarch64-linux-gnu.tar.gz
b1d06da95dbcfeb78ab1d3563dd56e87985cdc46d7094615d19a87e2e3db4a7f guix-build-9496c44e2720/output/arm-linux-gnueabihf/SHA256SUMS.part
1f0b1223af265264d56654f75e165b0b538130d32f48396c8a6818d852f4f6f5 guix-build-9496c44e2720/output/arm-linux-gnueabihf/bitcoin-9496c44e2720-arm-linux-gnueabihf-debug.tar.gz
0ad8f45d25b186af566062deefd8aa8b795ca606020adf2aa2f69d480a34043a guix-build-9496c44e2720/output/arm-linux-gnueabihf/bitcoin-9496c44e2720-arm-linux-gnueabihf.tar.gz
b374c831a4c63fdfd74d95dec2ad7fba0deeba19fed75bc0719aec7c486b2330 guix-build-9496c44e2720/output/arm64-apple-darwin/SHA256SUMS.part
cfa9b5f995d2082b7a8a0d8b2beb106ceff812d83dda186a24919dd1811e5c9e guix-build-9496c44e2720/output/arm64-apple-darwin/bitcoin-9496c44e2720-arm64-apple-darwin-codesigning.tar.gz
b490f6fa87f339714f1def06a8bdf1abae9834c5d1fde698eb49173aa197be5f guix-build-9496c44e2720/output/arm64-apple-darwin/bitcoin-9496c44e2720-arm64-apple-darwin-unsigned.tar.gz
944cc088655eb362d8504e6150bba68d14e7038b604ca4b4d7779bf4d5bdae01 guix-build-9496c44e2720/output/arm64-apple-darwin/bitcoin-9496c44e2720-arm64-apple-darwin-unsigned.zip
4aa527bb00b41480a215a8ae8ac01aeb75ab5e8950494ce17c47104d0d287625 guix-build-9496c44e2720/output/dist-archive/bitcoin-9496c44e2720.tar.gz
09624483b0920e27dee6942d2a4a901257356e0562dfd5e88526a11749a102bd guix-build-9496c44e2720/output/powerpc64-linux-gnu/SHA256SUMS.part
5d1275a33c84f6f1ebd027ff3a210fae305168a09e31688c2610159b4981b76c guix-build-9496c44e2720/output/powerpc64-linux-gnu/bitcoin-9496c44e2720-powerpc64-linux-gnu-debug.tar.gz
3c38b14f2d877c429b9ffa8313679b6022304aecfc1dbe5c57b06a3d9c67f1c9 guix-build-9496c44e2720/output/powerpc64-linux-gnu/bitcoin-9496c44e2720-powerpc64-linux-gnu.tar.gz
a4019ba74e62bcc11c089e5fd4a7c2c4f8d11cbf6ea693c1f19860708374f496 guix-build-9496c44e2720/output/riscv64-linux-gnu/SHA256SUMS.part
94ccab2e4c8af907a043f85d95a3e3615a3a31cc5495e2da41684c46ce2b382c guix-build-9496c44e2720/output/riscv64-linux-gnu/bitcoin-9496c44e2720-riscv64-linux-gnu-debug.tar.gz
979b829d9920f99994589ea3793d82d02c4057b02669cae056222662f7e0a6ff guix-build-9496c44e2720/output/riscv64-linux-gnu/bitcoin-9496c44e2720-riscv64-linux-gnu.tar.gz
0f99750990bdbd423d5c3623453d19537eb8da969bb7f3a38e6ac49bd2aad3d6 guix-build-9496c44e2720/output/x86_64-apple-darwin/SHA256SUMS.part
8ae8c9449c99c262a1b79c44c9dd8ea48ce9643c36df9f778f46cfa13d4816a6 guix-build-9496c44e2720/output/x86_64-apple-darwin/bitcoin-9496c44e2720-x86_64-apple-darwin-codesigning.tar.gz
5bb1c12352146068827edc0cf3bfe90965d146a6806c72e687da5b59c4a270ea guix-build-9496c44e2720/output/x86_64-apple-darwin/bitcoin-9496c44e2720-x86_64-apple-darwin-unsigned.tar.gz
862c54560d702efd70b16e3f81addb24a374e6357d5de54bb8888d5a3230cdb5 guix-build-9496c44e2720/output/x86_64-apple-darwin/bitcoin-9496c44e2720-x86_64-apple-darwin-unsigned.zip
08d8dcf5de4c05a9aa217de429642d0cdf67dbcd0d6c0aea65908a6e83a6b9b8 guix-build-9496c44e2720/output/x86_64-linux-gnu/SHA256SUMS.part
b2facd7d71cc12963ec5491ebca858eed1782ac8682e2c61964bb02c9f6e4ddf guix-build-9496c44e2720/output/x86_64-linux-gnu/bitcoin-9496c44e2720-x86_64-linux-gnu-debug.tar.gz
3949ae75b05810a3e9a8fb063fed84459ee30d61c59d3d51a591dc5450e0e07f guix-build-9496c44e2720/output/x86_64-linux-gnu/bitcoin-9496c44e2720-x86_64-linux-gnu.tar.gz
d7bb100958443ad52c7b96d058e501f033b4f3d7351f3a3a686ca6819d91d89c guix-build-9496c44e2720/output/x86_64-w64-mingw32/SHA256SUMS.part
26accdf6618b5c45c0a8cb911e6f4d4208e55b788541a28b88adf4a435a9e7cf guix-build-9496c44e2720/output/x86_64-w64-mingw32/bitcoin-9496c44e2720-win64-codesigning.tar.gz
760e609156863e8ecc279d5bbaf4c6d71c0a32d6f3587ec7528ffaa8e13ff2d8 guix-build-9496c44e2720/output/x86_64-w64-mingw32/bitcoin-9496c44e2720-win64-debug.zip
4741fc6bcad977434a12635be50f1b7a01a467bd8f5e55b0cf5e4f410d78dc2c guix-build-9496c44e2720/output/x86_64-w64-mingw32/bitcoin-9496c44e2720-win64-setup-unsigned.exe
d76a8cb6a35ef23af834f3d113bf94eaded4fc5722a8475a186704e0aa7dad6b guix-build-9496c44e2720/output/x86_64-w64-mingw32/bitcoin-9496c44e2720-win64-unsigned.zip |
|
Why introduce
|
Only |
9496c44 to
0a737ad
Compare
|
My Guix build: |
my guix Build OutputHost architecture: 00422ce1b8993c3c25cbab1499239a84eb23dd15cbd9dc80f23bab9bf659d131 guix-build-0a737ad4def7/output/aarch64-linux-gnu/SHA256SUMS.part
3ba72b6421a688f0fbb8f35591f7f1ff23db47ea1ed4622b6339bae0f566f9bd guix-build-0a737ad4def7/output/aarch64-linux-gnu/bitcoin-0a737ad4def7-aarch64-linux-gnu-debug.tar.gz
957301b2553f0916c76cb4123c79ec6fe2842fce25794cd27fd2bcf0a867f563 guix-build-0a737ad4def7/output/aarch64-linux-gnu/bitcoin-0a737ad4def7-aarch64-linux-gnu.tar.gz
fe31886447be24790f377e6ccc81e41b2c8f7ec30abb44a75b93226194af6cd8 guix-build-0a737ad4def7/output/arm-linux-gnueabihf/SHA256SUMS.part
3ae2bc2192a2cebb22c2522e2ab83b8432dc7d83a6d26a8f7173b73da6fbdd5a guix-build-0a737ad4def7/output/arm-linux-gnueabihf/bitcoin-0a737ad4def7-arm-linux-gnueabihf-debug.tar.gz
b0ada6adae2157655bdb3d5c61deb5aadd88756e8eb64f500eb438e1dec11ac1 guix-build-0a737ad4def7/output/arm-linux-gnueabihf/bitcoin-0a737ad4def7-arm-linux-gnueabihf.tar.gz
94d3cfd65948c78c1b64d2a326bc6b7e9f0e0f1e43ca897b23007b0fb397f0fa guix-build-0a737ad4def7/output/arm64-apple-darwin/SHA256SUMS.part
a0d96308e34694e2064ee55409c5eb0a07e94ff41b5df258a4d5102422d7e6e6 guix-build-0a737ad4def7/output/arm64-apple-darwin/bitcoin-0a737ad4def7-arm64-apple-darwin-codesigning.tar.gz
ddba818e24a19026b59352d51b9691d714563d75075d9cba61305f53b4faffe9 guix-build-0a737ad4def7/output/arm64-apple-darwin/bitcoin-0a737ad4def7-arm64-apple-darwin-unsigned.tar.gz
a6f8e7e4f42531be716fd12476642c65d538e35a9e18d77a3e39d58dfb046e32 guix-build-0a737ad4def7/output/arm64-apple-darwin/bitcoin-0a737ad4def7-arm64-apple-darwin-unsigned.zip
bc5f08cb77233af34fb18f3a3fc7b20d3e608c107c1779da2bf1a04d5f998325 guix-build-0a737ad4def7/output/dist-archive/bitcoin-0a737ad4def7.tar.gz
6e1b4fbda9ad6ffd456c9e132b27babd76c49e8cf2bd679b87929f9b017e66e4 guix-build-0a737ad4def7/output/powerpc64-linux-gnu/SHA256SUMS.part
aa996bae374c243df57434d654f1742e2fff27f0ce6295cdb7cd57ac63539411 guix-build-0a737ad4def7/output/powerpc64-linux-gnu/bitcoin-0a737ad4def7-powerpc64-linux-gnu-debug.tar.gz
83515db61b8c3db264b12a809e10d51162d544be5449ee2c004a4138bfbae66d guix-build-0a737ad4def7/output/powerpc64-linux-gnu/bitcoin-0a737ad4def7-powerpc64-linux-gnu.tar.gz
1e62cc092d16b5f060c59008d999be0971ed6472c5667cb804702d39eded7233 guix-build-0a737ad4def7/output/riscv64-linux-gnu/SHA256SUMS.part
ff8132ce6971b11373e4dbce3f083e57bc1f58e7f31e7fd14e578fdd9e75d0a6 guix-build-0a737ad4def7/output/riscv64-linux-gnu/bitcoin-0a737ad4def7-riscv64-linux-gnu-debug.tar.gz
83270f900989673dc7a65d3845c2c5b77290f93cd129194f9e0e2910ece0f73d guix-build-0a737ad4def7/output/riscv64-linux-gnu/bitcoin-0a737ad4def7-riscv64-linux-gnu.tar.gz
732714af01a911637b113c7719487aea8b6856d62fd99d7026d4b0c218f5c785 guix-build-0a737ad4def7/output/x86_64-apple-darwin/SHA256SUMS.part
9f6ceedfbbc09e4e364915ac962c678508f838c9a59e8c4b250f01e75a4c7e6b guix-build-0a737ad4def7/output/x86_64-apple-darwin/bitcoin-0a737ad4def7-x86_64-apple-darwin-codesigning.tar.gz
e911b83e7eb681ac0c32a72ef61caafa87f4c5f540bcc92daa0deea50d5599b9 guix-build-0a737ad4def7/output/x86_64-apple-darwin/bitcoin-0a737ad4def7-x86_64-apple-darwin-unsigned.tar.gz
3254fd0f9ab7a88ed491fa4587b6e8b95c6e400c23f8f2bb2d9d15f141866fab guix-build-0a737ad4def7/output/x86_64-apple-darwin/bitcoin-0a737ad4def7-x86_64-apple-darwin-unsigned.zip
ee167aca25217826c3342ad473c17bfd64efd8c38670a10681f34f8215fee7c1 guix-build-0a737ad4def7/output/x86_64-linux-gnu/SHA256SUMS.part
8bcce70403adb8eee4620cb370a00fc61c66664ff8481968bf5a22a1c33987a8 guix-build-0a737ad4def7/output/x86_64-linux-gnu/bitcoin-0a737ad4def7-x86_64-linux-gnu-debug.tar.gz
d71ce6448e3da8d0f16c9ca8f02c236c508f9bfd774fc0c84ddc905dd9f3d671 guix-build-0a737ad4def7/output/x86_64-linux-gnu/bitcoin-0a737ad4def7-x86_64-linux-gnu.tar.gz
fba730d74997da3126f69851956942da8386da0e9826c3a66143f83f8918918a guix-build-0a737ad4def7/output/x86_64-w64-mingw32/SHA256SUMS.part
b1d2e81742563b0fe6a2930f15d4bc0f05b01c0d4a430e54531bd44e4026ec48 guix-build-0a737ad4def7/output/x86_64-w64-mingw32/bitcoin-0a737ad4def7-win64-codesigning.tar.gz
184f74d484288c660e504dca149dadf96fb0410512f0294be80c10a3915ed663 guix-build-0a737ad4def7/output/x86_64-w64-mingw32/bitcoin-0a737ad4def7-win64-debug.zip
680170f646cffd1e7b11021af09b9641bd96e723699f2d1c7d88837d30822af0 guix-build-0a737ad4def7/output/x86_64-w64-mingw32/bitcoin-0a737ad4def7-win64-setup-unsigned.exe
2954adcdbcb49179f64e1d8660ec58155d0c869823903b3c8f028d3601094f65 guix-build-0a737ad4def7/output/x86_64-w64-mingw32/bitcoin-0a737ad4def7-win64-unsigned.zip |
Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use] |
The `distsrc_for_host()` function now accepts a second optional argument, `SUFFIX`, making it consistent with other similar functions.
…d improvements e2a92ec guix: Remove redundant ShellCheck `source` directives (Hennadii Stepanov) bd9db9e guix, refactor: Add `BASE` argument to `*_for_host` functions (Hennadii Stepanov) 3ba31d0 guix, refactor: Move `distsrc_for_host()` to `prelude.bash` (Hennadii Stepanov) ab5abe5 guix, refactor: Move duplicated `profiledir_for_host()` to `prelude.bash` (Hennadii Stepanov) 7f6b89b guix, refactor: Move duplicated `outdir_for_host()` to `prelude.bash` (Hennadii Stepanov) e12b41b guix, refactor: Remove `contains()` function (Hennadii Stepanov) 1de71b3 guix, refactor: Remove unused `out_name()` function (Hennadii Stepanov) Pull request description: While working on bitcoin/bitcoin#35098, I reviewed my notes regarding a few minor Guix script flaws and decided to address them here. This PR: 1. Removes unused code. 2. Reduces code duplication. 3. Improves consistency across function usage. 4. Minimizes ShellCheck directive usage. ACKs for top commit: fanquake: ACK e2a92ec - the move-only deduplication, and dead code removal seem fine. The other (refactoring) changes seem less well motived Tree-SHA512: d565e31ba49300f3001b04d3143721aced305f41bca6d04c33dc479d568efb2c06d91758619378199f174a40f1306c9418ae80d5478013a65ad96341bea122b1
…d improvements 53388773af78f8f1b8f3e705a5400cff6bee6de0 guix: Remove redundant ShellCheck `source` directives (Hennadii Stepanov) 62cf7bc53f238849cfa872972fc384dd25175fba guix, refactor: Add `BASE` argument to `*_for_host` functions (Hennadii Stepanov) 5d46429e322aa4840e0e7a714caa87672aee5faa guix, refactor: Move `distsrc_for_host()` to `prelude.bash` (Hennadii Stepanov) cab65ea9c6963bfffe73524b1485378b6305c398 guix, refactor: Move duplicated `profiledir_for_host()` to `prelude.bash` (Hennadii Stepanov) faa9d4345ff584eb2a7c09f4087c487c381e6b42 guix, refactor: Move duplicated `outdir_for_host()` to `prelude.bash` (Hennadii Stepanov) 6b59fd6b8cfd21bb008d3b71d4f1b24cf562854b guix, refactor: Remove `contains()` function (Hennadii Stepanov) d4c69a72246ed6a290c5aca812d5b896904b4382 guix, refactor: Remove unused `out_name()` function (Hennadii Stepanov) Pull request description: While working on bitcoin/bitcoin#35098, I reviewed my notes regarding a few minor Guix script flaws and decided to address them here. This PR: 1. Removes unused code. 2. Reduces code duplication. 3. Improves consistency across function usage. 4. Minimizes ShellCheck directive usage. ACKs for top commit: fanquake: ACK 53388773af78f8f1b8f3e705a5400cff6bee6de0 - the move-only deduplication, and dead code removal seem fine. The other (refactoring) changes seem less well motived Tree-SHA512: d565e31ba49300f3001b04d3143721aced305f41bca6d04c33dc479d568efb2c06d91758619378199f174a40f1306c9418ae80d5478013a65ad96341bea122b1
The `distsrc_for_host()` function now accepts a second optional argument, `SUFFIX`, making it consistent with other similar functions. Backport of bitcoin/bitcoin#35131.
The `distsrc_for_host()` function now accepts a second optional argument, `SUFFIX`, making it consistent with other similar functions. Backport of bitcoin/bitcoin#35131.
The `distsrc_for_host()` function now accepts a second optional argument, `SUFFIX`, making it consistent with other similar functions. Backport of bitcoin/bitcoin#35131.
The `distsrc_for_host()` function now accepts a second optional argument, `SUFFIX`, making it consistent with other similar functions. Backport of bitcoin/bitcoin#35131.
While working on #35098, I reviewed my notes regarding a few minor Guix script flaws and decided to address them here.
This PR:
Removes unused code.
Reduces code duplication.
Improves consistency across function usage.
Minimizes ShellCheck directive usage.