Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 638902 - sys-apps/portage: repo.postsync.d not as quiet as postsync.d - portage-utils -q weirdness
Summary: sys-apps/portage: repo.postsync.d not as quiet as postsync.d - portage-utils ...
Status: RESOLVED DUPLICATE of bug 635828
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - External Interaction (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-26 15:44 UTC by Robin Johnson
Modified: 2017-11-26 21:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-11-26 15:44:03 UTC
This is a weird bug, and I can't get to the bottom of it. Might be in portage-utils. Infra recently upgraded portage-utils 0.62 to 0.64, and that's the start of this.

In bug 585248, vapier changed the -q behavior of portage-utils/q to only suppress warnings, not errors. Here's the commit:
https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=b1558916d2ca76d7cd4c81248d5b220aaa46a728

Calling the command manually is quiet, that works:
# q -q --reinitialize=/usr/portage

Along with the above commit the q-reinit script changed slightly in recent versions (extra lines trimmed):
0.62:
/etc/portage/postsync.d/q-reinitialize:
[ -x /usr/bin/q ] && /usr/bin/q -r ${PORTAGE_QUIET:+-q}
0.64:
/etc/portage/repo.postsync.d/q-reinit:
q ${PORTAGE_QUIET:+-q} --reinitialize="${repository_path}"

Now, emerge --sync -q has started printing:
"q: Updating ebuild cache in /usr/portage ..."|
At every call.

This is where it gets weirder...
I added simple scripts to check PORTAGE_QUIET=1 was present in both hook directories, which it was.

It's only from inside emerge --sync -q that it's NOT being quiet, and I'm at a loss to figure out why.
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2017-11-26 16:08:32 UTC
grep -nHIirF -- Updating ebuild cache (in directory: /home/brian/Dev/git/portage/pym)
No matches found.

Check all postsync scripts you have.
Comment 2 Brian Dolbec (RETIRED) gentoo-dev 2017-11-26 16:19:42 UTC
I re-ran the grep on the whole of portage repo including its bin/ scripts, same result.

First you need to find the source of the print message.  Then you/we can figure out why.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-11-26 20:28:00 UTC
(In reply to Brian Dolbec from comment #2)
> I re-ran the grep on the whole of portage repo including its bin/ scripts,
> same result.
> 
> First you need to find the source of the print message.  Then you/we can
> figure out why.

I linked the exact commit that introduced it in portage-utils.git
search for 'Updating ebuild %scache'.

Here's the file another way:
https://gitweb.gentoo.org/proj/portage-utils.git/tree/main.c?id=b1558916d2ca76d7cd4c81248d5b220aaa46a728#n988

The question is: why does -q work when it's called on the commandline, but NOT when it's called by Portage?
Comment 4 Zac Medico gentoo-dev 2017-11-26 21:08:04 UTC

*** This bug has been marked as a duplicate of bug 635828 ***