Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postinst-qa-check.d: fix [[ ${files[@]} ]] logic in for loops #207

Merged

Conversation

zmedico
Copy link
Member

@zmedico zmedico commented Sep 19, 2017

Use a separate all_files array to accumulate the results
from all loops, so that [[ ${files[@]} ]] only checks for
files found during the current loop.

Use a separate all_files array to accumulate the results
from all loops, so that [[ ${files[@]} ]] only checks for
files found during the current loop.
@zmedico zmedico force-pushed the postinst-qa-check.d-for-loop-files-var branch from 4677a3b to b6bb36e Compare September 19, 2017 23:16
… run

When caches were missing, calls to eqatag could be prohibitively
expensive when a large number of files where found. Those files
did not necessaryily belong to the current package, so it was
also a false positive.

Bug: https://bugs.gentoo.org/631454
@zmedico zmedico force-pushed the postinst-qa-check.d-for-loop-files-var branch from b6bb36e to 361f820 Compare September 19, 2017 23:27
@gentoo-bot gentoo-bot merged commit 361f820 into gentoo:master Sep 19, 2017
@zmedico
Copy link
Member Author

zmedico commented Sep 20, 2017

There's a fixup in 743bedc.

@@ -1,12 +1,12 @@
# check for missing calls to gnome2-utils regen functions

gnome2_icon_cache_check() {
local d f files=() find_args
local d f all_files=() find_args
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no point in including find_args here if you local it later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIxed in 5fc7281, thanks.

@@ -27,15 +27,16 @@ gnome2_icon_cache_check() {
# (note: yes, it will eagerly repeat the update for next dirs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is no longer valid now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also fixed in 5fc7281.

@zmedico zmedico deleted the postinst-qa-check.d-for-loop-files-var branch October 13, 2017 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants