Skip to content

Commit

Permalink
metadata: fix cache check? (TODO)
Browse files Browse the repository at this point in the history
Noticed when reviewing commits after the news issue
(see referenced PR).

This should be equivalent but I think it's
more readable this way (ditching the
negatives).

Fixes: 9e24d01
See: gentoo#853
Signed-off-by: Sam James <sam@gentoo.org>
  • Loading branch information
thesamesam committed Dec 5, 2022
1 parent 54bf60a commit e14f6b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/portage/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ def sigwinch_handler(signum, frame):
# We don't want to skip the write unless we're really
# sure that the existing cache is identical, so don't
# trust _mtime_ and _eclasses_ alone.
cache_is_identical = (
True for k in auxdbkeys if dest.get(k, "") != src.get(k, "")
cache_is_identical = all(
dest.get(k, "") == src.get(k, "") for k in auxdbkeys
)
if any(cache_is_identical):
if not cache_is_identical:
dest = None
if dest is not None:
# The existing data is valid and identical,
Expand Down

0 comments on commit e14f6b9

Please sign in to comment.