#884760 dirmngr: With missing .gnupg directory, dirmngr fails to start as daemon

Package:
dirmngr
Source:
gnupg2
Description:
GNU privacy guard - network certificate management service
Submitter:
Date:
2017-12-19 09:15:04 UTC
Severity:
important
#884760#5
Date:
2017-12-19 09:13:20 UTC
From:
To:
Dear Maintainer,

I wanted to test some signatures, thus had to fetch keys. In Debian
Stretch, dirmngr is kind of expected to be around to use gpg
--recv-keys. Starting dirmngr is easy, either foreground or as daemon.

"dirmngr" will start in foreground, create missing directories.
"dirmngr --daemon" should start in the background, but it doesn't create
missing directories (~/.gnupg):

dirmngr[988]: error opening '/root/.gnupg/dirmngr_ldapservers.conf': No
such file or directory
dirmngr[988]: error binding socket to '/root/.gnupg/S.dirmngr': No such
file or directory
Exited with code 1

~/repo# dirmngr
dirmngr[1574]: error opening '/root/.gnupg/dirmngr_ldapservers.conf': No
such file or directory
dirmngr[1574.0]: permanently loaded certificates: 0
dirmngr[1574.0]:     runtime cached certificates: 0
dirmngr[1574.0]: failed to open cache dir file
'/root/.gnupg/crls.d/DIR.txt': No such file or directory
dirmngr[1574.0]: creating directory '/root/.gnupg'
dirmngr[1574.0]: creating directory '/root/.gnupg/crls.d'
dirmngr[1574.0]: new cache dir file '/root/.gnupg/crls.d/DIR.txt'
created
# Home: /root/.gnupg
# Config: [none]
OK Dirmngr 2.1.18 at your service


If I create a directory, or start in foreground, stop and start in
background things *do* work as expected. Would it be possible to let
the --daemon behave similar and thus create the missing ~/.gnupg/?