Summary: | Notice "Updating ebuild cache" when running sync with --quiet | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Dirkjan Ochtman (RETIRED) <djc> |
Component: | Core - Interface (emerge) | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | portage-utils, robbat2 |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Dirkjan Ochtman (RETIRED)
2017-10-29 19:13:15 UTC
Does /etc/portage/postsync.d/q-reinitialize container ${PORTAGE_QUIET:+-q} like it does here: https://gitweb.gentoo.org/repo/gentoo.git/tree/app-portage/portage-utils/files/q-reinitialize If you run this command: /usr/bin/q -r -q Is it quiet? I have a /etc/portage/repo.postsync.d/q-reinit, which contains this line: q ${PORTAGE_QUIET:+-q} --reinitialize="${repository_path}" When I run /usr/bin/q -r -q, it does not print anything to stdout or stderr. Apparently, having the environment variable PORTAGE_QUIET=1 exported causes it to *not* be quiet regardless of the -q flag: # PORTAGE_QUIET=1 /usr/bin/q -r -q q: Updating ebuild cache in /usr/portage ... Wow, that seems wrong! yeah, the warn macro in libq/libq.h doesn't seem to do "if (!quiet)", and "Updating ebuild cache in" is a warning message (as is its result timing). I don't really understand why it's a warning -- it doesn't seem actionable at all? It seems like this hunk b1558916d2ca76d7cd4c81248d5b220aaa46a728 from doesn't really fit in with the stated goal (do not suppress fatal error messages). @@ -985,9 +985,8 @@ initialize_flat(const char *overlay, int cache_type, bool force) return cache_file; } - if (!quiet) - warn("Updating ebuild %scache in %s ... ", - cache_type == CACHE_EBUILD ? "" : "meta", overlay); + warn("Updating ebuild %scache in %s ... ", + cache_type == CACHE_EBUILD ? "" : "meta", overlay); count = frac = secs = 0; vapier, mind if I revert that change? *** Bug 638902 has been marked as a duplicate of this bug. *** (In reply to Dirkjan Ochtman from comment #7) > It seems like this hunk b1558916d2ca76d7cd4c81248d5b220aaa46a728 from > doesn't really fit in with the stated goal (do not suppress fatal error > messages). > > @@ -985,9 +985,8 @@ initialize_flat(const char *overlay, int cache_type, > bool force) > return cache_file; > } > > - if (!quiet) > - warn("Updating ebuild %scache in %s ... ", > - cache_type == CACHE_EBUILD ? "" : "meta", overlay); > + warn("Updating ebuild %scache in %s ... ", > + cache_type == CACHE_EBUILD ? "" : "meta", overlay); > > count = frac = secs = 0; > > vapier, mind if I revert that change? You need to watch the rest of the commit, because where warn prints to changed, and is sometimes /dev/null. https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=b1558916d2ca76d7cd4c81248d5b220aaa46a728 Found the bug in portage-utils, I'll push a patch to the tree, not going to spin my own 0.65 release. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=111ea5abbac500854cd22c00dd09a9557bf001b0 commit 111ea5abbac500854cd22c00dd09a9557bf001b0 Author: Robin H. Johnson <robbat2@gentoo.org> AuthorDate: 2017-11-27 07:59:42 +0000 Commit: Robin H. Johnson <robbat2@gentoo.org> CommitDate: 2017-11-27 07:59:46 +0000 app-portage/portage-utils: fix quietness. Make PORTAGE_QUIET=1 actually be quiet properly. Thanks to Zac for the suggestion of checking how PORTAGE_QUIET was being handled. Thanks: Zac Medico <zmedico@gentoo.org> Closes: https://bugs.gentoo.org/635828 Package-Manager: Portage-2.3.16, Repoman-2.3.6 app-portage/portage-utils/Manifest | 6 +-- .../files/portage-utils-0.64-fix-quiet.patch | 51 ++++++++++++++++++++++ .../portage-utils/portage-utils-0.64-r1.ebuild | 40 +++++++++++++++++ 3 files changed, 94 insertions(+), 3 deletions(-) |