Magellan Linux

Diff of /branches/mage-next/src/depwalker.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2359 by niro, Mon Jan 6 12:35:42 2014 UTC revision 2360 by niro, Mon Jan 6 12:36:37 2014 UTC
# Line 29  decho() Line 29  decho()
29   source ${MLIBDIR}/mage4.functions.sh || \   source ${MLIBDIR}/mage4.functions.sh || \
30   die "mage functions missing"   die "mage functions missing"
31    
32    [ -f ${MLIBDIR}/smage2.functions.sh ] && \
33     source ${MLIBDIR}/smage2.functions.sh || \
34     die "smage functions missing"
35    
36  usage()  usage()
37  {  {
38   echo   echo
# Line 45  usage() Line 49  usage()
49   echo "                         install-build-prerequisites,"   echo "                         install-build-prerequisites,"
50   echo "                         pretend-build-prerequisites"   echo "                         pretend-build-prerequisites"
51   echo "  -d     --debug         enable debug mode"   echo "  -d     --debug         enable debug mode"
52     echo "  -s     --smage         use a smage to calculate dependencies"
53   echo   echo
54   echo "method, category, name, version and build must be given !"   echo "method, category, name, version and build must be given !"
55   echo   echo
# Line 64  do Line 69  do
69   --pbuild|-b) shift; PBUILD="$1" ;;   --pbuild|-b) shift; PBUILD="$1" ;;
70   --method|-m) shift; METHOD="$1" ;;   --method|-m) shift; METHOD="$1" ;;
71   --debug|-d) shift; DEBUG=1 ;;   --debug|-d) shift; DEBUG=1 ;;
72     --smage|-s) shift; SMAGEFILE="$1"; SILENT=1; FVERBOSE=off ;;
73   --help|-h) usage ;;   --help|-h) usage ;;
74   esac   esac
75   shift   shift
76  done  done
77    
78  # sanity checks; abort if not given  # sanity checks; abort if not given
79  [ -z "${PCAT}" ] && usage  if [[ -z ${SMAGEFILE} ]]
80  [ -z "${PNAME}" ] && usage  then
81  [ -z "${PVER}" ] && usage   [ -z "${PCAT}" ] && usage
82  [ -z "${PBUILD}" ] && usage   [ -z "${PNAME}" ] && usage
83     [ -z "${PVER}" ] && usage
84     [ -z "${PBUILD}" ] && usage
85    fi
86  [ -z "${METHOD}" ] && usage  [ -z "${METHOD}" ] && usage
87    
88  # check needed global vars  # check needed global vars
# Line 83  done Line 92  done
92    
93  # other needed vars  # other needed vars
94  ALLDEPS=""  ALLDEPS=""
95    if [[ -n ${SMAGEFILE} ]]
96    then
97     if [[ -e ${SMAGEFILE} ]]
98     then
99     smagesource "${SMAGEFILE}"
100     else
101     die "Smage file '${SMAGEFILE}' does not exist!"
102     fi
103    fi
104  MAGEFILE="${MAGEDIR}/${PCAT}/${PNAME}/${PNAME}-${PVER}-${PBUILD}.mage"  MAGEFILE="${MAGEDIR}/${PCAT}/${PNAME}/${PNAME}-${PVER}-${PBUILD}.mage"
105    
106  # much faster than fgrep  # much faster than fgrep
# Line 301  then Line 319  then
319   fi   fi
320   done   done
321  else  else
  LOOP_COUNTER=0  
322   # get all dependencies of the package   # get all dependencies of the package
323   depwalking ${MAGEFILE}   if [[ -n ${SMAGEFILE} ]]
324     then
325     depwalking "${SMAGEFILE}"
326     else
327     depwalking "${MAGEFILE}"
328     fi
329  fi  fi
330    
331  if [[ ${METHOD} != install-build-prerequisites ]] &&  if [[ ${METHOD} != install-build-prerequisites ]] &&

Legend:
Removed from v.2359  
changed lines
  Added in v.2360