834 |
|
|
835 |
regen_mage_tree() |
regen_mage_tree() |
836 |
{ |
{ |
837 |
local i |
local subpackage |
838 |
|
|
839 |
# build them only if requested |
# build them only if requested |
840 |
if [[ ${REGEN_MAGE_TREE} = true ]] |
if [[ ${REGEN_MAGE_TREE} = true ]] |
845 |
# build for each target a mage file |
# build for each target a mage file |
846 |
# run it with several targets |
# run it with several targets |
847 |
echo |
echo |
848 |
for i in ${MAGE_TARGETS} |
for subpackage in ${MAGE_TARGETS} |
849 |
do |
do |
850 |
build_mage_script --target "${i}" |
build_mage_script --target "${subpackage}" |
851 |
done |
done |
852 |
echo |
echo |
853 |
|
|
860 |
# build for each subpackage a mage file |
# build for each subpackage a mage file |
861 |
# run it with several targets |
# run it with several targets |
862 |
echo |
echo |
863 |
for i in ${SPLIT_PACKAGES} |
for subpackage in ${SPLIT_PACKAGES} |
864 |
do |
do |
865 |
# get the right variables for the split |
# get the right variables for the split |
866 |
export PNAME="${i}" |
export PNAME="${subpackage}" |
867 |
split_info_${i} |
split_info_${subpackage} |
868 |
|
# get the preinstall etc |
869 |
|
split_export_inherits ${subpackage} |
870 |
build_mage_script --split-pkg-base "${split_pkg_base}" |
build_mage_script --split-pkg-base "${split_pkg_base}" |
871 |
|
# delete split preinstall etc |
872 |
|
split_delete_inherits ${subpackage} |
873 |
# restore smage environment |
# restore smage environment |
874 |
split_restore_variables |
split_restore_variables |
875 |
done |
done |
1055 |
unset -f SAVED_postremove |
unset -f SAVED_postremove |
1056 |
} |
} |
1057 |
|
|
1058 |
|
split_export_inherits() |
1059 |
|
{ |
1060 |
|
local subpackage="$1" |
1061 |
|
local func |
1062 |
|
local newfunc |
1063 |
|
|
1064 |
|
for func in preinstall postinstall preremove postremove |
1065 |
|
do |
1066 |
|
if [[ ! -z $(typeset -f ${func}_${subpackage}) ]] |
1067 |
|
then |
1068 |
|
newfunc=$(typeset -f ${func}_${subpackage}) |
1069 |
|
newfunc="${newfunc/_${subpackage} (/ (}" |
1070 |
|
eval "${newfunc}" |
1071 |
|
fi |
1072 |
|
done |
1073 |
|
} |
1074 |
|
|
1075 |
|
split_delete_inherits() |
1076 |
|
{ |
1077 |
|
local subpackage="$1" |
1078 |
|
local func |
1079 |
|
|
1080 |
|
for func in preinstall postinstall preremove postremove |
1081 |
|
do |
1082 |
|
if [[ ! -z $(typeset -f ${func}_${subpackage}) ]] |
1083 |
|
then |
1084 |
|
unset -f ${func} |
1085 |
|
fi |
1086 |
|
done |
1087 |
|
} |
1088 |
|
|
1089 |
export_inherits() |
export_inherits() |
1090 |
{ |
{ |
1091 |
local include="$1" |
local include="$1" |