Changeset 3a27393 for common


Ignore:
Timestamp:
05/16/2006 06:27:02 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
25b52e2
Parents:
d68d2c1
Message:

Updated experimental to current trunk.

Location:
common
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • common/common-functions

    rd68d2c1 r3a27393  
    613613  # Create the packages file. We need it for proper Makefile creation
    614614  rm -f packages
    615   case "${PROGNAME}" in
    616     clfs)
    617       echo -n "Creating <${PROGNAME}> specific packages file"
    618       grep "\-version " $BOOK/packages.ent | sed -e 's@<!ENTITY @@' \
    619                                                  -e 's@">@"@' \
    620                                                  -e '/generic/d' > packages
    621      echo " ...OK"
    622      ;;
    623 
    624     hlfs)
    625       echo -n "Creating <${PROGNAME}> specific packages file"
    626       grep "\-version" $BOOK/general.ent | sed -e 's@<!ENTITY @@' \
    627                                                -e 's@">@"@' \
    628                                                -e '/generic/d' >> packages
    629       echo " ...OK"
    630       ;;
    631 
    632     lfs)
    633       echo -n "Creating <${PROGNAME}> specific packages file"
    634       grep "\-version" $BOOK/general.ent | sed -e 's@<!ENTITY @@' \
    635                                                -e 's@">@"@' \
    636                                                -e '/generic/d' >> packages
    637       echo " ...OK"
    638       ;;
    639   esac
     615  if [[ "${PROGNAME}" != "blfs" ]] ; then
     616    echo -n "Creating <${PROGNAME}> specific packages file"
     617    grep "\-version " $BOOK/packages.ent | sed -e 's@<!ENTITY @@' \
     618                                                -e 's@">@"@' > packages
     619    echo " ...OK"
     620  fi
    640621
    641622  # Done. Moving on...
     
    660641  cd $BUILDDIR/sources
    661642  [[ -f MD5SUMS ]] && rm MD5SUMS
    662   [[ -f MD5SUMS-$VERSION ]] && rm MD5SUMS-$VERSION
    663643  [[ -f MISSING_FILES.DMP ]] && rm MISSING_FILES.DMP
    664644  [[ -f urls.lst ]] && rm urls.lst
    665 
    666     # Download a fresh MD5SUMS file
    667   wget $SERVER/pub/lfs/conglomeration/MD5SUMS
    668645
    669646    # Generate URLs file
     
    682659            [[ "$VIMLANG" = "0" ]] && continue
    683660          ;;
     661        *linux/linux-* )
     662            [[ -z "$CONFIG" ]] && [[ -z "$BOOT_CONFIG" ]] && continue
     663          ;;
    684664    esac
    685665
     
    690670    BOOKMD5=`echo $line | cut -d" " -f3` # MD5 book value
    691671
    692     if [[ x"$BOOKMD5" != "x" ]]; then
    693       HAVEMD5=1
    694       MD5="$BOOKMD5  $FILE"
    695     else
    696       # Find the md5 sum for this package in the server MD5SUMS file.
    697       set +e
    698       HAVEMD5=1  # Always assume we have a MD5SUM
    699       MD5=`grep "  $FILE" MD5SUMS`
    700       if [ $? -ne 0 ]; then
    701         set -e
    702         gs_wrt_message "$FILE not found in MD5SUMS"
    703           # IMPORTANT:: There is no MD5SUM for this file.
    704         HAVEMD5=0
    705       fi
    706     fi
     672      # Validation pair
     673    MD5="$BOOKMD5  $FILE"
     674    HAVEMD5=1
    707675
    708676    set -e
     
    718686      echo "${BOLD}${YELLOW}$FILE: not found in ${SRC_ARCHIVE}${OFF}"
    719687      fromARCHIVE=0
    720       # If the file does not exist in /sources download a fresh one
     688      # If the file does not exist yet in /sources download a fresh one
    721689      if [ ! -f $FILE ] ; then
    722690        if ! wget $URL1 && ! wget $URL2 ; then
     
    727695    fi
    728696
    729       # Is there a MD5SUM to validate the file against.
    730     if [[ "$HAVEMD5" = "1" ]] ; then
    731         # IF the md5sum does not match the existing files
    732       if ! echo "$MD5" | md5sum -c - >/dev/null ; then
    733         [[ $fromARCHIVE = "1" ]] && echo "${BOLD}${YELLOW}MD5SUM did not match SRC_ARCHIVE copy${OFF}"
    734         [[ $fromARCHIVE = "0" ]] && echo "${BOLD}${YELLOW}MD5SUM did not match REMOTE copy${OFF}"
    735           # Remove the old file and download a new one
    736         rm -fv $FILE
    737           # Force generation of MD5SUM and storage in SRC_ARCHIVE
    738         fromARCHIVE=0;
    739           # Try and retrieve the file. Servers in reverse order.
    740         if ! wget $URL2 && ! wget $URL1 ; then
    741           gs_wrt_message "$FILE not found on the servers.. SKIPPING"
    742           continue
    743         fi
     697      # IF the md5sum does not match the existing files
     698    if ! echo "$MD5" | md5sum -c - >/dev/null ; then
     699      [[ $fromARCHIVE = "1" ]] && echo "${BOLD}${YELLOW}MD5SUM did not match SRC_ARCHIVE copy${OFF}"
     700      [[ $fromARCHIVE = "0" ]] && echo "${BOLD}${YELLOW}MD5SUM did not match REMOTE copy${OFF}"
     701        # Remove the old file and download a new one
     702      rm -fv $FILE
     703        # Force storage in SRC_ARCHIVE
     704      fromARCHIVE=0;
     705        # Try to retrieve again the file. Servers in reverse order.
     706      if ! wget $URL2 && ! wget $URL1 ; then
     707        gs_wrt_message "$FILE not found on the servers.. SKIPPING"
     708        continue
    744709      fi
    745710    fi
    746711
    747712      # Validate the MD5SUM one last time
    748     if [[ "$HAVEMD5" = "1" ]] && ! echo "$MD5" | md5sum -c - >/dev/null ; then
     713    if ! echo "$MD5" | md5sum -c - >/dev/null ; then
    749714      gs_wrt_message "$FILE does not match MD5SUMS value"
    750715      # Force generation of MD5SUM
     
    755720    if [[ "$HAVEMD5" = "0" ]] ; then
    756721      echo "${BOLD}${YELLOW}Generating a new MD5SUM for ${OFF}$FILE"
    757       echo "NEW MD5SUM $(md5sum $FILE)" >> MISSING_FILES.DMP
     722      echo "NEW MD5SUM: $(md5sum $FILE)" >> MISSING_FILES.DMP
    758723    fi
    759724
    760725      # Good or bad we write the original md5sum to a file
    761     echo "$MD5" >> MD5SUMS-$VERSION
     726    echo "$MD5" >> MD5SUMS
    762727
    763728     # Copy the freshly downloaded file
  • common/config

    rd68d2c1 r3a27393  
    6161
    6262#--- set default timezone.
    63 TIMEZONE=GMT
     63TIMEZONE=${TZ:-GMT}
    6464
    6565#--- install the optional vim-lang package  0(no)/1(yes)
  • common/func_validate_configs.sh

    rd68d2c1 r3a27393  
    170170    # This is a tricky little piece of code.. executes a cmd string.
    171171    case $config_param in
    172       BUILDDIR) # We cannot have an <empty> or </> root mount point
    173                   echo -e "`eval echo $PARAM_VALS`"
    174                   [[ "xx x/x" =~ "x${!config_param}x" ]] &&
    175                        write_error_and_die
    176                   ;;
    177172      TIMEZONE)   echo -e "`eval echo $PARAM_VALS`" ;;
    178173
     
    228223      #  warning -z+   -w+
    229224      SRC_ARCHIVE) validate_dir -z+ -d -w+ ;;
     225      BUILDDIR)   # The build directory/partition MUST exist and be writable by the user
     226                  validate_dir -z -d -w
     227                  [[ "xx x/x" =~ "x${!config_param}x" ]] &&
     228                       write_error_and_die
     229                  ;;
    230230
    231231      # Validate files, testable states:
  • common/urls.xsl

    rd68d2c1 r3a27393  
    5555      <xsl:text>/pub/lfs/conglomeration/</xsl:text>
    5656      <xsl:choose>
    57         <!-- Fix some directories. Test against dirname to be sure that we
    58         are matching the start of a package name, not a string in a patch name -->
     57        <!-- Fix some directories. Test against $dirname to be sure that we
     58        are matching the start of a package name, not a string in a patch name
     59        But some packages requires test against $package. -->
    5960        <xsl:when test="contains($dirname, 'bash')">
    6061          <xsl:text>bash/</xsl:text>
     62        </xsl:when>
     63        <xsl:when test="contains($package, 'dvhtool')">
     64          <xsl:text>dvhtool/</xsl:text>
    6165        </xsl:when>
    6266        <xsl:when test="contains($dirname, 'gcc')">
     
    6670          <xsl:text>glibc/</xsl:text>
    6771        </xsl:when>
    68         <xsl:when test="contains($dirname, 'tcl')">
     72        <xsl:when test="contains($package, 'powerpc-utils')">
     73          <xsl:text>powerpc-utils/</xsl:text>
     74        </xsl:when>
     75        <xsl:when test="contains($package, 'tcl')">
    6976          <xsl:text>tcl/</xsl:text>
    7077        </xsl:when>
Note: See TracChangeset for help on using the changeset viewer.