commit: 5fc7281657e2a5a4b22e969853364b142a37d05f Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Wed Sep 20 18:11:53 2017 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Wed Sep 20 18:13:44 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=5fc72816
postinst-qa-check.d: remove redundant local vars and obsolete comments Fixes: c4edb9ca3a6c ("postinst-qa-check.d: fix [[ ${files[@]} ]] logic in for loops") Reported-by: Michał Górny <mgorny <AT> gentoo.org> bin/postinst-qa-check.d/50gnome2-utils | 4 +--- bin/postinst-qa-check.d/50xdg-utils | 8 ++------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/bin/postinst-qa-check.d/50gnome2-utils b/bin/postinst-qa-check.d/50gnome2-utils index 7ee8f2528..569633fe3 100644 --- a/bin/postinst-qa-check.d/50gnome2-utils +++ b/bin/postinst-qa-check.d/50gnome2-utils @@ -1,7 +1,7 @@ # check for missing calls to gnome2-utils regen functions gnome2_icon_cache_check() { - local d f all_files=() find_args missing + local d f all_files=() missing for d in usr/share/icons/*/; do # gnome2_icon_cache_update updates only themes with an index [[ -f ${d}/index.theme ]] || continue @@ -24,8 +24,6 @@ gnome2_icon_cache_check() { # if any files were found, update the db to avoid repeating # the warning for subsequent packages - # (note: yes, it will eagerly repeat the update for next dirs - # but that's a minor issue) if [[ ${files[@]} ]]; then all_files+=("${files[@]}") addwrite "${d}" diff --git a/bin/postinst-qa-check.d/50xdg-utils b/bin/postinst-qa-check.d/50xdg-utils index ca4b49fe4..9164f8dc1 100644 --- a/bin/postinst-qa-check.d/50xdg-utils +++ b/bin/postinst-qa-check.d/50xdg-utils @@ -1,7 +1,7 @@ # check for missing calls to xdg-utils regen functions xdg_desktop_database_check() { - local d f files=() missing + local d f missing for d in usr/share/applications; do [[ -d ${d} ]] || continue @@ -20,8 +20,6 @@ xdg_desktop_database_check() { # if any files were found, update the db to avoid repeating # the warning for subsequent packages - # (note: yes, it will eagerly repeat the update for next dirs - # but it's a minor issue and we have only one dir anyway) if [[ ${files[@]} ]]; then all_files+=("${files[@]}") addwrite "${d}" @@ -41,7 +39,7 @@ xdg_desktop_database_check() { } xdg_mimeinfo_database_check() { - local d f files=() missing + local d f missing for d in usr/share/mime; do [[ -d ${d} ]] || continue @@ -57,8 +55,6 @@ xdg_mimeinfo_database_check() { # if any files were found, update the db to avoid repeating # the warning for subsequent packages - # (note: yes, it will eagerly repeat the update for next dirs - # but it's a minor issue and we have only one dir anyway) if [[ ${files[@]} ]]; then all_files+=("${files[@]}") addwrite "${d}"