Changeset 2758d94 for LFS/master.sh


Ignore:
Timestamp:
04/11/2019 07:40:50 AM (5 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
ablfs-more, legacy, trunk
Children:
0e4ddfa
Parents:
adbd09b
Message:

Use sect1info for getting informations on LFS packages:

  • add sect1info sections to packagemanager.xml.xxx + various fixes
  • add templates in LFS/lfs.xsl for script start and script end:
    • script start: define variables containing package information

print disk usage
unpack and change dir

  • script end: print disk usage

remove build dir

  • remove the corresponding operations from master.sh
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LFS/master.sh

    radbd09b r2758d94  
    117117    #
    118118    # Find the name of the tarball and the version of the package
    119     pkg_tarball=$(get_package_tarball_name $name)
    120     pkg_version=$(get_package_version $pkg_tarball)
     119    pkg_tarball=$(sed -n 's/tar -xf \(.*\)/\1/p' $file)
     120    pkg_version=$(sed -n 's/VERSION=\(.*\)/\1/p' $file)
    121121
    122122    # Drop in the name of the target on a new line, and the previous target
     
    126126    # If $pkg_tarball isn't empty, we've got a package...
    127127    if [ "$pkg_tarball" != "" ] ; then
    128       # Insert instructions for unpacking the package and to set the PKGDIR variable.
    129       LUSER_wrt_unpack "$pkg_tarball"
    130128      # Always initialize the log file, since the test instructions may be
    131129      # "uncommented" by the user
     
    146144      *)               LUSER_wrt_RunAsUser "$file" "$pkg_version" ;;
    147145    esac
    148 
    149     # Remove the build directory(ies) except if the package build fails
    150     # (so we can review config.cache, config.log, etc.)
    151     if [ "$pkg_tarball" != "" ] ; then
    152         case "${name}" in
    153         *xz-utils) LUSER_RemoveBuildDirs "xz" ;;
    154         *) LUSER_RemoveBuildDirs "$name" ;;
    155         esac
    156     fi
    157146
    158147    # Include a touch of the target name so make can check
     
    217206    # Find the tarball corresponding to our script.
    218207    # If it doesn't, we skip it in iterations rebuilds (except stripping).
    219     pkg_tarball=$(get_package_tarball_name $name)
    220     pkg_version=$(get_package_version $pkg_tarball)
     208    pkg_tarball=$(sed -n 's/tar -xf \(.*\)/\1/p' $file)
     209    pkg_version=$(sed -n 's/VERSION=\(.*\)/\1/p' $file)
    221210
    222211    if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then
     
    256245        CHROOT_wrt_TouchTimestamp
    257246      fi
    258       CHROOT_Unpack "$pkg_tarball"
    259247      # Always initialize the log file, so that the use may reinstate a
    260248      # commented out test
     
    274262    # except if the package build fails.
    275263    if [ "$pkg_tarball" != "" ] ; then
    276       case "${name}" in
    277         *xz-utils) CHROOT_wrt_RemoveBuildDirs "xz" ;;
    278         *) CHROOT_wrt_RemoveBuildDirs "$name" ;;
    279       esac
    280264      if [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then
    281265        CHROOT_wrt_LogNewFiles "$name"
     
    337321      *bootscripts)
    338322            name="lfs-bootscripts"
    339             pkg_tarball=$(get_package_tarball_name $name)
    340323            if [ "${INSTALL_LOG}" = "y" ] ; then
    341324              CHROOT_wrt_TouchTimestamp
    342325            fi
    343             CHROOT_Unpack "$pkg_tarball"
    344326        ;;
    345327      *network-scripts)
    346328            name="lfs-network-scripts"
    347             pkg_tarball=$(get_package_tarball_name $name)
    348329            if [ "${INSTALL_LOG}" = "y" ] ; then
    349330              CHROOT_wrt_TouchTimestamp
    350331            fi
    351             CHROOT_Unpack "$pkg_tarball"
    352332        ;;
    353333      *kernel)
    354334            name="linux"
    355             pkg_tarball=$(get_package_tarball_name $name)
    356335            if [ "${INSTALL_LOG}" = "y" ] ; then
    357336              CHROOT_wrt_TouchTimestamp
    358337            fi
    359             CHROOT_Unpack "$pkg_tarball"
    360338            # If using optimizations, use MAKEFLAGS (unless blacklisted)
    361339            # no setting of CFLAGS and friends.
     
    377355
    378356    case "${this_script}" in
    379       *bootscripts)      CHROOT_wrt_RemoveBuildDirs "dummy"
     357      *bootscripts|*network-scripts|*kernel)
    380358                         if [ "${INSTALL_LOG}" = "y" ] ; then
    381359                           CHROOT_wrt_LogNewFiles "$name"
    382360                         fi ;;
    383       *network-scripts)  CHROOT_wrt_RemoveBuildDirs "dummy"
    384                          if [ "${INSTALL_LOG}" = "y" ] ; then
    385                            CHROOT_wrt_LogNewFiles "$name"
    386                          fi ;;
    387       *kernel)           CHROOT_wrt_RemoveBuildDirs "dummy"
    388                          if [ "${INSTALL_LOG}" = "y" ] ; then
    389                            CHROOT_wrt_LogNewFiles "$name"
    390                          fi ;;
    391     esac
    392 
     361    esac
    393362    # Include a touch of the target name so make can check
    394363    # if it's already been made.
Note: See TracChangeset for help on using the changeset viewer.