Changeset 0c25615 for npl


Ignore:
Timestamp:
09/26/17 14:09:23 (8 years ago)
Author:
Edwin Eefting <edwin@datux.nl>
Branches:
gcc484, master, perl-5.22
Children:
b9261a1
Parents:
c6da4cb
Message:

buildnumbers should be updated in rebuildcheck instead of buildrooted. initrd build number was not increased because of this

Location:
npl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • npl/kernel/initrd/initrd.build

    rc6da4cb r0c25615  
    1 6549
     16550
  • npl/rebuildcheck

    rc6da4cb r0c25615  
    4747{
    4848        DIR=$1
    49         MD5=`ls -lR "$DIR"|md5sum` 
     49        MD5=`ls -lR "$DIR"|md5sum`
    5050        ! grep -x "$MD5" "$DIR/.signature" &>/dev/null
    5151}
     
    8181if ! [ "$ignoremd5" ]; then
    8282        pushd "$DIR" >/dev/null || exit 1
    83         find . -type f | 
     83        find . -type f |
    8484                #negeer bepaalde files
    85                 egrep -v $IGNORE_REGEX | 
     85                egrep -v $IGNORE_REGEX |
    8686                while read FILE; do
    8787                        MD5=`md5sum "$FILE"`
     
    9191                                exit 2 #exit 2, rebuild dus
    9292                        fi
    93                 done 
     93                done
    9494        RET=$?
    9595        popd >/dev/null
    96        
    97         if [ "$RET" == "2" ]; then 
     96
     97        if [ "$RET" == "2" ]; then
    9898                REBUILD=1
    99         elif [ "$RET" != "0" ]; then 
     99        elif [ "$RET" != "0" ]; then
    100100                msg "ERROR!"
    101101                exit 1
     
    127127
    128128
    129 #if we need to rebuild because of a DEPERROR, check our direct dependencys first so that we rebuild the 
     129#if we need to rebuild because of a DEPERROR, check our direct dependencys first so that we rebuild the
    130130#"deepest" stuff first.
    131131if ! [ "$ignoredep" ] && [ "$DEPERROR" == "1" ]; then
    132132        for DEP in $DEPS; do
    133133                #zoek de buildbase op, als deze er al is
    134                 if BUILDBASE=`./findbuild "$DEP"` 2>/dev/null; then 
     134                if BUILDBASE=`./findbuild "$DEP"` 2>/dev/null; then
    135135                        msg "Dependency check $DEP"
    136136                        #note: niet de parameters meegeven, anders gaat hij alles rebuilden bij een force
     
    169169                if grep '#NOBUILDROOT' "$BUILDFILE" >/dev/null; then
    170170                        msg "Building package without buildroot!"
    171                         ( 
     171                        (
    172172                                cd `dirname $BUILDFILE` || exit 1
    173173                                $BUILDFILE $* || exit 1
    174174                        ) || fatal
    175175                else
    176                         ( 
     176                        (
    177177                                cd ../builder
    178178                                ./runrooted "$BUILDFILE" $*
     
    193193                                echo
    194194                                echo "################## DIFF of $PKG:"
    195                                 ./diffpkg $PKG 
     195                                ./diffpkg $PKG
    196196                                echo "################## end of DIFF $PKG "
    197197                        fi
    198198                done
     199
     200                msg "Updating build numbers for $BUILDFILE..."
     201                pushd $DIR > /dev/null
     202                for PKG in *.pkg; do
     203                        BUILD_FILE=`echo "$PKG"| sed 's/.pkg$//'`.build
     204                        BUILD=`cat $BUILD_FILE 2>/dev/null`
     205                        if [ "$BUILD" == "" ]; then
     206                                BUILD=1
     207                        else
     208                                (( BUILD=BUILD+1 ))
     209                        fi
     210                        echo $BUILD > $BUILD_FILE || exit 1
     211                done
     212                popd >/dev/null
     213
    199214        else
    200215                msg "Not building, only updating md5 sums.."
    201216        fi
    202        
     217
     218
     219
     220
    203221        msg "Updating md5 for $BUILDFILE..."
    204222        #bepaal en bewaar major versies waartegen we gebuild hebben
    205223        rm $MD5FILE &>/dev/null
    206224        pushd $DIR >/dev/null
    207         find . -type f| sort | 
     225        find . -type f| sort |
    208226                #negeer bepaalde files
    209                 egrep -v $IGNORE_REGEX | 
     227                egrep -v $IGNORE_REGEX |
    210228                while read FILE; do
    211229                        md5sum "$FILE" >> $MD5FILE
    212230                done
    213231        popd > /dev/null
    214                
     232
    215233        msg "Updating dependency information for $BUILDFILE..."
    216234        DEPVERFILE=`echo $BUILDFILE | sed 's/.SlackBuild$//g'`.depver
     
    235253#store_dir "$DIR"
    236254exit 0
    237 
    238 
Note: See TracChangeset for help on using the changeset viewer.