Changeset f33756b


Ignore:
Timestamp:
10/05/2013 05:52:45 PM (11 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
ablfs
Children:
6216d18c
Parents:
3fed586
Message:

merge trunk r3730:3732

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • LFS/master.sh

    r3fed586 rf33756b  
    114114    #--------------------------------------------------------------------#
    115115    #
     116    # Find the name of the tarball and the version of the package
     117    pkg_tarball=$(get_package_tarball_name $name)
     118    pkg_version=$(get_package_version $pkg_tarball)
     119
    116120    # Drop in the name of the target on a new line, and the previous target
    117121    # as a dependency. Also call the echo_message function.
    118     LUSER_wrt_target "${this_script}" "$PREV"
    119 
    120     # Find the version of the command files, if it corresponds with the building of
    121     # a specific package
    122     pkg_tarball=$(get_package_tarball_name $name)
     122    LUSER_wrt_target "${this_script}" "$PREV" "$pkg_version"
    123123
    124124    # If $pkg_tarball isn't empty, we've got a package...
     
    127127      LUSER_wrt_unpack "$pkg_tarball"
    128128      # If the testsuites must be run, initialize the log file
    129       [[ "$TEST" = "3" ]] && LUSER_wrt_test_log "${this_script}"
     129      [[ "$TEST" = "3" ]] && LUSER_wrt_test_log "${this_script}" "$pkg_version"
    130130      # If using optimizations, write the instructions
    131131      [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     
    136136    # The changingowner script must be run as root.
    137137    case "${this_script}" in
    138       *changingowner)  wrt_RunAsRoot "$file" ;;
    139       *)               LUSER_wrt_RunAsUser "$file" ;;
     138      *changingowner)  wrt_RunAsRoot "$file" "$pkg_version" ;;
     139      *)               LUSER_wrt_RunAsUser "$file" "$pkg_version" ;;
    140140    esac
    141141
     
    214214    # iterations rebuilds
    215215    pkg_tarball=$(get_package_tarball_name $name)
     216    pkg_version=$(get_package_version $pkg_tarball)
    216217
    217218    if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then
     
    239240    # and not to use chroot.
    240241    case "${this_script}" in
    241       *kernfs)  LUSER_wrt_target  "${this_script}" "$PREV" ;;
    242       *)        CHROOT_wrt_target "${this_script}" "$PREV" ;;
     242      *kernfs)  LUSER_wrt_target  "${this_script}" "$PREV" "$pkg_version" ;;
     243      *)        CHROOT_wrt_target "${this_script}" "$PREV" "$pkg_version" ;;
    243244    esac
    244245
     
    255256      case $name in
    256257        binutils | gcc | glibc | gmp | mpfr )
    257           [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"
     258          [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}" "$pkg_version"
    258259          ;;
    259260        * )
    260           [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}"
     261          [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}" "$pkg_version"
    261262          ;;
    262263      esac
     
    268269    # and not to use chroot.
    269270    case "${this_script}" in
    270       *kernfs)  wrt_RunAsRoot  "$file" ;;
    271       *)        CHROOT_wrt_RunAsRoot "$file" ;;
     271      *kernfs)  wrt_RunAsRoot  "$file" "$pkg_version" ;;
     272      *)        CHROOT_wrt_RunAsRoot "$file" "$pkg_version" ;;
    272273    esac
    273274
  • common/libs/func_book_parser

    r3fed586 rf33756b  
    3232           cd ${PROGNAME}-$LFSVRS
    3333           echo "Checking out $LFSVRS at $PWD in $TREE"
    34            git checkout -b ${TREE} ${TREE} >>$LOGDIR/$LOG 2>&1
     34           git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
    3535        fi
    3636    else
    3737      cd ${PROGNAME}-$LFSVRS
    3838      case $PROGNAME in
    39         clfs*)  git checkout master >>$LOGDIR/$LOG 2>&1
    40                 git pull >>$LOGDIR/$LOG 2>&1
     39        clfs*)  git pull >>$LOGDIR/$LOG 2>&1
    4140                if [ ! $TREE == "development" ]; then
    4241                   git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
  • common/libs/func_wrt_Makefile

    r3fed586 rf33756b  
    5959
    6060
    61 #==== PACKAGES NAMES ===
     61#==== PACKAGES NAMES AND VERSIONS ====
    6262
    6363#----------------------------------#
     
    117117}
    118118
     119#----------------------------------#
     120get_package_version() {            #
     121#----------------------------------#
     122# Those hacks may change depending on the invention of devs for tarball names.
     123# Normally, we expect -digit to signal the beginning of the version field
     124# but it may happen that there is no '-' (tcl, expect), that the version
     125# field is ddd-d (pkg-config-lite-028-1, since sed is greedy, it finds only
     126# the second dash) or that the first character of the version is not a digit
     127# (iputils-s20121221)...
     128  case ${1} in
     129     tcl*|expect*|tzdata*|xmlts*|unzip*|lynx*)
     130                           echo ${1} | sed -e 's@^[^[:digit:]]*@@' \
     131                                           -e 's@\(-src\)*\.tar.*@@'
     132        ;;
     133     iputils*)             echo ${1} | sed -e 's@^.*-@@' \
     134                                           -e 's@\.tar.*@@'
     135        ;;
     136     LVM*)                 echo ${1} | sed -e 's@^[^.]*\.@@' \
     137                                           -e 's@\.tgz.*@@'
     138        ;;
     139     iproute*)             echo ${1} | sed -e 's@^[^-]*-@@' \
     140                                           -e 's@\.tar.*@@'
     141        ;;
     142     pkg*|udev*|Singular*)
     143                           echo ${1} | sed -e 's@^.*[a-z]-\([[:digit:]]\)@\1@' \
     144                                           -e 's@\.tar.*@@' \
     145                                           -e 's@\.zip.*@@'
     146        ;;
     147     *)                    echo ${1} | sed -e 's@^.*[-_]\([[:digit:]]\)@\1@' \
     148                                           -e 's@\.tar.*@@' \
     149                                           -e 's@\.zip.*@@'
     150        ;;
     151  esac
     152
     153}
    119154#=======================
    120155
     
    127162  local i=$1
    128163  local PREV=$2
     164  local version
     165  if [ "$3" != "" ]; then
     166    version=-$3
     167  fi
    129168(
    130169cat << EOF
     
    133172        @\$(call echo_message, Building)
    134173${NO_PROGRESS}  @export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID &
    135         @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@
    136         @\$(PRT_DU) >>logs/\$@
     174        @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@$version
     175        @\$(PRT_DU) >>logs/\$@$version
    137176EOF
    138177) >> $MKFILE.tmp
     
    144183  local i=$1
    145184  local PREV=$2
     185  local version
     186  if [ "$3" != "" ]; then
     187    version=-$3
     188  fi
    146189(
    147190cat << EOF
     
    150193        @\$(call echo_message, Building)
    151194${NO_PROGRESS}  @export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID &
    152         @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@
    153         @\$(PRT_DU_CR) >>logs/\$@
     195        @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@$version
     196        @\$(PRT_DU_CR) >>logs/\$@$version
    154197EOF
    155198) >> $MKFILE.tmp
     
    212255LUSER_wrt_test_log() {             # Initialize testsuite log file
    213256#----------------------------------#
    214   local TESTLOGFILE=$1
     257  local version
     258  if [ "$2" != "" ]; then
     259    version=-$2
     260  fi
     261  local TESTLOGFILE=$1$version
    215262(
    216263cat  << EOF
    217264        @echo "export  TEST_LOG=\$(TESTLOGDIR)/$TESTLOGFILE" >> envars && \\
    218         echo "\$(nl_)\`date\`\$(nl_)" >\$(TESTLOGDIR)/\$@
     265        echo "\$(nl_)\`date\`\$(nl_)" >\$(TESTLOGDIR)/$TESTLOGFILE
    219266EOF
    220267) >> $MKFILE.tmp
     
    224271CHROOT_wrt_test_log() {            #
    225272#----------------------------------#
    226   local TESTLOGFILE=$1
     273  local version
     274  if [ "$2" != "" ]; then
     275    version=-$2
     276  fi
     277  local TESTLOGFILE=$1$version
    227278(
    228279cat  << EOF
    229280        @echo "export TEST_LOG=\$(crTESTLOGDIR)/$TESTLOGFILE" >> envars && \\
    230         echo "\$(nl_)\`date\`\$(nl_)" >test-logs/\$@
     281        echo "\$(nl_)\`date\`\$(nl_)" >\$(crTESTLOGDIR)/$TESTLOGFILE
    231282EOF
    232283) >> $MKFILE.tmp
     
    242293#----------------------------------#
    243294  local MOUNT_ENV
     295  local version
     296  if [ "$2" != "" ]; then
     297    version=-$2
     298  fi
    244299  local file=$1
    245300
     
    256311cat << EOF
    257312        @export ${MOUNT_ENV}=\$(MOUNT_PT) && \\
    258         ${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@ 2>&1 && \\
    259         \$(PRT_DU) >>logs/\$@
     313        ${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@$version 2>&1 && \\
     314        \$(PRT_DU) >>logs/\$@$version
    260315EOF
    261316) >> $MKFILE.tmp
     
    266321#----------------------------------#
    267322  local file=$1
     323  local version
     324  if [ "$2" != "" ]; then
     325    version=-$2
     326  fi
    268327
    269328(
    270329cat << EOF
    271330        @source ~/.bashrc && \\
    272         \$(CMDSDIR)/`dirname $file`/\$@ >> logs/\$@ 2>&1 && \\
    273         \$(PRT_DU) >>logs/\$@
     331        \$(CMDSDIR)/`dirname $file`/\$@ >> logs/\$@$version 2>&1 && \\
     332        \$(PRT_DU) >>logs/\$@$version
    274333EOF
    275334) >> $MKFILE.tmp
     
    280339#----------------------------------#
    281340  local file=$1
     341  local version
     342  if [ "$2" != "" ]; then
     343    version=-$2
     344  fi
    282345(
    283346cat << EOF
    284347        @source envars && \\
    285         \$(crCMDSDIR)/`dirname $file`/\$@ >>logs/\$@ 2>&1 && \\
    286         \$(PRT_DU_CR) >>logs/\$@
     348        \$(crCMDSDIR)/`dirname $file`/\$@ >>logs/\$@$version 2>&1 && \\
     349        \$(PRT_DU_CR) >>logs/\$@$version
    287350EOF
    288351) >> $MKFILE.tmp
  • jhalfs

    r3fed586 rf33756b  
    180180      clfs* )
    181181        LFSVRS=${BRANCH_ID}
    182         TREE=tags/clfs-${BRANCH_ID}
     182        TREE=clfs-${BRANCH_ID}
    183183        ;;
    184184      * )
Note: See TracChangeset for help on using the changeset viewer.