ALT Linux Bugzilla
– Attachment 5576 Details for
Bug 27407
OOM в installer
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Патч на livecd-install (кентавр 7альфа), 'cp -a' вместо unsquashfs
livecd-install.p7.patch (text/plain), 2.70 KB, created by
vx8400
on 2012-09-30 17:18:51 MSK
(
hide
)
Description:
Патч на livecd-install (кентавр 7альфа), 'cp -a' вместо unsquashfs
Filename:
MIME Type:
Creator:
vx8400
Created:
2012-09-30 17:18:51 MSK
Size:
2.70 KB
patch
obsolete
>--- /usr/lib/alterator/backend3/livecd-install.orig 2012-05-24 20:34:41.000000000 +0400 >+++ /usr/lib/alterator/backend3/livecd-install 2012-09-30 16:45:37.264009748 +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 | 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 >+ 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,7 +162,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 +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