242 |
;; |
;; |
243 |
|
|
244 |
install) |
install) |
245 |
|
have_root_privileges || die "You must be root to run this operation." |
246 |
|
|
247 |
# first of all get the right pkg which going to be installed |
# first of all get the right pkg which going to be installed |
248 |
PCAT="$(pname2pcat ${MAGENAME})" |
PCAT="$(pname2pcat ${MAGENAME})" |
249 |
|
|
286 |
;; |
;; |
287 |
|
|
288 |
srcinstall) |
srcinstall) |
289 |
|
have_root_privileges || die "You must be root to run this operation." |
290 |
|
|
291 |
# first of all get the right pkg which going to be installed |
# first of all get the right pkg which going to be installed |
292 |
PCAT="$(pname2pcat ${MAGENAME})" |
PCAT="$(pname2pcat ${MAGENAME})" |
293 |
|
|
326 |
;; |
;; |
327 |
|
|
328 |
uninstall) |
uninstall) |
329 |
ALLDEPS="$(get_uninstall_candidates --pname ${MAGENAME})" |
have_root_privileges || die "You must be root to run this operation." |
330 |
if [ -z "${ALLDEPS}" ] |
|
331 |
then |
ALLDEPS="$(get_uninstall_candidates --pname ${MAGENAME})" |
332 |
die "No package installed named '${MAGENAME}'." |
if [ -z "${ALLDEPS}" ] |
333 |
fi |
then |
334 |
uninstall_packages ${ALLDEPS} |
die "No package installed named '${MAGENAME}'." |
335 |
|
fi |
336 |
|
uninstall_packages ${ALLDEPS} |
337 |
;; |
;; |
338 |
|
|
339 |
uppretend|srcuppretend) |
uppretend|srcuppretend) |
346 |
;; |
;; |
347 |
|
|
348 |
upgrade) |
upgrade) |
349 |
|
have_root_privileges || die "You must be root to run this operation." |
350 |
|
|
351 |
# get all dependencies of *all* installed packages |
# get all dependencies of *all* installed packages |
352 |
# fake pcat,pname,pver,pbuild ... |
# fake pcat,pname,pver,pbuild ... |
353 |
ALLDEPS="$(${MLIBDIR}/depwalker.sh \ |
ALLDEPS="$(${MLIBDIR}/depwalker.sh \ |
365 |
;; |
;; |
366 |
|
|
367 |
srcupgrade) |
srcupgrade) |
368 |
|
have_root_privileges || die "You must be root to run this operation." |
369 |
|
|
370 |
# get all dependencies of *all* installed packages |
# get all dependencies of *all* installed packages |
371 |
# fake pcat,pname,pver,pbuild ... |
# fake pcat,pname,pver,pbuild ... |
372 |
ALLDEPS="$(${MLIBDIR}/depwalker.sh \ |
ALLDEPS="$(${MLIBDIR}/depwalker.sh \ |
384 |
;; |
;; |
385 |
|
|
386 |
unpack) |
unpack) |
387 |
|
have_root_privileges || die "You must be root to run this operation." |
388 |
|
|
389 |
# first of all get the right pkg which going to be installed |
# first of all get the right pkg which going to be installed |
390 |
PCAT="$(pname2pcat ${MAGENAME})" |
PCAT="$(pname2pcat ${MAGENAME})" |
391 |
|
|
417 |
;; |
;; |
418 |
|
|
419 |
update) |
update) |
420 |
|
have_root_privileges || die "You must be root to run this operation." |
421 |
syncmage |
syncmage |
422 |
;; |
;; |
423 |
|
|
424 |
update-tarball) |
update-tarball) |
425 |
|
have_root_privileges || die "You must be root to run this operation." |
426 |
syncmage_tarball |
syncmage_tarball |
427 |
;; |
;; |
428 |
|
|
429 |
clean) |
clean) |
430 |
|
have_root_privileges || die "You must be root to run this operation." |
431 |
cleanpkg |
cleanpkg |
432 |
;; |
;; |
433 |
|
|
437 |
;; |
;; |
438 |
|
|
439 |
regen-mage-tree) |
regen-mage-tree) |
440 |
|
have_root_privileges || die "You must be root to run this operation." |
441 |
|
|
442 |
if [ -z "${SMAGESCRIPTSDIR}" ] || [ ! -d "${SMAGESCRIPTSDIR}" ] |
if [ -z "${SMAGESCRIPTSDIR}" ] || [ ! -d "${SMAGESCRIPTSDIR}" ] |
443 |
then |
then |
444 |
echo "SMAGESCRIPTSDIR not found. Check your mage.rc or check out smage repos." |
echo "SMAGESCRIPTSDIR not found. Check your mage.rc or check out smage repos." |