blob: f4532602cb9892699ef93267c41433b1c3ecaaf1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# some spells install their libraries to /lib and these are linked to by bash.
# these libraries must be preserved while the spell is being upgraded
# these functions should be called during the PRE_INSTALL of such spells
# candidate spells for this would be glibc, ncurses, readline
lock_resources "libgrimoire" "install" &&
PROTECT="${SOURCE_DIRECTORY}/${SPELL}.oldlibs" &&
if [[ -z $INSTALL_ROOT ]]; then
protect_special_libs() {
message "${MESSAGE_COLOR}Protecting special libraries${DEFAULT_COLOR}" &&
mkdir -p "${PROTECT}" &&
local each &&
for each in /lib{,64,32}/*; do
if test -f "$each"; then
cp -a "$each" $PROTECT
fi
done &&
ldconfig $PROTECT
}
fi
# some spells, such as glibc may need some special processing between calls to
# these two fucnctions
do_dispel() {
message "${MESSAGE_COLOR}Dispelling $SPELL${DEFAULT_COLOR}" &&
if spell_ok $SPELL; then
dispel --notriggers --nosustain $SPELL
fi
}
|