Skip to content

Commit 66ad5be

Browse files
committed
fix getuto emitting informative messages regarding what it is doing
quiet mode silences all output, as made more obvious by the previous change. This isn't really appropriate for einfo status messages, though, even if it is fine for gpg output itself. Redirect our einfos to a temporary fd so we can capture them and preserve them. Fixes portage being entirely silent about the fact that it is running the trust helper, leading to people thinking portage itself is hanging forever if getuto itself has issues.
1 parent cab8164 commit 66ad5be

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

getuto

+9-7
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ getuto_refresh() {
6464
fi
6565

6666
if (( ${NOW} - ${DAY} >= ${LST} )) ; then
67-
einfo "Updating gnupg keyring for package signatures"
67+
einfo "Updating gnupg keyring for package signatures" >&3
6868

6969
# Always re-import the system keys because it might be our only source of updates
7070
# for e.g. revocations, renewals, etc if we're on a firewalled machine.
@@ -81,7 +81,7 @@ getuto_refresh() {
8181

8282
touch ${LASTRUNFILE}
8383
else
84-
[[ -n ${QUIET} ]] || einfo "gnupg keyring for package signatures already up-to-date."
84+
[[ -n ${QUIET} ]] || einfo "gnupg keyring for package signatures already up-to-date." >&3
8585
fi
8686
}
8787

@@ -191,11 +191,13 @@ else
191191
# We want to be able to filter error messages
192192
export LC_ALL=C.UTF8
193193

194-
if [[ -n ${QUIET} ]] ; then
195-
getuto_refresh >/dev/null 2>&1
196-
else
197-
getuto_refresh
198-
fi
194+
{
195+
if [[ -n ${QUIET} ]] ; then
196+
getuto_refresh >/dev/null 2>&1
197+
else
198+
getuto_refresh
199+
fi
200+
} 3>&1
199201
fi
200202

201203
# Make sure the trustdb is world-readable (again).

0 commit comments

Comments
 (0)