aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhooks/update_config_protect_list.bash18
1 files changed, 11 insertions, 7 deletions
diff --git a/hooks/update_config_protect_list.bash b/hooks/update_config_protect_list.bash
index d7c386194..735ceaead 100755
--- a/hooks/update_config_protect_list.bash
+++ b/hooks/update_config_protect_list.bash
@@ -17,32 +17,36 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-vdb_loc=$(${PALUDIS_COMMAND} --configuration-variable installed location )
+source ${PALUDIS_EBUILD_DIR}/echo_functions.bash
+
+vdb_loc="$(${PALUDIS_COMMAND} --log-level silent --configuration-variable installed location )"
cfg_protect_list="${vdb_loc}/.cache/all_CONFIG_PROTECT"
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*
- echo "Creating the CONFIG_PROTECT and CONFIG_PROTECT_MASK lists."
- echo "This will take a while."
+ ewarn "Creating the CONFIG_PROTECT and CONFIG_PROTECT_MASK lists."
+ ewarn "This will take a while."
+ [[ -d "${vdb_loc}/.cache" ]] || mkdir ${vdb_loc}/.cache || return 1
> "${cfg_protect_list}"
> "${cfg_protect_mask_list}"
- installed_pkgs=$(${PALUDIS_COMMAND} --list-packages --repository installed |grep "^*" |cut -d" " -f2)
+ installed_pkgs=$(${PALUDIS_COMMAND} --log-level silent --list-packages --repository installed |grep "^*" |cut -d" " -f2)
for p in ${installed_pkgs} ; do
- cfg_protect=$(${PALUDIS_COMMAND} --environment-variable ${p} CONFIG_PROTECT)
+ cfg_protect=$(${PALUDIS_COMMAND} --log-level silent --environment-variable ${p} CONFIG_PROTECT)
for x in ${cfg_protect} ; do
echo "${x}" >> "${cfg_protect_list}"
done
- cfg_protect_mask=$(${PALUDIS_COMMAND} --environment-variable ${p} CONFIG_PROTECT_MASK)
+ cfg_protect_mask=$(${PALUDIS_COMMAND} --log-level silent --environment-variable ${p} CONFIG_PROTECT_MASK)
for x in ${cfg_protect_mask} ; do
echo "${x}" >> "${cfg_protect_mask_list}"
done
done
+else
+ einfo "Updating CONFIG_PROTECT and CONFIG_PROTECT_MASK caches."
fi
-
# Now, update the lists with our current values.
for x in ${CONFIG_PROTECT} ; do
echo "${x}" >> "${cfg_protect_list}"