-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Always output license/copyright info with -version
#24409
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
Conversation
Concept ACK!
Heh. I did check the |
@@ -42,7 +42,7 @@ | |||
print(f'{abspath} not found or not an executable', file=sys.stderr) | |||
sys.exit(1) | |||
# take first line (which must contain version) | |||
verstr = r.stdout.split('\n')[0] | |||
verstr = r.stdout.splitlines()[0] | |||
# last word of line is the actual version e.g. v22.99.0-5c6b3d5b3508 | |||
verstr = verstr.split()[-1] | |||
assert verstr.startswith('v') |
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 lines below here can go now ("Only bitcoin-qt prints the copyright message on --version, so store it specifically."). Could even store the copyright message per binary like the other version info.
Also another split('n')
below.
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.
Thanks, should be addressed.
2b25810
to
0ed0d5d
Compare
Consolidate to outputting the licensing info when we pass -version to a binary, i.e bitcoind -version: ```bash itcoin Core version v22.99.0-fc1f355913f6-dirty Copyright (C) 2009-2022 The Bitcoin Core developers Please contribute if you find Bitcoin Core useful. Visit <https://bitcoincore.org/> for further information about the software. The source code is available from <https://github.com/bitcoin/bitcoin>. This is experimental software. Distributed under the MIT software license, see the accompanying file COPYING or <https://opensource.org/licenses/MIT> ```
Co-authored-by: Carl Dong <contact@carldong.me>
0ed0d5d
to
5a89bed
Compare
Updated table:
Also checked that manual pages are generated correctly. Tested ACK 5a89bed |
Addresses a review comment from #24263, and addresses the comment where it was pointed out that we are inconsistent with emitting our copyright. After this change, the copyright is always emitted with
-version
, rather than-help
, i.e:The info is also added to binaries other than
bitcoind
/bitcoin-qt
. This change also prevents duplicate copyright info appearing in thebitcoind
man page.