1 |
#!/bin/bash |
#!/bin/bash |
2 |
# Magellan Linux Installer Functions (mage.functions.sh) |
# Magellan Linux Installer Functions (mage.functions.sh) |
3 |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.37 2008-06-16 09:29:27 niro Exp $ |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.38 2008-10-05 10:32:24 niro Exp $ |
4 |
|
|
5 |
mage_setup() |
mage_setup() |
6 |
{ |
{ |
298 |
|
|
299 |
ln -snf "${link}" "${MROOT}${pathto}" |
ln -snf "${link}" "${MROOT}${pathto}" |
300 |
|
|
301 |
# fix mtime and db |
# # fix mtime and db |
302 |
fix_descriptor ${pkgname}/.symlinks \ |
# fix_descriptor ${pkgname}/.symlinks \ |
303 |
"${pathto}" \ |
# "${pathto}" \ |
304 |
"${posix}" \ |
# "${posix}" \ |
305 |
"${link}" \ |
# "${link}" \ |
306 |
"$(fix_mtime "${BUILDDIR}/${pkgname}"/.mtime \ |
# "$(fix_mtime "${BUILDDIR}/${pkgname}"/.mtime \ |
307 |
"${MROOT}${pathto}")" |
# "${MROOT}${pathto}")" |
308 |
|
|
309 |
done < ${BUILDDIR}/${pkgname}/.symlinks |
done < ${BUILDDIR}/${pkgname}/.symlinks |
310 |
|
|
311 |
# now copy the fixed file over the old one |
# # now copy the fixed file over the old one |
312 |
[ -f ${BUILDDIR}/${pkgname}/.symlinks_fixed ] && \ |
# [ -f ${BUILDDIR}/${pkgname}/.symlinks_fixed ] && \ |
313 |
cp -f ${BUILDDIR}/${pkgname}/.symlinks{_fixed,} |
# cp -f ${BUILDDIR}/${pkgname}/.symlinks{_fixed,} |
314 |
|
|
315 |
# very important: unsetting the '§' fieldseperator |
# very important: unsetting the '§' fieldseperator |
316 |
IFS=$'\n' |
IFS=$'\n' |
2163 |
local count_current |
local count_current |
2164 |
local magefile |
local magefile |
2165 |
local src_install |
local src_install |
2166 |
|
local i |
2167 |
|
|
2168 |
# very basic getops |
# very basic getops |
2169 |
for i in $* |
for i in $* |
2239 |
|
|
2240 |
if [[ -z ${MAGE_TARGETS} ]] |
if [[ -z ${MAGE_TARGETS} ]] |
2241 |
then |
then |
2242 |
smage2file=${SMAGESCRIPTSDIR}/${pname}/${pname}-${pver}-${pbuild}.smage2 |
# basic svn compat |
2243 |
|
if [[ -d ${SMAGESCRIPTSDIR}/trunk ]] |
2244 |
|
then |
2245 |
|
for i in ${SMAGESCRIPTSDIR}/trunk/*/${pname}/${pname}-${pver}-${pbuild}.smage2 |
2246 |
|
do |
2247 |
|
smage2file="${i}" |
2248 |
|
done |
2249 |
|
else |
2250 |
|
smage2file=${SMAGESCRIPTSDIR}/${pname}/${pname}-${pver}-${pbuild}.smage2 |
2251 |
|
fi |
2252 |
else |
else |
2253 |
smage2file=${SMAGESCRIPTSDIR}/${pname/${MAGE_TARGETS}/}/${pname/${MAGE_TARGETS}/}-${pver}-${pbuild}.smage2 |
# basic svn compat |
2254 |
|
if [[ -d ${SMAGESCRIPTSDIR}/trunk ]] |
2255 |
|
then |
2256 |
|
for i in ${SMAGESCRIPTSDIR}/trunk/*/${pname/${MAGE_TARGETS}/}/${pname/${MAGE_TARGETS}/}-${pver}-${pbuild}.smage2 |
2257 |
|
do |
2258 |
|
smage2file="${i}" |
2259 |
|
done |
2260 |
|
else |
2261 |
|
smage2file=${SMAGESCRIPTSDIR}/${pname/${MAGE_TARGETS}/}/${pname/${MAGE_TARGETS}/}-${pver}-${pbuild}.smage2 |
2262 |
|
fi |
2263 |
fi |
fi |
2264 |
if [ -f "${smage2file}" ] |
if [ -f "${smage2file}" ] |
2265 |
then |
then |
2789 |
[[ ${USE_UNSTABLE} = true ]] && local MAGE_DISTRIBUTION=unstable |
[[ ${USE_UNSTABLE} = true ]] && local MAGE_DISTRIBUTION=unstable |
2790 |
[[ ${USE_TESTING} = true ]] && local MAGE_DISTRIBUTION=testing |
[[ ${USE_TESTING} = true ]] && local MAGE_DISTRIBUTION=testing |
2791 |
|
|
2792 |
local EXCLUDED="${MROOT}/etc/mage-profile/package.blacklist-${ARCH}-${MAGE_DISTRIBUTION}" |
local EXCLUDED="/etc/mage-profile/package.blacklist-${ARCH}-${MAGE_DISTRIBUTION}" |
2793 |
|
|
2794 |
# return 0 if the list not exist; nothin is masked |
# return 0 if the list not exist; nothin is masked |
2795 |
[[ ! -f ${EXCLUDED} ]] && return 0 |
[[ ! -f ${EXCLUDED} ]] && return 0 |