Update hooks to use cave
This commit is contained in:
parent
78de0f647d
commit
b0323df4b2
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# vim: set et sw=4 sts=4 :
|
||||
|
||||
# Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
|
||||
# Copyright (c) 2006, 2007, 2008, 2009, 2010 Ciaran McCreesh
|
||||
#
|
||||
# This file is part of the Paludis package manager. Paludis is free software;
|
||||
# you can redistribute it and/or modify it under the terms of the GNU General
|
||||
@ -31,7 +31,7 @@ einfo_unhooked "Checking whether the GNU info directory needs updating..."
|
||||
export INFOPATH=$(source /etc/profile.env 2>/dev/null ; echo $INFOPATH )
|
||||
|
||||
regen_info_dirs=
|
||||
vdb_loc=$(${PALUDIS_COMMAND} --configuration-variable installed location )
|
||||
vdb_loc=$(${CAVE:-cave} print-repository-metadata installed --raw-name location --format '%v' )
|
||||
for info_path in ${INFOPATH//:/ } ; do
|
||||
info_path="${ROOT%/}/${info_path}"
|
||||
[[ -d "${info_path}" ]] || continue
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# vim: set et sw=4 sts=4 :
|
||||
|
||||
# Copyright (c) 2006, 2008 Ciaran McCreesh
|
||||
# Copyright (c) 2006, 2008, 2010 Ciaran McCreesh
|
||||
#
|
||||
# This file is part of the Paludis package manager. Paludis is free software;
|
||||
# you can redistribute it and/or modify it under the terms of the GNU General
|
||||
@ -21,7 +21,7 @@ source ${PALUDIS_ECHO_FUNCTIONS_DIR:-${PALUDIS_EBUILD_DIR}}/echo_functions.bash
|
||||
|
||||
echo
|
||||
einfo_unhooked "Regenerating cache for installable repositories..."
|
||||
${PALUDIS_COMMAND} --regenerate-installable-cache
|
||||
${CAVE:-cave} fix-cache --installable
|
||||
einfo_unhooked "Done regenerating cache for installable repositories"
|
||||
|
||||
true
|
||||
|
||||
@ -24,7 +24,7 @@ if [[ -n "${PALUDIS_NO_LIVE_DESTINATION}" ]] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
vdb_loc="$(${PALUDIS_COMMAND} --log-level silent --configuration-variable installed location )"
|
||||
vdb_loc=$(${CAVE:-cave} print-repository-metadata installed --raw-name location --format '%v' )
|
||||
cfg_protect_list="${vdb_loc}/.cache/all_CONFIG_PROTECT"
|
||||
cfg_protect_mask_list="${vdb_loc}/.cache/all_CONFIG_PROTECT_MASK"
|
||||
|
||||
@ -36,26 +36,17 @@ if [[ ! -f "${cfg_protect_list}" || ! -f "${cfg_protect_mask_list}" ]] ; then
|
||||
> "${cfg_protect_list}"
|
||||
> "${cfg_protect_mask_list}"
|
||||
|
||||
installed_pkgs=$(${PALUDIS_COMMAND} --log-level silent --list-packages --repository installed |grep "^*" |cut -d" " -f2)
|
||||
cfg_protect=$(${CAVE:-cave} print-id-metadata --all '*/*'::installed --raw-name CONFIG_PROTECT --format '%v' | xargs -n1 | uniq )
|
||||
for x in ${cfg_protect} ; do
|
||||
echo "${x}" >> "${cfg_protect_list}"
|
||||
done
|
||||
|
||||
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}"
|
||||
done
|
||||
|
||||
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
|
||||
cfg_protect_mask=$(${CAVE:-cave} print-id-metadata --all '*/*'::installed --raw-name CONFIG_PROTECT_MASK --format '%v' | xargs -n1 | uniq )
|
||||
for x in ${cfg_protect_mask} ; do
|
||||
echo "${x}" >> "${cfg_protect_mask_list}"
|
||||
done
|
||||
fi
|
||||
|
||||
einfo "Updating CONFIG_PROTECT and CONFIG_PROTECT_MASK caches."
|
||||
|
||||
# Now, update the lists with our current values.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user