George Brooke <[email protected]> writes:

> On Thursday 18 June 2009 21:40:40 Robin Paulson wrote:
>> 2009/6/19 Klaus 'mrmoku' Kurzmann <[email protected]>:
>> > soon another big update will hit the feed. Basically a updated glibc and
>> > a update python. So far so good...
>> >
>> > Problem is opkg. This upgrade is to heavy for opkg and will cause it to
>> > segfault in the middle. To be able to upgrade there are two workarounds.
>> >
>> > a) give your device some swap. 128MB should suffice.
>> > b) update package by package
>>
>> c) shut down the x server before running opkg upgrade - that releases
>> enough ram 
> Thanks for the warning, shutting down X didn't free enough ram for me and 
> opkg 
> segfaulted, then after i mucked up (not sure how) running the package-by-
> package update the oom killer started wiping stuff out so i'm going to 
> restore 
> my backed up working shr and try again :-)

I use the following Python script to upgrade ten packages each time:

$ cat bin/opkg_upgrade_10.py 
#!/usr/bin/python

CNT=10

import os
from itertools import islice
from subprocess import call

f = iter(os.popen('opkg list_upgradable', 'r'))
while True:
    pkgs = [s.split(' ', 1)[0] for s in islice(f, CNT)]
    if not pkgs:
        break
    cmd = ['opkg', 'install'] + pkgs
    print ' '.join(cmd)
    call(cmd)

>
> solar.george
_______________________________________________
Shr-User mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-user

Reply via email to