Changeset 918 in MondoRescue for branches/stable


Ignore:
Timestamp:
Nov 3, 2006, 2:00:54 AM (17 years ago)
Author:
Bruno Cornec
Message:

New improvement for build system. By default now try to build in the rpm _topdir and check if it fails, rather than creating a different directory.

Location:
branches/stable
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi-busybox/distributions/rpm/mindi-busybox.spec

    r916 r918  
    3333%{__rm} -rf $RPM_BUILD_ROOT
    3434
    35 %post
    36 
    3735%files
    3836%defattr(-,root,root)
  • branches/stable/tools/distro-env

    r917 r918  
    121121
    122122# Default
    123 export TOPBUILDDIR=${TOPDIR}/../build
     123export TOPBUILDDIR=`rpm --showrc | grep -E '[   ]_topdir[   ]' | awk '{print $3}'`
    124124
    125125if [ _"$dtype" = _"rpm" ]; then
    126126    export ARCH=`rpm --showrc | egrep "^build arch" | awk '{print $4}'`
    127127    if [ -f ${HOME}/.rpmmacros ]; then
    128         export TOPBUILDDIR=`egrep '^%_topdir' ${HOME}/.rpmmacros | awk '{print $2}'`
     128        _TOPBUILDDIR=`egrep '^%_topdir' ${HOME}/.rpmmacros | awk '{print $2}'`
     129        if [ _"$_TOPBUILDDIR" != _"" ]; then
     130            export TOPBUILDDIR=$_TOPBUILDDIR
     131        fi
    129132    fi
    130133    mkdir -p ${TOPBUILDDIR}/{RPMS,SRPMS,SPECS,SOURCES,BUILD}
     134    if [ $? -ne 0 ]; then
     135        echo "Please ensure that you can write into ${TOPBUILDDIR}"
     136        echo "Solution: setup _topdir in your ~/.rpmmacros or"
     137        echo "chown the ${TOPBUILDDIR} to your uid"
     138        exit -1
     139    fi
    131140elif [ _"$dtype" = _"deb" ]; then
    132141    mkdir -p ${TOPBUILDDIR}
Note: See TracChangeset for help on using the changeset viewer.