tazwok diff tazwok @ rev 434
Merge changes from default
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Tue Mar 08 23:08:17 2011 +0100 (2011-03-08) |
parents | 5b8e38bbae17 ff412a1044b0 |
children | 20352491a9df |
line diff
1.1 --- a/tazwok Sun Mar 06 19:02:57 2011 +0100 1.2 +++ b/tazwok Tue Mar 08 23:08:17 2011 +0100 1.3 @@ -44,7 +44,7 @@ 1.4 cook Compile and generate a package directly. 1.5 cook-list Cook all packages specified in the list by order. 1.6 cook-commit Cook all modified receipts. 1.7 - cook-all Cook all packages excepted toolchain. 1.8 + cook-all Cook all packages except toolchain. 1.9 cook-toolchain Cook the toolchain packages. 1.10 gen-cooklist Generate a sorted cooklist using packages or list. 1.11 sort-cooklist Sort the cooklist given in argument. 1.12 @@ -53,10 +53,10 @@ 1.13 new-tree Prepare a new package tree and receipt (--interactive). 1.14 gen-list (Re-)Generate a packages list for a repository. 1.15 check-list Update packages lists for a repository. 1.16 - gen-wok-db (Re-)Generate wok lists with depends and wanted datas. 1.17 + gen-wok-db (Re-)Generate wok lists with depends and wanted data. 1.18 gen-clean-wok Generate a clean wok in a dir. 1.19 clean-wok Clean entirely the wok. 1.20 - clean-src Remove old/unrelated-to-wok sources. 1.21 + clean-src Remove old/unrelated-to-wok sources. 1.22 remove Remove a package from the wok. 1.23 webserver Enable/disable webserver on localhost. 1.24 update-wok Update the wok. 1.25 @@ -66,12 +66,12 @@ 1.26 block Add package from the blocked list to prevent cooking it. 1.27 unblock Remove package from the blocked list.\n 1.28 1.29 - You can use `basename $0` command --help to list avaible options. 1.30 + You can use `basename $0` command --help to list available options. 1.31 \033[1mImportant - *: \033[0m Commands which need a rewrite." 1.32 } 1.33 1.34 -# This function display an error message without returning any error code. 1.35 -# It also log the message in source package's warnings.txt; this file can be 1.36 +# This function displays an error message without returning any error code. 1.37 +# It also logs the message in source package's warnings.txt; this file can be 1.38 # used on an eventual package page on website to display cooking warnings. 1.39 tazwok_warning() 1.40 { 1.41 @@ -294,12 +294,12 @@ 1.42 mv "$src/_pkg" $WOK/$PACKAGE/install 1.43 fi 1.44 1.45 - # Don't remove sources if a package use src variable in his 1.46 - # genpkg_rules: it maybe need something inside. 1.47 + # Don't remove sources if a package uses src variable in its 1.48 + # genpkg_rules: it maybe needs something inside. 1.49 for i in $PACKAGE $(look_for_rwanted); do 1.50 sed -n '/^genpkg_rules\(\)/','/}/'p $WOK/$i/receipt | \ 1.51 fgrep -q '$src' && tazwok_warning "Sources will not be removed \ 1.52 -because $i use \$src in his receipt." && return 1.53 +because $i uses \$src in its receipt." && return 1.54 done 1.55 1.56 report step "Removing sources directory" 1.57 @@ -308,7 +308,7 @@ 1.58 } 1.59 1.60 # Check $COOK_OPT; usage : get_cookopt particular_opt 1.61 -# Return error if not founded 1.62 +# Return error if not found 1.63 # Return args if the opt is in the format opt=arg1:arg2:etc 1.64 look_for_cookopt() 1.65 { 1.66 @@ -394,7 +394,7 @@ 1.67 # Don't cook if a depend is broken. 1.68 if [ "$broken_pkg" ]; then 1.69 MISSING_PACKAGE=$plan_remove 1.70 - echo "Can't cook $PACKAGE because broken depend(s) : $broken_pkg" >&2 1.71 + echo "Can't cook $PACKAGE because of broken depend(s) : $broken" >&2 1.72 unset plan_remove broken 1.73 1.74 # Set report step to failed. 1.75 @@ -441,7 +441,7 @@ 1.76 { 1.77 [ "$1" ] || return 1.78 report step "Removing previous build dependencies" 1.79 - echo "Removing theses packages : $@" 1.80 + echo "Removing these packages : $@" 1.81 for pkg in $@; do 1.82 [ -f "$INSTALLED/$pkg/receipt" ] && tazpkg remove $pkg --auto 1.83 done 1.84 @@ -450,7 +450,7 @@ 1.85 } 1.86 1.87 # Check if we can use the new way to handle tarball 1.88 -# or if we keep the previous method by check for 1.89 +# or if we keep the previous method by checking for 1.90 # _pkg=/src= in receipt and reverse-wanted. 1.91 check_for_var_modification() 1.92 { 1.93 @@ -470,7 +470,7 @@ 1.94 if check_for_var_modification src _pkg; then 1.95 src=$WOK/${WANTED:-$PACKAGE}/${WANTED:-$PACKAGE}-$VERSION 1.96 else 1.97 - tazwok_warning "Use original name or tarball root directory because src/_pkg are defined into the receipt (this is no more needed!)." 1.98 + tazwok_warning "Use original name or tarball root directory because src/_pkg is defined in the receipt (this is no longer needed!)." 1.99 src=$WOK/${WANTED:-$PACKAGE}/${SOURCE:-${WANTED:-$PACKAGE}}-$VERSION 1.100 fi 1.101 stuff=$WOK/$PACKAGE/stuff 1.102 @@ -555,7 +555,7 @@ 1.103 # Log process. 1.104 echo "untaring source tarball" >> $LOG 1.105 1.106 - # If $tmp_src exists, there's already the unpacked tarball into it. 1.107 + # If $tmp_src exists, there's already a unpacked tarball in it. 1.108 if ! [ -d $tmp_src ]; then 1.109 mkdir $tmp_src 1.110 if [ -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ] && [ "$repack_src" = yes ]; then 1.111 @@ -597,7 +597,7 @@ 1.112 mv $tmp_src/* $WOK/$PACKAGE 1.113 repack_src=no 1.114 rm -r $tmp_src 1.115 - tazwok_warning "Put all files into $WOK/$PACKAGE; not sure about how to handle this tarball (no root dir)... Please try to remove src/_pkg definition from receipt if you encounter a problem." 1.116 + tazwok_warning "Putting all files in $WOK/$PACKAGE; not sure about how to handle this tarball (no root dir)... Please try to remove src/_pkg definition from the receipt if you encounter any problems." 1.117 fi 1.118 fi 1.119 fi 1.120 @@ -611,7 +611,7 @@ 1.121 fi 1.122 1.123 # Remove previous tarball if no other package needs it. We take care to 1.124 - # keep tarball if the same package use it into main repository. 1.125 + # keep tarball if the same package uses it in the main repository. 1.126 if [ "$TARBALL" ]; then 1.127 previous_tarball=$(grep ^$PACKAGE:incoming $SOURCES_REPOSITORY/sources.list | cut -f2) 1.128 if [ "$previous_tarball" ]; then 1.129 @@ -670,13 +670,13 @@ 1.130 # RAM are available. 1.131 if [ "$freeram" -lt 524288 ] && [ "$CFLAGS" != "${CFLAGS/-pipe}" -o \ 1.132 "$CXXFLAGS" != "${CXXFLAGS/-pipe}" ]; then 1.133 - tazwok_warning "Disabling -pipe compile flag because only ${freeram}b of RAM are available." 1.134 + tazwok_warning "Disabling -pipe compile flag because only ${freeram}b of RAM is available." 1.135 CFLAGS="${CFLAGS/-pipe}" 1.136 CXXFLAGS="${CXXFLAGS/-pipe}" 1.137 fi 1.138 unset freeram 1.139 1.140 - # Set cook environnement variables. 1.141 + # Set cook environement variables. 1.142 [ "$src" ] || set_src_path 1.143 [ "$DESTDIR" ] || DESTDIR="$WOK/$PACKAGE/install" 1.144 [ "$CONFIG_SITE" ] || CONFIG_SITE=/etc/config.site 1.145 @@ -688,18 +688,18 @@ 1.146 compile_rules 1.147 1.148 # Check if config.site has been used. 1.149 - # /!\ disabled since it screw the return_code of the step. 1.150 + # /!\ disabled since it screws the return_code of the step. 1.151 #if [ -f /tmp/config.site ]; then 1.152 # rm /tmp/config.site 1.153 #else 1.154 # tazwok_warning "config.site hasn't been used during \ 1.155 -#configuration process." 1.156 +#the configuration process." 1.157 #fi 1.158 report end-step 1.159 fi 1.160 } 1.161 1.162 -# Check for loop in deps tree. /!\ can be removed 1.163 +# Check for loop in deps tree. /!\ can be removed. 1.164 check_for_deps_loop() 1.165 { 1.166 local list 1.167 @@ -710,7 +710,7 @@ 1.168 [ -n "$1" ] || return 1.169 list="" 1.170 1.171 - # Filter out already processed deps 1.172 + # Filter out already processed deps. 1.173 for i in $@; do 1.174 case " $ALL_DEPS" in 1.175 *\ $i\ *);; 1.176 @@ -752,14 +752,31 @@ 1.177 mkdir $tmp_src 1.178 cd $tmp_src 1.179 if [ "$BRANCH" ]; then 1.180 - git clone $file ${src##*/} && cd ${src##*/} && \ 1.181 + git clone $file ${src##*/} && cd ${src##*/} && \ 1.182 git checkout $BRANCH && rm -rf .git* && break 1.183 else 1.184 git clone $file ${src##*/} && rm -rf ${src##*/}/.git* && break 1.185 fi 1.186 revert_vcs_failure 1.187 else 1.188 - tazwok_warning "Needs git to download the source tarball from $file, please add it as build-depend." 1.189 + tazwok_warning "Needs git to download the source tarball from $file, please add it as a build-depend." 1.190 + continue 1.191 + fi 1.192 + ;; 1.193 + bazaar\|*) 1.194 + file=${file#bazaar|} 1.195 + [ "$COMMAND" = get-src ] && [ ! -f $INSTALLED/bazaar/receipt ] && tazpkg get-install bazaar --forced 1.196 + if [ -f $INSTALLED/bazaar/receipt ]; then 1.197 + mkdir $tmp_src 1.198 + cd $tmp_src 1.199 + if [ "$BRANCH" ]; then 1.200 + bzr co $file -r $BRANCH ${src##*/} && rm -rf ${src##*/}/.bzr* && break 1.201 + else 1.202 + bzr co $file ${src##*/} && rm -rf ${src##*/}/.bzr* && break 1.203 + fi 1.204 + revert_vcs_failure 1.205 + else 1.206 + tazwok_warning "Needs bazaar to download the source tarball from $file, please add it as a build-depend." 1.207 continue 1.208 fi 1.209 ;; 1.210 @@ -776,7 +793,7 @@ 1.211 fi 1.212 revert_vcs_failure 1.213 else 1.214 - tazwok_warning "Needs subversion to download the source tarball from $file, please add it as build-depend." 1.215 + tazwok_warning "Needs subversion to download the source tarball from $file, please add it as a build-depend." 1.216 continue 1.217 fi 1.218 ;; 1.219 @@ -793,7 +810,7 @@ 1.220 fi 1.221 revert_vcs_failure 1.222 else 1.223 - tazwok_warning "Needs mercurial to download the source tarball from $file, please add it as build-depend." 1.224 + tazwok_warning "Needs mercurial to download the source tarball from $file, please add it as a build-depend." 1.225 continue 1.226 fi 1.227 ;; 1.228 @@ -806,7 +823,7 @@ 1.229 wget -q --no-check-certificate $file && break 1.230 fi 1.231 else 1.232 - tazwok_warning "Needs wget to download the source tarball from $file, please add it as build-depend." 1.233 + tazwok_warning "Needs wget to download the source tarball from $file, please add it as a build-depend." 1.234 continue 1.235 fi 1.236 ;; 1.237 @@ -827,13 +844,13 @@ 1.238 done 1.239 } 1.240 1.241 -# Regenerate every package that wants a PACKAGE compiled 1.242 +# Regenerate every package that wants a PACKAGE compiled. 1.243 refresh_packages_from_compile() 1.244 { 1.245 - # make tazwok genpkg happy 1.246 + # make tazwok genpkg happy. 1.247 mkdir $WOK/$PACKAGE/taz 1.248 1.249 - # Cook rwanted in default or specied order 1.250 + # Cook rwanted in default or specied order. 1.251 genlist=" $(look_for_rwanted | tr '\n' ' ') " 1.252 for i in $(look_for_cookopt genpkg | tac); do 1.253 [ "${genlist/ $i }" = "$genlist" ] && continue 1.254 @@ -924,7 +941,7 @@ 1.255 report end-step 1.256 } 1.257 1.258 -# Remove .pyc and .pyo files from packages 1.259 +# Remove .pyc and .pyo files from packages. 1.260 py_compiled_files_remove() 1.261 { 1.262 report step "Removing all .pyc and .pyo files from package ..." 1.263 @@ -937,7 +954,7 @@ 1.264 check_fsh() 1.265 { 1.266 cd $WOK/$PACKAGE/taz/*/fs 1.267 - if [ -z "$(find * -type f)" ] && [ "$CATEGORY" != meta ]; then 1.268 + if [ -z "$(find * ! -type d)" ] && [ "$CATEGORY" != meta ]; then 1.269 echo "$PACKAGE fs is empty." >&2 1.270 cd $WOK/$PACKAGE && rm -rf taz 1.271 return 1 1.272 @@ -997,13 +1014,13 @@ 1.273 { 1.274 grep -q ^$PACKAGE$ $broken || echo $PACKAGE >> $broken 1.275 1.276 - # Remove pkg from cooklist to avoid re-cook it if no changes happens 1.277 + # Remove pkg from cooklist to avoid re-cook it if no changes happen 1.278 # in the cook stuff. 1.279 sed "/^$PACKAGE$/d" -i $cooklist $commit 1.280 1.281 gen_cookmd5 1.282 1.283 - # Return 1 to make report know that's mother-function failed. 1.284 + # Return 1 to make report know that its mother-function failed. 1.285 return 1 1.286 } 1.287 1.288 @@ -1051,7 +1068,7 @@ 1.289 report end-step 1.290 1.291 # Skip generic files for packages with a WANTED variable 1.292 - # (dev and splited pkgs). 1.293 + # (dev and split pkgs). 1.294 if [ ! "$WANTED" ]; then 1.295 copy_generic_files 1.296 fi 1.297 @@ -1113,7 +1130,7 @@ 1.298 [ "$prev_VERSION" ] && pkg_file=$rep/$PACKAGE-$prev_VERSION.tazpkg && break 1.299 done 1.300 if [ "$pkg_file" ]; then 1.301 - report step "Look for major/minor update in libraries" 1.302 + report step "Looking for major/minor updates in libraries" 1.303 get_pkg_files $pkg_file 1.304 cd $WOK/$PACKAGE/taz/$PACKAGE-$VERSION 1.305 fgrep ".so" files.list | egrep -v "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*" | \ 1.306 @@ -1153,7 +1170,7 @@ 1.307 1.308 # Build cpio archives. Find, cpio and gzip the fs, finish by 1.309 # removing the fs tree. 1.310 - # Don't log this because compression always output error messages. 1.311 + # Don't log this because compression always outputs error messages. 1.312 find fs -print | cpio -o -H newc | case "$PACKAGE-$COMPRESSION" in 1.313 tazpkg-lzma) gzip > fs.cpio.gz;; 1.314 *-lzma) lzma e fs.cpio.lzma -si;; 1.315 @@ -1184,7 +1201,7 @@ 1.316 1.317 # Recook of reverse-depends if package was broken. 1.318 if grep -q "^$PACKAGE$" $broken; then 1.319 - report step "Planning re-try a cook of reverse depends" 1.320 + report step "Planning a re-try cook of reverse depends" 1.321 sed "/^$PACKAGE$/d" -i $broken 1.322 for rdep in $(look_for_rdep); do 1.323 grep -q "^$rdep$" $broken || continue 1.324 @@ -1207,7 +1224,7 @@ 1.325 1.326 ######################################################################## 1.327 # This section contains functions used by several other functions 1.328 -# bellow. 1.329 +# below. 1.330 ######################## 1.331 1.332 # Look for receipt/files.list in wok. If they can't be found, get them 1.333 @@ -1242,7 +1259,7 @@ 1.334 1.335 packages_db_start 1.336 unset RECEIPT 1.337 - report step "Reading datas from all packages" 1.338 + report step "Reading data from all packages" 1.339 for pkg in $(echo $pkg_repository/*.tazpkg | fgrep -v '*'); do 1.340 get_packages_info 1.341 done 1.342 @@ -1319,20 +1336,20 @@ 1.343 packages_db_start() 1.344 { 1.345 if [ -s packages.txt ]; then 1.346 - sed -e 's/^# Packages :.*/# Packages : unknow/' \ 1.347 + sed -e 's/^# Packages :.*/# Packages : unknown/' \ 1.348 -e "s/# Date :.*/# Date : $(date +%Y-%m-%d\ \%H:%M:%S)/" \ 1.349 -i packages.txt 1.350 else 1.351 echo "# SliTaz GNU/Linux - Packages list 1.352 # 1.353 -# Packages : unknow 1.354 +# Packages : unknown 1.355 # Date : $(date +%Y-%m-%d\ \%H:%M:%S) 1.356 # 1.357 " > packages.txt 1.358 fi 1.359 1.360 - # Needed in some case as tazwok define RECEIPT at configuration time 1.361 - # in this particular case it can broke the script. 1.362 + # Needed in some cases as tazwok defines RECEIPT at configuration time 1.363 + # in this particular case it can break the script. 1.364 unset RECEIPT 1.365 1.366 # If $packages_repository is the main one, configure few functions 1.367 @@ -1369,11 +1386,11 @@ 1.368 1.369 get_packages_info() 1.370 { 1.371 - # If there's no taz folder in the wok, extract infos from the 1.372 + # If there's no taz folder in the wok, extract info from the 1.373 # package. 1.374 get_pkg_files $pkg 1.375 source_receipt 1.376 - echo "Getting datas from $PACKAGE" 1.377 + echo "Getting data from $PACKAGE" 1.378 1.379 cat >> $pkg_repository/packages.txt << _EOT_ 1.380 $PACKAGE 1.381 @@ -1392,7 +1409,7 @@ 1.382 # Packages.desc is used by Tazpkgbox <tree>. 1.383 echo "$PACKAGE | $VERSION$EXTRAVERSION | $SHORT_DESC | $CATEGORY | $WEB_SITE" >> $pkg_repository/packages.desc 1.384 1.385 - # Packages.equiv is used by tazpkg install to check depends 1.386 + # Packages.equiv is used by tazpkg install to check depends. 1.387 for i in $PROVIDE; do 1.388 DEST="" 1.389 echo $i | fgrep -q : && DEST="${i#*:}:" 1.390 @@ -1437,7 +1454,7 @@ 1.391 pkgs=$(wc -l packages.list | sed 's/ .*//') 1.392 sed "s/# Packages : .*/# Packages : $pkgs/" -i packages.txt 1.393 1.394 - # If lists was updated it's generally needed to sort them well. 1.395 + # If lists were updated it's generally needed to sort them well. 1.396 if ! sort -c packages.list 2> /dev/null; then 1.397 report step "Sorting packages lists" 1.398 files_list="packages.list packages.desc packages.equiv" 1.399 @@ -1451,7 +1468,7 @@ 1.400 report end-step 1.401 fi 1.402 1.403 - # Dont log this because lzma always output error. 1.404 + # Dont log this because lzma always output errors. 1.405 lzma e files.list files.list.lzma 1.406 rm -f files.list 1.407 [ -f packages.equiv ] || touch packages.equiv 1.408 @@ -1555,7 +1572,7 @@ 1.409 done 1.410 if [ "$status" = start ]; then 1.411 cp -f $tmp/db /tmp/remain-depends.txt 1.412 - echo "Can't go further because there's depency(ies) loop(s). The remaining packages will be commentend in the cookorder and will be unbuild in case of major update until the problem is solved." >&2 1.413 + echo "Can't go further because of dependency loop(s). The remaining packages will be commented in the cookorder and will be unbuilt in case of major updates until the problem is solved." >&2 1.414 for remaining in $(cut -f 1 $tmp/db); do 1.415 echo "$remaining" >> $blocked 1.416 done 1.417 @@ -1580,7 +1597,7 @@ 1.418 ######################################################################## 1.419 # SCAN CORE 1.420 ######################## 1.421 -# Include various scan core-functions. It's not intended to be used 1.422 +# Includes various scan core-functions. It's not intended to be used 1.423 # directly : prefer scan wrappers in next section. 1.424 1.425 look_for_dep() 1.426 @@ -1863,7 +1880,7 @@ 1.427 } 1.428 1.429 ######################################################################## 1.430 -# This section contains functions to check package repository and 1.431 +# This section contains functions to check the package repository and 1.432 # find which packages to cook. 1.433 ######################## 1.434 1.435 @@ -1900,7 +1917,7 @@ 1.436 # - in the wok/PACKAGE/taz/* folder 1.437 # - in the receipt in the package in incoming repository 1.438 # - in the receipt in the package in packages repository 1.439 - # If md5sum match, there's no commit. 1.440 + # If md5sums match, there's no commit. 1.441 check_for_commit_using_md5sum() 1.442 { 1.443 if [ ! -f $WOK/$PACKAGE/md5 ]; then 1.444 @@ -2034,7 +2051,7 @@ 1.445 fi 1.446 done 1.447 1.448 - # Remaining packages in cooklist are thoses without compile_rules. 1.449 + # Remaining packages in cooklist are those without compile_rules. 1.450 # They can be cooked first in any order. 1.451 if [ -f $tmp/cooklist.tmp ]; then 1.452 cat $tmp/cooklist.tmp >> $tmp/cooklist 1.453 @@ -2060,14 +2077,14 @@ 1.454 1.455 check_for_incoming() 1.456 { 1.457 - report step "Check that all packages were cooked fine" 1.458 + report step "Checking that all packages were cooked OK" 1.459 [ -s $INCOMING_REPOSITORY/packages.desc ] || { 1.460 echo "No packages in $INCOMING_REPOSITORY." 1.461 report end-step; return; } 1.462 if [ -s $broken ]; then 1.463 missingpkg=$(look_for_missing_pkg broken) 1.464 if [ "$missingpkg" ]; then 1.465 - echo "Don't move incoming packages to main repository because theses ones are broken:" >&2 1.466 + echo "Don't move incoming packages to main repository because these ones are broken:" >&2 1.467 echo "$missingpkg" 1.468 report end-step 1.469 return 1 1.470 @@ -2076,7 +2093,7 @@ 1.471 if [ -s $cooklist ]; then 1.472 missingpkg=$(look_for_missing_pkg cooklist) 1.473 if [ "$missingpkg" ]; then 1.474 - echo "Don't move incoming packages to main repository because theses ones needs to be cooked:" >&2 1.475 + echo "Don't move incoming packages to main repository because these ones need to be cooked:" >&2 1.476 echo "$missingpkg" 1.477 report end-step 1.478 return 1 1.479 @@ -2090,7 +2107,7 @@ 1.480 if [ -s $cooklist ]; then 1.481 missingpkg=$(look_for_missing_pkg cooklist) 1.482 if [ "$missingpkg" ]; then 1.483 - echo "Don't move incoming packages to main repository because theses ones needs to be cooked:" >&2 1.484 + echo "Don't move incoming packages to main repository because these ones need to be cooked:" >&2 1.485 echo "$missingpkg" 1.486 report end-step 1.487 return 1 1.488 @@ -2164,7 +2181,7 @@ 1.489 done > flavors.list 1.490 [ -x /usr/bin/clean-chroot ] && clean-chroot 1.491 else 1.492 - echo "Can't create up-to-date flavors because tazlito package is missing." >&2 1.493 + echo "Can't create up-to-date flavors because the tazlito package is missing." >&2 1.494 fi 1.495 report end-step 1.496 } 1.497 @@ -2254,7 +2271,7 @@ 1.498 unset store_pkgname 1.499 1.500 # Upgrade to cooked packages if it was previously installed. 1.501 - report step "Look for package(s) to upgrade" 1.502 + report step "Looking for package(s) to upgrade" 1.503 for pkg in $(look_for_rwanted) $PACKAGE; do 1.504 if [ -f $INSTALLED/$pkg/receipt ]; then 1.505 tazpkg get-install $pkg --forced 1.506 @@ -2278,7 +2295,7 @@ 1.507 [ "$regen_cooklist" ] && unset regen_cooklist && 1.508 [ "$COMMAND" != cook ] && sort_cooklist 1.509 1.510 - # Some hacks to set the bloc & function status as failed if cook was 1.511 + # Some hacks to set the bloc & function status as failed if cook has 1.512 # failed. 1.513 report_return_code=$cook_code 1.514 report close-bloc 1.515 @@ -2291,7 +2308,7 @@ 1.516 { 1.517 if [ -s $tmp/cooklist ]; then 1.518 if [ -f /usr/bin/tazchroot ]; then 1.519 - # Note : options -main variables- are automatically keeped by 1.520 + # Note : options -main variables- are automatically kept by 1.521 # the sub-applications tazchroot/tazwok; as well as report data. 1.522 cd $LOCAL_REPOSITORY 1.523 [ ! -f tazchroot.conf ] && configure_tazchroot 1.524 @@ -2330,8 +2347,8 @@ 1.525 # chroot_dir=/tmp/chroot-${undigest:-$SLITAZ_VERSION} 1.526 chroot_dir=\$LOCAL_REPOSITORY/chroot 1.527 1.528 -# Default scripts path (theses scripts are added in the 1.529 -# $chroot_dir/usr/bin and can be called with tazchroot script) 1.530 +# Default scripts path (these scripts are added to the 1.531 +# $chroot_dir/usr/bin and can be called with tazchroot script). 1.532 script_dir=/usr/lib/slitaz/chroot-scripts/tazwok 1.533 1.534 # List of directories to mount. 1.535 @@ -2355,7 +2372,7 @@ 1.536 $( [ "$undigest" ] && echo ' echo "undigest='"$undigest"'" >> $chroot_dir/etc/slitaz/tazwok.conf') 1.537 sed 's/LC_ALL/LC_ALL=POSIX/' -i \$chroot_dir/etc/profile 1.538 1.539 - # The build bot may run in a sandbox: link sandbox lockfile 1.540 + # The build bot may run in a sandbox: link sandbox lockfile. 1.541 ln -s \$LOCAL_REPOSITORY/sandbox/proc/1 \$chroot_dir/proc/1 1.542 } 1.543 1.544 @@ -2379,10 +2396,10 @@ 1.545 fi 1.546 ) 1.547 echo -e "\${LOCAL_REPOSITORY##*/}-incoming\nmain" > \$chroot_dir\$LOCALSTATE/priority 1.548 - mount -t proc proc \$chroot_dir/proc 1.549 - mount -t sysfs sysfs \$chroot_dir/sys 1.550 - mount -t devpts devpts \$chroot_dir/dev/pts 1.551 - mount -t tmpfs shm \$chroot_dir/dev/shm 1.552 + mount -o bind proc \$chroot_dir/proc 1.553 + mount -o bind sys \$chroot_dir/sys 1.554 + mount -o bind /dev/pts \$chroot_dir/dev/pts 1.555 + mount -o bind /dev/shm \$chroot_dir/dev/shm 1.556 for dir in \$list_dir; do 1.557 mkdir -p \$dir \$chroot_dir\$dir 1.558 mount \$dir \$chroot_dir\$dir 1.559 @@ -2406,7 +2423,7 @@ 1.560 ######################### END OF NEW FUNCTIONS ######################### 1.561 ######################################################################## 1.562 1.563 -# List packages providing a virtual package 1.564 +# List packages providing a virtual package. 1.565 whoprovide() 1.566 { 1.567 local i; 1.568 @@ -2446,7 +2463,7 @@ 1.569 $EDITOR $WOK/$PACKAGE/receipt 1.570 ;; 1.571 build-depends) 1.572 - # List dependencies to rebuild wok, or only a package 1.573 + # List dependencies to rebuild wok, or only a package. 1.574 get_tazwok_config 1.575 report(){ : ; } 1.576 if [ ! "$PACKAGE" ] || [ "$PACKAGE" = toolchain ]; then 1.577 @@ -2472,7 +2489,7 @@ 1.578 gen_cook_list 1.579 ;; 1.580 check-depends) 1.581 - # Check package depends /!\ 1.582 + # Check package depends /!\. 1.583 get_tazwok_config 1.584 echo "" 1.585 echo -e "\033[1mCheck every receipt for DEPENDS - doesn't scan ELF files\033[0m 1.586 @@ -2480,7 +2497,7 @@ 1.587 TMPDIR=/tmp/tazwok$$ 1.588 DEFAULT_DEPENDS="glibc-base gcc-lib-base" 1.589 1.590 - # Build ALL_DEPENDS variable 1.591 + # Build ALL_DEPENDS variable. 1.592 scan_dep() 1.593 { 1.594 local i 1.595 @@ -2500,13 +2517,13 @@ 1.596 done 1.597 } 1.598 1.599 - # Check for ELF file 1.600 + # Check for ELF file. 1.601 is_elf() 1.602 { 1.603 [ "$(dd if=$1 bs=1 skip=1 count=3 2> /dev/null)" = "ELF" ] 1.604 } 1.605 1.606 - # Print shared library dependencies 1.607 + # Print shared library dependencies. 1.608 ldd() 1.609 { 1.610 LD_TRACE_LOADED_OBJECTS=1 /lib/ld*.so $1 2> /dev/null 1.611 @@ -2553,7 +2570,7 @@ 1.612 rm -rf $TMPDIR 1.613 ;; 1.614 check) 1.615 - # Check wok consistency 1.616 + # Check wok consistency. 1.617 get_tazwok_config 1.618 echo "" 1.619 echo -e "\033[1mWok and packages checking\033[0m 1.620 @@ -2627,7 +2644,7 @@ 1.621 echo -e "$MSG $i" 1.622 MSG="" 1.623 done 1.624 - MSG="Dependencies loop between $PACKAGE and :\n" 1.625 + MSG="Dependency loop between $PACKAGE and :\n" 1.626 ALL_DEPS="" 1.627 check_for_deps_loop $PACKAGE $DEPENDS 1.628 [ -d $WOK/$pkg/taz ] && for i in $BUILD_DEPENDS; do 1.629 @@ -2795,7 +2812,7 @@ 1.630 check_for_list 1.631 report(){ : ; } 1.632 # When using sort-cooklist, the script should behave as for gen-cooklist 1.633 - # The only difference between theses two is where the output is sended. 1.634 + # The only difference between these two is where the output is sent. 1.635 COMMAND=gen-cooklist 1.636 gen_cook_list 1.637 cp -af $tmp/cooklist $LIST 1.638 @@ -2814,7 +2831,7 @@ 1.639 cook_list 1.640 ;; 1.641 clean) 1.642 - # Clean up a package work directory + thoses which want it. 1.643 + # Clean up a package work directory + those which want it. 1.644 # 1.645 get_tazwok_config 1.646 check_for_package_on_cmdline 1.647 @@ -2855,7 +2872,7 @@ 1.648 echo "" 1.649 ;; 1.650 clean-wok) 1.651 - # Clean all packages in the work directory 1.652 + # Clean all packages in the work directory. 1.653 # 1.654 get_tazwok_config 1.655 source_lib report 1.656 @@ -2887,13 +2904,13 @@ 1.657 exit 1 1.658 fi 1.659 echo "" 1.660 - echo -e "\033[1mObsolete/unrelated-to-wok sourcess :\033[0m" 1.661 + echo -e "\033[1mObsolete/unrelated-to-wok sources :\033[0m" 1.662 horizontal_line 1.663 cat $tmp/obsolete 1.664 horizontal_line 1.665 echo "$(wc -l $tmp/obsolete | cut -f1 -d' ') tarballs to remove." 1.666 echo "" 1.667 - echo -n "Please confirm removing (type uppercase YES): " 1.668 + echo -n "Please confirm before removing (type uppercase YES): " 1.669 read answer 1.670 if [ "$answer" = YES ]; then 1.671 echo -n "Removing old sources..." 1.672 @@ -2999,7 +3016,7 @@ 1.673 status 1.674 # Interactive mode, asking and seding. 1.675 if [ "$3" = "--interactive" ]; then 1.676 - echo "Entering into interactive mode..." 1.677 + echo "Entering interactive mode..." 1.678 echo "================================================================================" 1.679 echo "Package : $PACKAGE" 1.680 # Version. 1.681 @@ -3069,7 +3086,7 @@ 1.682 tazpkg get-install mercurial 1.683 else 1.684 echo "" >&2 1.685 - echo "You need to install mercurial to get wok from hg (recommended). Oherwise, you can switch wok get method to \"tarball\" into $LOCAL_RESOSITORY/tazwok.conf (per-repository configuration, it not always exists) or /etc/slitaz/tazwok.conf (global configuration)." | fold -s >&2 1.686 + echo "You need to install mercurial to get wok from hg (recommended). Otherwise, you can switch wok get method to \"tarball\" into $LOCAL_REPOSITORY/tazwok.conf (per-repository configuration, if it doesn't exist) or /etc/slitaz/tazwok.conf (global configuration)." | fold -s >&2 1.687 echo "">&2 1.688 exit 1 1.689 fi 1.690 @@ -3177,7 +3194,7 @@ 1.691 echo "$(wc -l $tmp/tags | cut -f1 -d ' ') tags listed." 1.692 ;; 1.693 check-src) 1.694 - # Verify if upstream package is still available 1.695 + # Verify if upstream package is still available. 1.696 # 1.697 get_tazwok_config 1.698 check_for_package_on_cmdline 1.699 @@ -3324,7 +3341,7 @@ 1.700 cd $LOCAL_REPOSITORY 1.701 configure_tazchroot 1.702 else 1.703 - echo "The packages tazchroot need to be installed" >&2 1.704 + echo "The package tazchroot needs to be installed" >&2 1.705 exit 1 1.706 fi 1.707 ;; 1.708 @@ -3337,7 +3354,7 @@ 1.709 [ ! -f tazchroot.conf ] && configure_tazchroot 1.710 tazchroot 1.711 else 1.712 - echo "The packages tazchroot need to be installed" >&2 1.713 + echo "The package tazchroot needs to be installed" >&2 1.714 exit 1 1.715 fi 1.716 ;; 1.717 @@ -3364,7 +3381,7 @@ 1.718 rm -r $LOCAL_REPOSITORY/chroot 1.719 1.720 else 1.721 - echo -e "\nThe package tazchroot need to be installed.\n" >&2 1.722 + echo -e "\nThe package tazchroot needs to be installed.\n" >&2 1.723 exit 1 1.724 fi 1.725 ;; 1.726 @@ -3384,7 +3401,7 @@ 1.727 [ -d $INSTALLED/$pkg ] || missing="$missing $pkg" 1.728 done 1.729 if [ "$missing" ]; then 1.730 - echo "You need to install those packages to start webserver: $missing." >&2 1.731 + echo "You need to install these packages to start webserver: $missing." >&2 1.732 exit 1 1.733 fi 1.734 if [ ! -f "$LOCAL_REPOSITORY/tazwok.conf" ]; then 1.735 @@ -3427,7 +3444,7 @@ 1.736 [ -L "$WEBSERVER/web" ] || ln -s /usr/share/slitaz/web $WEBSERVER 1.737 echo "WEBSERVER=\"$WEBSERVER\"" >> $LOCAL_REPOSITORY/tazwok.conf 1.738 if [ -L "$WEBSERVER/conf.php" ]; then 1.739 - echo "Do yo want to make ${undigest:-$SLITAZ_VERSION} the default page (y/N) ? " 1.740 + echo "Do you want to make ${undigest:-$SLITAZ_VERSION} the default page (y/N) ? " 1.741 read answer 1.742 if [ "$answer" = y ]; then 1.743 rm $WEBSERVER/conf.php 1.744 @@ -3448,7 +3465,7 @@ 1.745 rm $WEBSERVER/${undigest:-$SLITAZ_VERSION}-${dir##*/} 1.746 done 1.747 if ! [ -s "$WEBSERVER/repositories.list" ]; then 1.748 - echo "$WEBSERVER/repositories.list is empty; tazwok doesn't remove the server automatically in case you have important stuff in it. If it's not the case, you can remove it using: rm -r $WEBSERVER" 1.749 + echo "$WEBSERVER/repositories.list is empty; tazwok doesn't remove the server automatically in case you have important stuff in it. If that's not the case, you can remove it using: rm -r $WEBSERVER" 1.750 rm $WEBSERVER/conf.php 1.751 elif [ "$(readlink $WEBSERVER/conf.php)" = "$WEBSERVER/conf-${undigest:-$SLITAZ_VERSION}.php" ]; then 1.752 echo "${undigest:-$SLITAZ_VERSION} was the default version to use; switched to : $(sed 1!d $WEBSERVER/repositories.list)" 1.753 @@ -3466,7 +3483,7 @@ 1.754 check_root 1.755 check_for_package_on_cmdline 1.756 if ! [ -f $WOK/$PACKAGE/receipt ]; then 1.757 - echo "Can't find $PACKAGE into wok." >&2 1.758 + echo "Can't find $PACKAGE in wok." >&2 1.759 echo "" 1.760 exit 1 1.761 fi 1.762 @@ -3492,7 +3509,7 @@ 1.763 check_root 1.764 check_for_package_on_cmdline 1.765 if ! [ -f $WOK/$PACKAGE/receipt ]; then 1.766 - echo "Can't find $PACKAGE into wok." >&2 1.767 + echo "Can't find $PACKAGE in wok." >&2 1.768 echo "" 1.769 exit 1 1.770 fi