Lines 20-45
Link Here
|
20 |
|
20 |
|
21 |
sgml-catalog_cat_doinstall() { |
21 |
sgml-catalog_cat_doinstall() { |
22 |
debug-print function $FUNCNAME $* |
22 |
debug-print function $FUNCNAME $* |
23 |
/usr/bin/install-catalog --add $1 $2 &>/dev/null |
23 |
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
|
|
24 |
"${EPREFIX}"/usr/bin/install-catalog --add "${EPREFIX}/$1" "${EPREFIX}/$2" &>/dev/null |
24 |
} |
25 |
} |
25 |
|
26 |
|
26 |
sgml-catalog_cat_doremove() { |
27 |
sgml-catalog_cat_doremove() { |
27 |
debug-print function $FUNCNAME $* |
28 |
debug-print function $FUNCNAME $* |
28 |
/usr/bin/install-catalog --remove $1 $2 &>/dev/null |
29 |
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
|
|
30 |
"${EPREFIX}"/usr/bin/install-catalog --remove "${EPREFIX}/$1" "${EPREFIX}/$2" &>/dev/null |
29 |
} |
31 |
} |
30 |
|
32 |
|
31 |
sgml-catalog_pkg_postinst() { |
33 |
sgml-catalog_pkg_postinst() { |
32 |
debug-print function $FUNCNAME $* |
34 |
debug-print function $FUNCNAME $* |
|
|
35 |
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
33 |
|
36 |
|
34 |
for entry in ${SGML_TOINSTALL}; do |
37 |
for entry in ${SGML_TOINSTALL}; do |
35 |
arg1=`echo ${entry} | cut -f1 -d\:` |
38 |
arg1=${entry%%:*} |
36 |
arg2=`echo ${entry} | cut -f2 -d\:` |
39 |
arg2=${entry#*:} |
37 |
if [ ! -e ${arg2} ] |
40 |
if [ ! -e "${EPREFIX}"${arg2} ] |
38 |
then |
41 |
then |
39 |
ewarn "${arg2} doesn't appear to exist, although it ought to!" |
42 |
ewarn "${EPREFIX}${arg2} doesn't appear to exist, although it ought to!" |
40 |
continue |
43 |
continue |
41 |
fi |
44 |
fi |
42 |
einfo "Now adding ${arg2} to ${arg1} and /etc/sgml/catalog" |
45 |
einfo "Now adding ${EPREFIX}${arg2} to ${EPREFIX}${arg1} and ${EPREFIX}/etc/sgml/catalog" |
43 |
sgml-catalog_cat_doinstall ${arg1} ${arg2} |
46 |
sgml-catalog_cat_doinstall ${arg1} ${arg2} |
44 |
done |
47 |
done |
45 |
sgml-catalog_cleanup |
48 |
sgml-catalog_cleanup |
Lines 51-77
Link Here
|
51 |
|
54 |
|
52 |
sgml-catalog_pkg_postrm() { |
55 |
sgml-catalog_pkg_postrm() { |
53 |
debug-print function $FUNCNAME $* |
56 |
debug-print function $FUNCNAME $* |
|
|
57 |
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
54 |
|
58 |
|
55 |
for entry in ${SGML_TOINSTALL}; do |
59 |
for entry in ${SGML_TOINSTALL}; do |
56 |
arg1=`echo ${entry} | cut -f1 -d\:` |
60 |
arg1=${entry%%:*} |
57 |
arg2=`echo ${entry} | cut -f2 -d\:` |
61 |
arg2=${entry#*:} |
58 |
if [ -e ${arg2} ] |
62 |
if [ -e "${EPREFIX}"${arg2} ] |
59 |
then |
63 |
then |
60 |
ewarn "${arg2} still exists! Not removing from ${arg1}" |
64 |
ewarn "${EPREFIX}${arg2} still exists! Not removing from ${EPREFIX}${arg1}" |
61 |
ewarn "This is normal behavior for an upgrade ..." |
65 |
ewarn "This is normal behavior for an upgrade ..." |
62 |
continue |
66 |
continue |
63 |
fi |
67 |
fi |
64 |
einfo "Now removing $arg1 from $arg2 and /etc/sgml/catalog" |
68 |
einfo "Now removing ${EPREFIX}${arg1} from ${EPREFIX}${arg2} and ${EPREFIX}/etc/sgml/catalog" |
65 |
sgml-catalog_cat_doremove ${arg1} ${arg2} |
69 |
sgml-catalog_cat_doremove ${arg1} ${arg2} |
66 |
done |
70 |
done |
67 |
} |
71 |
} |
68 |
|
72 |
|
69 |
sgml-catalog_cleanup() { |
73 |
sgml-catalog_cleanup() { |
70 |
if [ -e /usr/bin/gensgmlenv ] |
74 |
has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
|
|
75 |
if [ -e "${EPREFIX}/usr/bin/gensgmlenv" ] |
71 |
then |
76 |
then |
72 |
einfo Regenerating SGML environment variables ... |
77 |
einfo Regenerating SGML environment variables ... |
73 |
gensgmlenv |
78 |
gensgmlenv |
74 |
grep -v export /etc/sgml/sgml.env > /etc/env.d/93sgmltools-lite |
79 |
grep -v export "${EPREFIX}/etc/sgml/sgml.env" > "${EPREFIX}/etc/env.d/93sgmltools-lite" |
75 |
fi |
80 |
fi |
76 |
} |
81 |
} |
77 |
|
82 |
|