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

gen-manpages.py should skip nonexistent binaries and still work for the existent binaries #30985

Closed
1 task done
andremralves opened this issue Sep 26, 2024 · 0 comments · Fixed by #30986
Closed
1 task done

Comments

@andremralves
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

By executing BUILDDIR=$PWD/build contrib/devtools/gen-manpages.py, if one binary is not found, it will stop the generation of all manpages.

For example: Executing gen-manpages.py without bitcoin-qt. The command exits after detecting that bitcoin-qt does not exist, and no manpage is generated, even though only bitcoin-qt is missing.

➜  bitcoin git:(master) ✗ BUILDDIR=$PWD/build contrib/devtools/gen-manpages.py
/home/andre/repos/bitcoin/build/src/qt/bitcoin-qt not found or not an executable
➜  bitcoin git:(master) ✗ 

Initially, I thought this behavior was intended, but after investigating the older shell script implementation gen-manpages.sh, I realized that’s not the case. gen-manpages.sh was able to generate all the manpages and just warned the user about missing binaries.

Example using the last version of the shell script: https://github.com/bitcoin/bitcoin/blob/a5edd191be93aff8f9c0f60f04e711e2e78ecc77/contrib/devtools/gen-manpages.sh

➜  bitcoin git:(master) ✗ BUILDDIR=$PWD/build contrib/devtools/gen-manpages.sh
contrib/devtools/gen-manpages.sh: line 25: /home/andre/repos/bitcoin/build/src/qt/bitcoin-qt: No such file or directory
help2man: can't get `--help' info from /home/andre/repos/bitcoin/build/src/qt/bitcoin-qt
Try `--no-discard-stderr' if option outputs to stderr
➜  bitcoin git:(master) ✗ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   doc/man/bitcoin-cli.1
	modified:   doc/man/bitcoin-tx.1
	modified:   doc/man/bitcoin-util.1
	modified:   doc/man/bitcoin-wallet.1
	modified:   doc/man/bitcoind.1

The script warned about bitcoin-qt being missing but still generated the other manpages, as you can see with the git status command.

Expected behaviour

➜  bitcoin git:(master) ✗ BUILDDIR=$PWD/build contrib/devtools/gen-manpages.py
/home/andre/repos/bitcoin/build/src/qt/bitcoin-qt not found or not an executable. Skipping...
Generating /home/andre/repos/bitcoin/doc/man/bitcoind.1…
Generating /home/andre/repos/bitcoin/doc/man/bitcoin-cli.1…
Generating /home/andre/repos/bitcoin/doc/man/bitcoin-tx.1…
Generating /home/andre/repos/bitcoin/doc/man/bitcoin-wallet.1…
Generating /home/andre/repos/bitcoin/doc/man/bitcoin-util.1…

Steps to reproduce

Run BUILDDIR=$PWD/build contrib/devtools/gen-manpages.py without having one of the binaries compiled e.g. bitcoin-qt.

Relevant log output

No response

How did you obtain Bitcoin Core

Compiled from source

What version of Bitcoin Core are you using?

master

Operating system and version

Debian

Machine specifications

No response

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

Successfully merging a pull request may close this issue.

1 participant