ALT Linux Bugzilla
– Attachment 5683 Details for
Bug 27407
OOM в installer
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
0.7.4-alt1 patch (the previous one was hand edited and didn't apply)
livecd-install-new1.patch (text/plain), 2.74 KB, created by
Michael Shigorin
on 2012-12-25 02:18:10 MSK
(
hide
)
Description:
0.7.4-alt1 patch (the previous one was hand edited and didn't apply)
Filename:
MIME Type:
Creator:
Michael Shigorin
Created:
2012-12-25 02:18:10 MSK
Size:
2.74 KB
patch
obsolete
>--- livecd-install.orig 2012-12-24 20:29:12 +0400 >+++ livecd-install 2012-12-24 20:35:38 +0400 >@@ -82,12 +82,60 @@ > ## > # unpack squashfs image > # >+no_unsquashfs=yes > > do_install() > { > local img="$1";shift > local dst="$1";shift > local percent1= >+ local unpacked= >+ local free= >+ local live_mount= >+ local retval=0 >+ local blk_tot pct pct_prev dpct >+ local curr_dir=`pwd` >+ >+if [ "x$no_unsquashfs" = "xyes" ] ; then >+ >+ live_mount="$( mount | sed '/ type squashfs /!d; s/^.* on [ ]*\([^ ]\+\) type squashfs .*$/\1/')" >+ if [ "x$live_mount" = "x" ] ; then >+ do_notify_error "Can't find squashfs mount point" >+ return 1 >+ fi >+ unpacked="$(du -sb ${live_mount} | sed 's,^[ ]*\([0-9]\+\).*$,\1,')" >+ if [ "x$unpacked" = "x" ] ; then >+ do_notify_error "Can't calculate unpacked squashfs size" >+ return 1 >+ fi >+ free=$(free_space "$dst") >+ if [ $unpacked -gt $free ]; then >+ do_notify_error "No free space to unpack squashfs image" >+ return 1 >+ fi >+ do_notify_stage install >+ blk_tot=$[ ${unpacked} / 1024 ] >+ cd ${live_mount} >+ tar cf - . --exclude=dev --exclude=mnt --exclude=proc --exclude=sys \ >+ | { >+ cd ${dst} >+ LANG=C LC_ALL=C tar xfvR - \ >+ | { >+ pct_prev=0 ; >+ while read dum blk dum ; do >+ blk=${blk/:/}; >+ pct=$[ $blk * 100 / $tot ]; >+ dpct=$[ $pct - $pct_prev ] ; >+ if test $dpct -ge 1 ; then >+ pct_prev=$pct >+ do_notify_status "$pct" >+ fi >+ done >+ } >+ } >+ mkdir -p -- ${dst}/{dev,mnt,proc,sys} >+ cd ${curr_dir} >+else # default: > > if ! [ -r "$img" ]; then > do_notify_error "Can't read squashfs image $img" >@@ -106,14 +154,14 @@ > percent1="$((percent1/99))" > > # calculate size necessary for unpacked squashfs image >- local unpacked=$(sqfs_size "$img") >+ unpacked=$(sqfs_size "$img") > > if [ -z "$unpacked" ]; then > do_notify_error "Can't calculate unpacked squashfs size" > return 1 > fi > >- local free=$(free_space "$dst") >+ free=$(free_space "$dst") > > if [ $unpacked -gt $free ]; then > do_notify_error "No free space to unpack squashfs image" >@@ -122,7 +170,7 @@ > > do_notify_stage install > >- unsquashfs -force -no-progress -info -dest "$dst" "$img" 2>/dev/null | >+ { unsquashfs -force -no-progress -info -dest "$dst" "$img" 2>/dev/null ; retval=$? ; } | > { > local i=0 > local progress=0 >@@ -136,6 +184,12 @@ > fi > done > } >+ if [ $retval -ne 0 ] ; then >+ do_notify_error "Can't read squashfs image $img" >+ return 1 >+ fi >+ >+fi #end of unsquashfs ... > > # Set right perms on root directory of installed system > chmod 0755 "$dst"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 27407
:
5477
|
5485
|
5576
|
5577
| 5683