Magellan Linux

Diff of /trunk/mage-buildserver/helper/buildserver-build-install-prerequisites.sh

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

revision 2747 by niro, Wed Aug 13 14:02:51 2014 UTC revision 2935 by niro, Wed Feb 3 11:56:20 2016 UTC
# Line 2  Line 2 
2    
3  BUILDSERVER_CACHE_DIR="/var/cache/mage-buildserver"  BUILDSERVER_CACHE_DIR="/var/cache/mage-buildserver"
4  SMAGEFILE="$1"  SMAGEFILE="$1"
5    CLEANPACKAGES=0
6    
7  if [ -f /etc/rc.d/init.d/functions ]  if [ -f /etc/rc.d/init.d/functions ]
8  then  then
# Line 72  fi Line 73  fi
73    
74  if [ -f ${SMAGESCRIPTSDIR}/${SMAGEFILE} ]  if [ -f ${SMAGESCRIPTSDIR}/${SMAGEFILE} ]
75  then  then
76   SILENT=1 smagesource ${SMAGESCRIPTSDIR}/${SMAGEFILE}   # be silent
77     FVERBOSE=off \
78     SILENT=1 \
79     smagesource ${SMAGESCRIPTSDIR}/${SMAGEFILE}
80  else  else
81   die "smagefile '${SMAGESCRIPTSDIR}/${SMAGEFILE}' not found."   die "smagefile '${SMAGESCRIPTSDIR}/${SMAGEFILE}' not found."
82  fi  fi
83    
84    # don't want to run any exported post/preinstall or post/preremove
85    # functions of the smage here because they will be exported globally
86    # and honored by every package which does not override these function.
87    # the final package (the smage itself) will not be installed via this script,
88    # so these functions can be safely ignored.
89    for func in {pre,post}{install,remove}
90    do
91     if [[ $(typeset -f ${func}) ]]
92     then
93     unset "${func}"
94     fi
95    done
96    
97  # create build info dir  # create build info dir
98  install -d ${BUILDSERVER_CACHE_DIR}/build  install -d ${BUILDSERVER_CACHE_DIR}/build
99    
# Line 119  SAVED_PKGDIR="${PKGDIR}" Line 136  SAVED_PKGDIR="${PKGDIR}"
136  PKGDIR="/var/cache/mage/tmp-packages"  PKGDIR="/var/cache/mage/tmp-packages"
137  install -d "${PKGDIR}"  install -d "${PKGDIR}"
138    
139    # clean all tmp-packages if requested
140    if [[ ${CLEAN_TMP_PACKAGES} = 1 ]]
141    then
142     echo "Cleaning tmp-packages as requested"
143     cleanpkg
144    fi
145    
146  # now install the packages (no srcinstall, when the user not explcitly want this)  # now install the packages (no srcinstall, when the user not explcitly want this)
147  fetch_packages ${INSTALL_DEPS} || die "fetching packages"  fetch_packages ${INSTALL_DEPS} || die "fetching packages"
148  md5sum_packages ${INSTALL_DEPS} || die "md5 sum packages"  md5sum_packages ${INSTALL_DEPS} || die "md5 sum packages"
 unpack_packages ${INSTALL_DEPS} || die "unpacking packages"  
149  install_packages ${INSTALL_DEPS} || die "installing packages"  install_packages ${INSTALL_DEPS} || die "installing packages"
150  cleanpkg  if [[ ${CLEANPACKAGES} = 1 ]]
151    then
152     cleanpkg
153    fi
154  # restore packages path  # restore packages path
155  PKGDIR="${SAVED_PKGDIR}"  PKGDIR="${SAVED_PKGDIR}"
156    

Legend:
Removed from v.2747  
changed lines
  Added in v.2935