aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2024-01-11 16:31:12 -0500
committerMatt Turner <mattst88@gentoo.org>2024-01-12 14:15:28 -0500
commita3e56252cdde2f4fb51766c580c0137f28843510 (patch)
tree7c6ecd1eeca69362d800eb664e663c3259e0c41f
parentCI: Update portage to 3.0.57 (diff)
downloadgentoolkit-a3e56252cdde2f4fb51766c580c0137f28843510.tar.gz
gentoolkit-a3e56252cdde2f4fb51766c580c0137f28843510.tar.bz2
gentoolkit-a3e56252cdde2f4fb51766c580c0137f28843510.zip
eclean: Strip libc dependencies from --changed-deps calculations
Closes: https://bugs.gentoo.org/921679 Closes: https://github.com/gentoo/gentoolkit/pull/38 Signed-off-by: Matt Turner <mattst88@gentoo.org>
-rw-r--r--pym/gentoolkit/eclean/search.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py
index de424c5..f03c521 100644
--- a/pym/gentoolkit/eclean/search.py
+++ b/pym/gentoolkit/eclean/search.py
@@ -15,6 +15,7 @@ from typing import Optional
import portage
from portage.dep import Atom, use_reduce
from portage.dep._slot_operator import strip_slots
+from portage.dep.libc import find_libc_deps, strip_libc_deps
import gentoolkit.pprinter as pp
from gentoolkit.eclean.exclude import (
@@ -522,13 +523,15 @@ class DistfilesSearch:
return clean_me, saved
-def _deps_equal(deps_a, eapi_a, deps_b, eapi_b, uselist=None):
+def _deps_equal(deps_a, eapi_a, deps_b, eapi_b, libc_deps, uselist=None):
"""Compare two dependency lists given a set of USE flags"""
if deps_a == deps_b:
return True
deps_a = use_reduce(deps_a, uselist=uselist, eapi=eapi_a, token_class=Atom)
deps_b = use_reduce(deps_b, uselist=uselist, eapi=eapi_b, token_class=Atom)
+ strip_libc_deps(deps_a, libc_deps)
+ strip_libc_deps(deps_b, libc_deps)
strip_slots(deps_a)
strip_slots(deps_b)
return deps_a == deps_b
@@ -583,6 +586,8 @@ def findPackages(
print(pp.error("Error: %s" % str(er)), file=sys.stderr)
exit(1)
+ libc_deps = find_libc_deps(var_dbapi, False)
+
# Create a dictionary of all installed packages
if destructive and package_names:
installed = dict.fromkeys(var_dbapi.cp_all())
@@ -653,6 +658,7 @@ def findPackages(
binpkg_metadata["EAPI"],
" ".join(ebuild_metadata[key] for key in dep_keys),
ebuild_metadata["EAPI"],
+ libc_deps,
frozenset(binpkg_metadata["USE"].split()),
):
continue