Changeset dd29d02


Ignore:
Timestamp:
06/23/2006 06:06:31 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
a2c9b41
Parents:
3d1b542
Message:

Removed obsolete code for packages file creation.
Improved the speed creation of pkg_tarball_list.
Moved the new functions to a more proper location.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/common-functions

    r3d1b542 rdd29d02  
    208208}
    209209
     210#----------------------------#
     211get_package_tarball_name() { #
     212#----------------------------#
     213  local script_name=$1
     214
     215   # The use of 'head' is necessary to limit the return value to the FIRST match..
     216   # hopefully this will not cause problems.
     217   #
     218   case $script_name in
     219     tcl)   echo $(grep "^tcl" $JHALFSDIR/pkg_tarball_list | head -n1 ) ;;
     220     *)     echo $(grep "^$script_name-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 ) ;;
     221   esac
     222
     223}
    210224
    211225#----------------------------------#
     
    536550      rm -rf $BUILDDIR/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc,root,sbin,srv,sys,tmp,tools,cross-tools,usr,var}
    537551      echo -ne "Cleaning $JHALFSDIR...\n"
    538       rm -rf $JHALFSDIR/{0*,1*,envars,sources-dir,*commands,logs,Makefile,*.xsl,makefile-functions,packages,patches}
     552      rm -rf $JHALFSDIR/{0*,1*,envars,sources-dir,*commands,*logs,Makefile,*.xsl,makefile-functions,pkg_tarball_list,*.config,*.sh}
    539553      echo -ne "Cleaning remainig extracted sources in $BUILDDIR/sources...\n"
    540554      rm -rf `find $BUILDDIR/sources/* -maxdepth 0 -type d`
     
    568582      cd ${PROGNAME}-$LFSVRS
    569583      if LC_ALL=C svn up | grep -q At && test -d $JHALFSDIR/${PROGNAME}-commands && \
    570       test -f $JHALFSDIR/packages ; then
     584      test -f $JHALFSDIR/pkg_tarball_list ; then
    571585        echo -ne "done\n"
    572586        # Set the canonical book version
     
    667681
    668682  # Create the packages file. We need it for proper Makefile creation
    669   rm -f packages
    670   echo -n "Creating <${PROGNAME}> specific packages file"
    671   grep "\-version " $BOOK/packages.ent | sed -e 's@<!ENTITY @@' \
    672                                              -e 's@">@"@' > packages
    673   echo " ...OK"
     683  create_package_list
    674684
    675685  # Done. Moving on...
     
    678688
    679689#----------------------------#
     690create_package_list() {      #
     691#----------------------------#
     692
     693  # Create the packages file. We need it for proper Makefile creation
     694  rm -f pkg_tarball_list
     695  echo -n "Creating <${PROGNAME}> list of tarball names for $BOOK $ARCH"
     696  case ${PROGNAME} in
     697    clfs)
     698        xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \
     699                 $BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1
     700      ;;
     701    hlfs)
     702        xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \
     703                 $BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
     704      ;;
     705    lfs)
     706        xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \
     707                 $BOOK/chapter03/chapter03.xml >>$LOGDIR/$LOG 2>&1
     708      ;;
     709  esac
     710  echo " ...OK"
     711
     712}
     713
     714
     715#----------------------------#
    680716get_sources() {              # Download file, write name to MISSING_FILES.DMP if an error
    681717#----------------------------#
    682718  local saveIFS=$IFS
    683719  local IFS line URL1 URL2 FILE BOOKMD5 MD5 HAVEMD5 fromARCHIVE
    684 
    685   # ALWAYS create a list of the full filenames
    686   create_package_list
    687720
    688721    # Test if the packages must be downloaded
     
    802835  fi
    803836}
    804 
    805 #----------------------------#
    806 create_package_list() {      #
    807 #----------------------------#
    808 
    809   # Create the packages file. We need it for proper Makefile creation
    810   echo -n "Creating <${PROGNAME}> list of tarball names for $BOOK $ARCH"
    811   case ${PROGNAME} in
    812     clfs)
    813         xsltproc --nonet \
    814                  --xinclude \
    815                  -o pkg_tarball_list packages.xsl $BOOK/${ARCH}-index.xml
    816       ;;
    817     hlfs | lfs )
    818         xsltproc --nonet \
    819                  --xinclude \
    820                  -o pkg_tarball_list packages.xsl $BOOK/index.xml
    821       ;;
    822   esac
    823   echo " ...OK"
    824 
    825 }
    826 
    827837
    828838#----------------------------#
     
    861871  cd $BUILDDIR/sources
    862872}
    863 
    864 
    865 #----------------------------#
    866 get_package_tarball_name() { #
    867 #----------------------------#
    868   local script_name=$1
    869 
    870    # The use of 'head' is necessary to limit the return value to the FIRST match..
    871    # hopefully this will not cause problems.
    872    #
    873    case $script_name in
    874      tcl)   echo $(grep "^tcl" $JHALFSDIR/pkg_tarball_list | head -n1 ) ;;
    875      *)     echo $(grep "^$script_name-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 ) ;;
    876    esac
    877 
    878 }
Note: See TracChangeset for help on using the changeset viewer.