Page MenuHomePhabricator

Merge #12305: [docs] [refactor] Add help messages for datadir path mangling
ClosedPublic

Authored by nakihito on Aug 22 2019, 20:32.

Details

Summary

5460460 Add AbsPathForConfigVal to consolidate datadir prefixing for path args (James O'Beirne)
a1e1305 Clarify help messages for path args to mention datadir prefix (James O'Beirne)

Pull request description:

Change `-conf`'s help message to indicate that relative path values will be prefixed by the datadir path. This behavior probably merits clarification; it's kind of confusing when attempting to specify a configuration file in the current directory with `-conf=bitcoin.conf`, but instead loading the `bitcoin.conf` file in ~/.bitcoin datadir.

### Edit

This PR has been modified to document all cases where relative path configurations are modified to be under datadir. A small refactoring has also been added which consolidates this normalization.

Tree-SHA512: be4fc0595fbeba33d17af08f59898af45e76a44f00719ea0282403b155ac6755584604fab765250a3aa14ed6991882c4d1ccbe601184362c5ba97c886bdda344

Backport of Core PR12305
https://github.com/bitcoin/bitcoin/pull/12305/

Depends on D3940

Test Plan
make check
./bitcoind -h

Verify help messages have been changed.

./bitcoind

Verify debug.log, bitcoin.conf, bitcoind.pid, and cookie files exist in their default directories (Likely somewhere in .bitcoin).

./bitcoind -debuglogfile=<absolute path>/debug.log

Verify the same debug.log was touched by this instance of ./bitcoind.

./bitcoind -debuglogfile=<relative path>/debug.log

Verify the same debug.log was touched by this instance of ./bitcoind.

Repeat for other files.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Aug 22 2019, 20:32
nakihito edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Aug 23 2019, 10:09