cookutils rev 860
cook: changed the algorithm for determining the free memory: Busybox-1.26.1 has different output of the `free` command.
I believe with /proc/meminfo it will be more consistent result.
I believe with /proc/meminfo it will be more consistent result.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sun Jan 08 01:50:38 2017 +0200 (2017-01-08) |
parents | 0ade59078977 |
children | 1b9bb2671837 |
files | cook po/cook.pot po/fr.po po/pt_BR.po po/ru.po po/zh_CN.po po/zh_TW.po |
line diff
1.1 --- a/cook Mon Jan 02 06:14:09 2017 +0200 1.2 +++ b/cook Sun Jan 08 01:50:38 2017 +0200 1.3 @@ -1030,10 +1030,10 @@ 1.4 [ -z "$continue" ] && rm -rf source 2>/dev/null 1.5 rm -rf install taz 2>/dev/null 1.6 1.7 - # Disable -pipe if less than 512Mb free RAM. 1.8 - free=$(free | awk '/buffers:/{print $4}') 1.9 - if [ "$free" -lt 524288 ] && [ "$CFLAGS" != "${CFLAGS/-pipe}" ]; then 1.10 - _ 'Disabling -pipe compile flag: %d RAM free' "$free" 1.11 + # Disable -pipe if less than 512 MB free RAM. 1.12 + free=$(awk '/^MemFree|^Buffers|^Cached/{s+=$2}END{print int(s/1024)}' /proc/meminfo) 1.13 + if [ "$free" -lt 512 ] && [ "$CFLAGS" != "${CFLAGS/-pipe}" ]; then 1.14 + _ 'Disabling -pipe compile flag: %d MB RAM free' "$free" 1.15 CFLAGS="${CFLAGS/-pipe}"; CFLAGS=$(echo "$CFLAGS" | tr -s ' ') 1.16 CXXFLAGS="${CXXFLAGS/-pipe}"; CXXFLAGS=$(echo "$CXXFLAGS" | tr -s ' ') 1.17 fi
2.1 --- a/po/cook.pot Mon Jan 02 06:14:09 2017 +0200 2.2 +++ b/po/cook.pot Sun Jan 08 01:50:38 2017 +0200 2.3 @@ -358,7 +358,7 @@ 2.4 msgstr "" 2.5 2.6 #: cook:881 2.7 -msgid "Disabling -pipe compile flag: %d RAM free" 2.8 +msgid "Disabling -pipe compile flag: %d MB RAM free" 2.9 msgstr "" 2.10 2.11 #: cook:897
3.1 --- a/po/fr.po Mon Jan 02 06:14:09 2017 +0200 3.2 +++ b/po/fr.po Sun Jan 08 01:50:38 2017 +0200 3.3 @@ -357,8 +357,8 @@ 3.4 msgstr "Utilise les outils de fabrication croisée : %s" 3.5 3.6 #: cook:881 3.7 -msgid "Disabling -pipe compile flag: %d RAM free" 3.8 -msgstr "Désactivation de l'option de compilation -pipe ; RAM libre : %d" 3.9 +msgid "Disabling -pipe compile flag: %d MB RAM free" 3.10 +msgstr "Désactivation de l'option de compilation -pipe ; RAM libre : %d MB" 3.11 3.12 #: cook:897 3.13 msgid "Checking build dependencies..."
4.1 --- a/po/pt_BR.po Mon Jan 02 06:14:09 2017 +0200 4.2 +++ b/po/pt_BR.po Sun Jan 08 01:50:38 2017 +0200 4.3 @@ -364,8 +364,8 @@ 4.4 msgstr "Usando cross-tools: %s" 4.5 4.6 #: cook:881 4.7 -msgid "Disabling -pipe compile flag: %d RAM free" 4.8 -msgstr "Desabilitando flag de compilação -pipe: %d RAM" 4.9 +msgid "Disabling -pipe compile flag: %d MB RAM free" 4.10 +msgstr "Desabilitando flag de compilação -pipe: %d MB RAM" 4.11 4.12 #: cook:897 4.13 msgid "Checking build dependencies..."
5.1 --- a/po/ru.po Mon Jan 02 06:14:09 2017 +0200 5.2 +++ b/po/ru.po Sun Jan 08 01:50:38 2017 +0200 5.3 @@ -363,8 +363,8 @@ 5.4 msgstr "Используемые кросс-инструменты: %s" 5.5 5.6 #: cook:881 5.7 -msgid "Disabling -pipe compile flag: %d RAM free" 5.8 -msgstr "Отключение флага компиляции «-pipe»: свободно %d КБ RAM" 5.9 +msgid "Disabling -pipe compile flag: %d MB RAM free" 5.10 +msgstr "Отключение флага компиляции «-pipe»: свободно %d МБ ОЗУ" 5.11 5.12 #: cook:897 5.13 msgid "Checking build dependencies..."
6.1 --- a/po/zh_CN.po Mon Jan 02 06:14:09 2017 +0200 6.2 +++ b/po/zh_CN.po Sun Jan 08 01:50:38 2017 +0200 6.3 @@ -364,8 +364,8 @@ 6.4 msgstr "正使用cross-tools:%s" 6.5 6.6 #: cook:881 6.7 -msgid "Disabling -pipe compile flag: %d RAM free" 6.8 -msgstr "正在禁用 -pipe 编译标志:%d RAM" 6.9 +msgid "Disabling -pipe compile flag: %d MB RAM free" 6.10 +msgstr "正在禁用 -pipe 编译标志:%d MB RAM" 6.11 6.12 #: cook:897 6.13 msgid "Checking build dependencies..."
7.1 --- a/po/zh_TW.po Mon Jan 02 06:14:09 2017 +0200 7.2 +++ b/po/zh_TW.po Sun Jan 08 01:50:38 2017 +0200 7.3 @@ -362,8 +362,8 @@ 7.4 msgstr "正使用cross-tools:%s" 7.5 7.6 #: cook:881 7.7 -msgid "Disabling -pipe compile flag: %d RAM free" 7.8 -msgstr "正在禁用 -pipe 編譯標誌:%d RAM" 7.9 +msgid "Disabling -pipe compile flag: %d MB RAM free" 7.10 +msgstr "正在禁用 -pipe 編譯標誌:%d MB RAM" 7.11 7.12 #: cook:897 7.13 msgid "Checking build dependencies..."