The logic in pkg_postinst is still wrong. What it looks like now: pkg_postinst() { if [ ! -f '/etc/bind/rndc.key' ]; then if use urandom; then Why this is wrong: There are two possible configuration files that may contain the key, rndc.conf and rndc.key. The build does not create rndc.conf. If rndc.conf exists, then (a) it has been created by the user and should be presumed to be correct, (b) rndc will prefer rndc.conf over rndc.key, and (c) rndc will emit a warning IF BOTH rndc.conf and rndc.key exist, then go ahead and use rndc.conf ANYWAY. However, if rndc.conf already exists, but rndc.key does not, *which is a correct configuration*, then this code will: 1. create an unnecessary and unwanted rndc.key file that will never be used, and 2. cause a warning every time rndc is invoked. What it SHOULD look like: pkg_postinst() { if [ ! -f '/etc/bind/rndc.key' && ! -f '/etc/bind/rndc.conf' ]; then if use urandom; then Why this is right: It creates rndc.key IF AND ONLY IF NEITHER rndc.key NOR the preferred rndc.conf already exists. The confgen call in pkg_postinst also fails if rndc.conf already exists, causing the build to fail in pkg_postinst. Reproducible: Always Actual Results: The ebuild fails in postinst if rndc.conf already exists Expected Results: If rndc.conf already exists, postinst should not attempt to create rndc.key which, in this case, will never be used anyway Please see #691786, #701032
+1
If you write "STILL" do you want to reference a specific bug, which was (not) fixed? I do not know, what +1 should mean in this context. Please write a clear statement.
(In reply to Jonas Stein from comment #2) > If you write "STILL" do you want to reference a specific bug, which was > (not) fixed? > I do not know, what +1 should mean in this context. Please write a clear > statement. That I'm having the same issue.
https://bugs.gentoo.org/701032
(In reply to Jonas Stein from comment #2) > If you write "STILL" do you want to reference a specific bug, which was > (not) fixed? > I do not know, what +1 should mean in this context. Please write a clear > statement. Jonas, I referenced #691786 (against 9.14.4, where I first reported the problem), and #701032 (against 9.15.5). I even offered a patch in 701032.
* FAILED postinst: 1 * ERROR: net-dns/bind-9.14.12::gentoo failed (postinst phase): * (no error message) * * Call stack: * ebuild.sh, line 125: Called pkg_postinst * environment, line 3064: Called die * The specific snippet of code: * chown root:named /etc/bind/rndc.key || die; * I don't have /etc/bind.
*** This bug has been marked as a duplicate of bug 701032 ***