Magellan Linux

Diff of /trunk/mage-buildserver/buildserver-functions.sh

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

revision 2778 by niro, Thu Aug 28 09:17:35 2014 UTC revision 3126 by niro, Tue May 12 14:44:22 2020 UTC
# Line 26  runarch-script() Line 26  runarch-script()
26    
27   # only allow the right arches   # only allow the right arches
28   case ${arch} in   case ${arch} in
29   i*86|x86_64) buildroot="${BUILDROOT}/${arch}"; os_arch="${arch}" ;;   i*86|x86_64|src|playground*) buildroot="${BUILDROOT}/${arch}"; os_arch="$(os-arch ${arch})" ;;
  src) os_arch="$(source ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/src/mage.rc; echo ${ARCH})"; buildroot="${BUILDROOT}/src" ;;  
30   *) die "unknown architecture '${arch}'" ;;   *) die "unknown architecture '${arch}'" ;;
31   esac   esac
32    
# Line 45  runarch-script() Line 44  runarch-script()
44   --bind=/usr/lib/mage-buildserver/helper:/usr/lib/mage-buildserver \   --bind=/usr/lib/mage-buildserver/helper:/usr/lib/mage-buildserver \
45   --bind=${BUILDROOT}/build-info/${arch}:/var/cache/mage-buildserver \   --bind=${BUILDROOT}/build-info/${arch}:/var/cache/mage-buildserver \
46   --bind=${BUILDROOT}/ssh:/root/.ssh \   --bind=${BUILDROOT}/ssh:/root/.ssh \
47     --bind=${BUILDROOT}/log/smage/${arch}:/var/log/smage \
48   bash --login "${script}" \   bash --login "${script}" \
49   || die "runarch-script '${script}' for '${arch}' failed."   || die "runarch-script '${script}' for '${arch}' failed."
50    
# Line 62  runarch() Line 62  runarch()
62    
63   # only allow the right arches   # only allow the right arches
64   case ${arch} in   case ${arch} in
65   i*86|x86_64|src) buildroot="${BUILDROOT}/${arch}"; runrc="${buildroot}/.runrc" ;;   i*86|x86_64|src|playground*) buildroot="${BUILDROOT}/${arch}"; runrc="${buildroot}/.runrc" ;;
66   *) die "unknown architecture '${arch}'" ;;   *) die "unknown architecture '${arch}'" ;;
67   esac   esac
68    
# Line 83  runarch-pkg-install() Line 83  runarch-pkg-install()
83    
84   if [ ! -f ${BUILDROOT}/.stamps/"${arch}"_"${pkg}"-ok ]   if [ ! -f ${BUILDROOT}/.stamps/"${arch}"_"${pkg}"-ok ]
85   then   then
86   runarch "${arch}" mage install "${pkg}" || die "${arch} install 'python'"   if [[ -z $(MROOT="${BUILDROOT}/${arch}" magequery -n "${pkg}") ]]
87     then
88     runarch "${arch}" mage install "${pkg}" || die "${arch} install 'python'"
89     else
90     echo "Warning: not running mage install '${pkg}' for arch '${arch}': package already installed."
91     fi
92   touch ${BUILDROOT}/.stamps/"${arch}"_"${pkg}"-ok   touch ${BUILDROOT}/.stamps/"${arch}"_"${pkg}"-ok
93   else   else
94   echo "Warning: '${pkg}' already installed for arch '${arch}'"   echo "Warning: '${pkg}' already installed for arch '${arch}'"
# Line 98  enum-build-arch-types() Line 103  enum-build-arch-types()
103   echo "${BUILD_ARCH[*]}"   echo "${BUILD_ARCH[*]}"
104  }  }
105    
106  enum-all-arch-types()  enum-playground-arch-types()
107  {  {
108   local arch   local arch
109   local build_arch_types   local build_arch_types
110    
  for arch in src ${BUILD_ARCH[*]}  
  do  
  if [ ! -e ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/${arch}/mage.rc ]  
  then  
  echo "Warning: mage.rc of '${arch}' not found. Arch '${arch}' ignored." >&2  
  else  
  build_arch_types+=( "${arch}" )  
  fi  
  done  
   
111   if [[ ${BUILD_PLAYGROUND} -eq 1 ]]   if [[ ${BUILD_PLAYGROUND} -eq 1 ]]
112   then   then
113   for arch in ${BUILD_ARCH[*]}   for arch in ${BUILD_ARCH[*]}
# Line 128  enum-all-arch-types() Line 123  enum-all-arch-types()
123    
124   echo "${build_arch_types[*]}"   echo "${build_arch_types[*]}"
125  }  }
126    
127    enum-all-arch-types()
128    {
129     local arch
130     local build_arch_types
131    
132     for arch in src $(enum-build-arch-types) $(enum-playground-arch-types)
133     do
134     if [ ! -e ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/${arch}/mage.rc ]
135     then
136     echo "Warning: mage.rc of '${arch}' not found. Arch '${arch}' ignored." >&2
137     else
138     build_arch_types+=( "${arch}" )
139     fi
140     done
141    
142     echo "${build_arch_types[*]}"
143    }

Legend:
Removed from v.2778  
changed lines
  Added in v.3126