Bug#725239: libpython3.3-stdlib: xargs memory exhausted

2013-11-19 Thread Matthias Klose
-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



Bug#725239: libpython3.3-stdlib: xargs memory exhausted

2013-10-03 Thread 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 ...

Regards, Jörg.

-- System Information:
Debian Release: unstable/experimental
  APT prefers unstable
  APT policy: (900, 'unstable'), (700, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.10-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libpython3.3-stdlib depends on:
ii  libbz2-1.01.0.6-5
ii  libc6 2.17-92+b1
ii  libdb5.1  5.1.29-7
ii  libffi6   3.0.13-4
ii  liblzma5  5.1.1alpha+20120614-2
ii  libncursesw5  5.9+20130608-1
ii  libpython3.3-minimal  3.3.2-6
ii  libreadline6  6.2+dfsg-0.1
ii  libsqlite3-0  3.8.0.2-1
ii  libssl1.0.0   1.0.1e-3
ii  libtinfo5 5.9+20130608-1
ii  mime-support  3.54
ii  multiarch-support 2.17-92+b1

libpython3.3-stdlib recommends no packages.

libpython3.3-stdlib suggests no packages.

-- no debconf information


signature.asc
Description: Digital signature http://en.wikipedia.org/wiki/OpenPGP