Changeset 17364

Show
Ignore:
Timestamp:
05/08/06 06:40:51 (3 years ago)
Author:
bonefish
Message:

Workaround that fixes MIME DB problems under Linux, at least when
building an image from the scratch (with empty attributes and objects
dirs). This closes bugs 194 and 253.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • haiku/trunk/build/scripts/build_haiku_image

    r17344 r17364  
    8181$mkdir -p $mimeDBDest 
    8282mkdir -p $tmpDir 
     83mimeTmpDir=$tmpDir/mime 
     84mimeTmpIndex=0 
     85 
     86# create tmp dir for the MIME conversion stuff 
     87mkdir -p $mimeTmpDir 
    8388 
    8489echo "Installing MIME database ..." 
     
    8994 
    9095        # compile rdef to rsrc file and the rsrc file to attributes 
    91         tmpFile=$tmpDir/mimedb$$.rsrc 
    92         tmpFile2=$tmpDir/mimedb$$.mime 
     96        mimeTmpIndex=$[$mimeTmpIndex + 1] 
     97        tmpFile=$mimeTmpDir/mimedb$$_${mimeTmpIndex}.rsrc 
     98        tmpFile2=$mimeTmpDir/mimedb$$_${mimeTmpIndex}.mime 
    9399        $rc -o $tmpFile $inSuperFile 
    94100        mkdir -p $tmpFile2 
    95101        $resattr -O -o $tmpFile2 $tmpFile 
    96102        $cp -r ${sPrefix}$tmpFile2 $outSuperDir 
    97         rm -rf $tmpFile $tmpFile2 
    98103 
    99104        # iterate through the sub types 
     
    105110 
    106111                        # compile rdef to rsrc file and the rsrc file to attributes 
    107                         tmpFile=$tmpDir/mimedb$$.rsrc 
    108                         tmpFile2=$tmpDir/mimedb$$.mime 
     112                        mimeTmpIndex=$[$mimeTmpIndex + 1] 
     113                        tmpFile=$mimeTmpDir/mimedb$$_${mimeTmpIndex}.rsrc 
     114                        tmpFile2=$mimeTmpDir/mimedb$$_${mimeTmpIndex}.mime 
    109115                        $rc -o $tmpFile $inSubFile 
    110116                        $resattr -O -o $tmpFile2 $tmpFile 
    111117                        $cp ${sPrefix}$tmpFile2 $outSubFile 
    112                         rm -f $tmpFile $tmpFile2 
    113118                fi 
    114119        done 
    115120done 
    116121 
     122# cleanup tmp dir 
     123rm -rf $mimeTmpDir 
    117124 
    118125# unmount