ALT Linux Bugzilla
– Attachment 5485 Details for
Bug 27407
OOM в installer
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Патч на livecd-install, 'cp -a' вместо unsquashfs
livecd-install.patch (text/plain), 2.90 KB, created by
vx8400
on 2012-06-09 21:00:27 MSK
(
hide
)
Description:
Патч на livecd-install, 'cp -a' вместо unsquashfs
Filename:
MIME Type:
Creator:
vx8400
Created:
2012-06-09 21:00:27 MSK
Size:
2.90 KB
patch
obsolete
>--- /usr/lib/alterator/backend3/livecd-install.orig 2012-06-09 18:37:45.650353743 +0400 >+++ /usr/lib/alterator/backend3/livecd-install 2012-06-09 16:24:54.852000188 +0400 >@@ -83,11 +83,51 @@ > # 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 >+ >+if [ "x$no_unsquashfs" = "xyes" ] ; then >+ >+ live_mount="$(mount | grep -E "^${img} " | sed 's,^.* on \([^ ]\+\) .*$,\1,')" >+ if [ "x$live_mount" = "x" ] ; then >+ do_notify_error "Can't read squashfs image $img" >+ 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 >+ local dirlist=$(ls ${live_mount} | grep -vE "dev|image|mnt|proc|sys") >+ local ndirs=`echo $dirlist | wc -w` >+ if [ $ndirs -eq 0 ] ; then >+ do_notify_error "Can't read squashfs image $img" >+ return 1 >+ fi >+ local ndirs_done=0 >+ for d in $dirlist ; do >+ cp -a ${live_mount}/${d} ${dst}/ >+ ndirs_done=$((${ndirs_done}+1)) >+ do_notify_status "$(( ${ndirs_done} * 100 / ${ndirs} ))" >+ done >+ mkdir -p -- ${dst}/{dev,mnt,proc,sys} >+ >+else # default: > > if ! [ -r "$img" ]; then > do_notify_error "Can't read squashfs image $img" >@@ -106,14 +146,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,13 +162,13 @@ > > 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 > > while read ignore; do >- [ $progress -gt 100 ] && continue >+ [ $progress -gt 100 ] && continue > ((i += 1)) > if [ $i -gt $percent1 ]; then > do_notify_status "$((progress++))" >@@ -136,6 +176,11 @@ > 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