# HG changeset patch # User Antoine Bodin # Date 1323484952 -3600 # Node ID 176f3c91b68ab1a3afa89b1ef64c732d91451f9c # Parent fcc1dc4dd1af83ffdd3ced3fefc941e51489dbbd# Parent c7c0554989406160c0bb40d495154d818c5a4e89 Merge hotfixes from default branch diff -r fcc1dc4dd1af -r 176f3c91b68a chroot-scripts/cook-toolchain --- a/chroot-scripts/cook-toolchain Sat Nov 26 12:55:25 2011 +0000 +++ b/chroot-scripts/cook-toolchain Sat Dec 10 03:42:32 2011 +0100 @@ -88,7 +88,7 @@ report open-bloc prepare_package report step "Running compilation rules" - cook_cross_toolchain + precook_tmp_toolchain report end-step || exit 1 report close-bloc report end-sublog diff -r fcc1dc4dd1af -r 176f3c91b68a tazwok --- a/tazwok Sat Nov 26 12:55:25 2011 +0000 +++ b/tazwok Sat Dec 10 03:42:32 2011 +0100 @@ -303,7 +303,7 @@ # Don't remove sources if a package uses src variable in its # genpkg_rules: it maybe needs something inside. for i in $PACKAGE $(look_for_rwanted); do - sed -n '/^genpkg_rules\(\)/','/}/'p $WOK/$i/receipt | \ + sed -n '/^genpkg_rules\(\)/','/^}/'p $WOK/$i/receipt | \ fgrep -q '$src' && tazwok_warning "Sources will not be removed \ because $i uses \$src in its receipt." && return done @@ -508,8 +508,7 @@ remove_previous_package() { - [ "$prev_VERSION" ] || return - if [ "$VERSION$EXTRAVERSION" != "$prev_VERSION" ]; then + if [ "$prev_VERSION" ] && [ "$VERSION$EXTRAVERSION" != "$prev_VERSION" ]; then rm -f $1/$PACKAGE-$prev_VERSION.tazpkg fi return 0 @@ -701,19 +700,22 @@ if grep -q ^compile_rules $RECEIPT; then echo "executing compile_rules" >> $LOG report step "Executing compile_rules" - cd $WOK/$PACKAGE + if [ -d "$src" ]; then + cd "$src" + else + cd $WOK/$PACKAGE + fi rm -f /tmp/config.site ulimit -d unlimited ulimit -m unlimited - # Free some RAM by cleaning cache if option is enabled. - freeram=$(free | fgrep '/+ buffers' | tr -s ' ' | cut -f 4 -d ' ') + freeram=$(free -m | fgrep 'Mem:' | tr -s ' ' | cut -f 4 -d ' ') - # Disable -pipe in CFLAGS/CXXFLAGS if less than 512Mb of free + # Disable -pipe in CFLAGS/CXXFLAGS if less than 512MB of free # RAM are available. - if [ "$freeram" -lt 524288 ] && [ "$CFLAGS" != "${CFLAGS/-pipe}" -o \ + if [ "$freeram" -lt 512 ] && [ "$CFLAGS" != "${CFLAGS/-pipe}" -o \ "$CXXFLAGS" != "${CXXFLAGS/-pipe}" ]; then - tazwok_warning "Disabling -pipe compile flag because only ${freeram}b of RAM is available." + tazwok_warning "Disabling -pipe compile flag because of low memory: $freeram MB available." CFLAGS="${CFLAGS/-pipe}" CXXFLAGS="${CXXFLAGS/-pipe}" fi