depgraph: fix bug #526160

This fixes _dep_check_composite_db to mask packages that aren't the
highest visible match, but only if an update is desirable. This causes
desirable updates to get pulled in for cases like bug #526160. The
included unit test simulates the virtual/pypy update that triggered
the bug.

X-Gentoo-Bug: 526160
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=526160
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
CONFIG_PROTECT: handle non-existent files

This fixes the ConfigProtect class, etc-update, and dispatch-conf to
account for non-existent files (rather than directories) that are
listed directly in CONFIG_PROTECT. It has been valid to list files
directly in CONFIG_PROTECT since bug #14321. However, the support for
non-existent files added for bug #523684 did not include support for
non-existent files listed directly in CONFIG_PROTECT.

Fixes: 5f7b4865ecaf ("dblink.mergeme: implement bug #523684")
X-Gentoo-Bug: 523684
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=523684
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
bin/bashrc-functions.sh: remove portageq function

Since commit 0cc4c1ac21a2ea94cfb1f6ff4b461a9e349d47df,
$PORTAGE_BIN_PATH/portageq no longer exists, which breaks the portageq
shell function inside bashrc-functions.sh. Note that
$PORTAGE_BIN_PATH/ebuild-helpers/portageq is in $PATH, so we can simply
remove the redundant function.

Fixes: 0cc4c1a ("Install Portage using setup.py")
X-Gentoo-Bug: 524964
X-Gentoo-URL: https://bugs.gentoo.org/show_bug.cgi?id=524964
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
Introduce eqalog and eqawarnlog functions.

These functions are to be used for creating a log of QA violations in a
machine-readable format.

Stored in ${T]/qa.log, the log consists of one entry per line in the
following format: violation-tag data

For example:
deprecated-directory /usr/man
deprecated-directory /usr/info
world-writable /var/db/foo/bar

Signed-off-by: Zac Medico <zmedico@gentoo.org>
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
install-qa-check.d/05double-D: Write to log and improve consistency.

Present the list of offending files newline-delimitered for consistency
with other checks.

Signed-off-by: Zac Medico <zmedico@gentoo.org>
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
install-qa-check.d/90world-writable: Write log and general cleanup.

Use eqawarn instead of __vecho for visibility.

Present the list of offending files newline-delimitered for consistency
with other checks.

Signed-off-by: Zac Medico <zmedico@gentoo.org>
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
reproduce bug #524916