diff options
author | 2008-12-03 15:25:41 +0000 | |
---|---|---|
committer | 2008-12-03 15:25:41 +0000 | |
commit | e03bcaf459f99e0f789fc7d2a588c3ec6ebc8243 (patch) | |
tree | a9879419f99a1883054d58784b4d4aa5889ef463 /hooks | |
parent | 19dcef25afcf7943ec036ffdc6c632466f9cd790 (diff) | |
download | paludis-e03bcaf459f99e0f789fc7d2a588c3ec6ebc8243.tar.gz paludis-e03bcaf459f99e0f789fc7d2a588c3ec6ebc8243.tar.xz |
Be more verbose
Diffstat (limited to 'hooks')
-rwxr-xr-x | hooks/update_config_protect_list.bash | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/hooks/update_config_protect_list.bash b/hooks/update_config_protect_list.bash index 2c7474d9d..02fb644a7 100755 --- a/hooks/update_config_protect_list.bash +++ b/hooks/update_config_protect_list.bash @@ -31,14 +31,20 @@ cfg_protect_mask_list="${vdb_loc}/.cache/all_CONFIG_PROTECT_MASK" if [[ ! -f "${cfg_protect_list}" || ! -f "${cfg_protect_mask_list}" ]] ; then # Generate this list for the first time. *slow* ewarn "Creating the CONFIG_PROTECT and CONFIG_PROTECT_MASK lists." - ewarn "This will take a while." + ewarn "This will take a while, but we only have to do it once." [[ -d "${vdb_loc}/.cache" ]] || mkdir ${vdb_loc}/.cache || return 1 > "${cfg_protect_list}" > "${cfg_protect_mask_list}" installed_pkgs=$(${PALUDIS_COMMAND} --log-level silent --list-packages --repository installed |grep "^*" |cut -d" " -f2) + n=0 + n_end=$(wc -w <<<$installed_pkgs) for p in ${installed_pkgs} ; do + n=$(( $n + 1 )) + if [[ 0 == $(( n % 20 )) ]] ; then + ewarn " ${n} of ${n_end}" + fi cfg_protect=$(${PALUDIS_COMMAND} --log-level silent --environment-variable ${p} CONFIG_PROTECT) for x in ${cfg_protect} ; do echo "${x}" >> "${cfg_protect_list}" @@ -49,9 +55,9 @@ if [[ ! -f "${cfg_protect_list}" || ! -f "${cfg_protect_mask_list}" ]] ; then echo "${x}" >> "${cfg_protect_mask_list}" done done -else - einfo "Updating CONFIG_PROTECT and CONFIG_PROTECT_MASK caches." fi +einfo "Updating CONFIG_PROTECT and CONFIG_PROTECT_MASK caches." + # Now, update the lists with our current values. for x in ${CONFIG_PROTECT} ; do echo "${x}" >> "${cfg_protect_list}" |