-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 17.09.2013 23:38, schrieb Jörg Sommer:
> Package: libpython3.3-stdlib Version: 3.3.2-6 Severity: normal
> 
> Hello,
> 
> while installing the package I've got the message memory exhausted from 
> xargs. It seems there's a call with very large input in the postrm script.
> 
> Vorbereitung zum Ersetzen von libpython3.3-stdlib 3.3.2-5 (durch
> .../libpython3.3-stdlib_3.3.2-6_amd64.deb) ... xargs: Der Arbeitsspeicher
> ist erschöpft. Ersatz für libpython3.3-stdlib:amd64 wird entpackt ...

all the uses of xargs are guarded with:

remove_bytecode()
{
    pkg=$1
    max=$(LANG=C LC_ALL=C xargs --show-limits < /dev/null 2>&1 | awk
'/Maximum/ {print int($NF / 4)}')
    dpkg -L $pkg \
        | awk -F/ 'BEGIN {OFS="/"} /\.py$/
{$NF=sprintf("__pycache__/%s.*.py[co]", substr($NF,1,length($NF)-3)); print}' \
        | xargs --max-chars="$max" echo \
        | while read files; do rm -f $files; done
    find /usr/lib/python3 /usr/lib/@PVER@ \
        \( -name dist-packages -prune \) -o \
        \( -name __pycache__ -type d -empty -print \) \
        | xargs -r rm -rf
}


limiting the max amount of command line arguments to 25% of the maximum.  I
don't see how this could fail.  Maybe something wrong with the locale setting?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlKLIUUACgkQStlRaw+TLJzpMACfTgei24ghCet+HaOiFi2qXbcm
QAIAnR+Zmfjf7avI5ePemOk/JOGzAssK
=NiiP
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to