# HG changeset patch # User Xander Ziiryanoff # Date 1446756502 -3600 # Node ID 5d7c04a1ac79a6a24471ee09712feb2973c040df # Parent 2687e9f01abc72b9ca585b4eaf0c221c74c2f319 tazlito-wiz(yad): correctly get versions in 'Additional packages' dialog. writeiso: restore align for lzma, exclude ~/.cache (boot failed after using palemoon), misc fixes diff -r 2687e9f01abc -r 5d7c04a1ac79 live.cgi --- a/live.cgi Sun Jul 05 11:26:08 2015 +0200 +++ b/live.cgi Thu Nov 05 21:48:22 2015 +0100 @@ -177,6 +177,7 @@ /home/slitaz/distro/rootcd/boot/rootfs.gz EOT + ls -l /home/slitaz/distro/rootcd/boot/rootfs.gz until [ -f /tmp/.write-iso* ]; do sleep 1 done @@ -189,6 +190,7 @@ tail -n8 /tmp/tazlitowriteiso | grep -vE 'ENTER|----' fi tail -n5 /tmp/tazlitowriteiso | sed "s|$|

|g" + ls -l /home/slitaz/distro echo "" echo "Use ' tazlito emu-iso ' to check it" ;; *) @@ -222,7 +224,9 @@
$(gettext 'Compression type:') diff -r 2687e9f01abc -r 5d7c04a1ac79 tazlito --- a/tazlito Sun Jul 05 11:26:08 2015 +0200 +++ b/tazlito Thu Nov 05 21:48:22 2015 +0100 @@ -365,7 +365,8 @@ { if [ "$COMPRESSION" = "lzma" ]; then echo -n "Creating rootfs.gz with lzma compression... " - cpio -o -H newc | lzma e -si -so > /rootfs.gz + cpio -o -H newc | lzma e -si -so $(lzma_switches) > /rootfs.gz + align='y' lzma_set_size /rootfs.gz elif [ "$COMPRESSION" = "gzip" ]; then echo "Creating rootfs.gz with gzip compression... " @@ -375,8 +376,7 @@ echo "Creating rootfs.gz without compression... " cpio -o -H newc > /rootfs.gz fi < /tmp/list - # [ $align == 'y' ] && align_to_32bits /rootfs.gz - # align_to_32bits /rootfs.gz + [ $align == 'y' -a -z "$noalign" ] && align_to_32bits /rootfs.gz echo 1 > /tmp/rootfs } @@ -2298,10 +2298,11 @@ $(boldify "Archive compression:") $(colorize 36 "$COMPRESSION") EOT + [ $COMPRESSION == "gzip" ] && colorize 31 "gzip-compressed rootfs unsupported and may fail to boot" # Save some space rm /var/cache/tazpkg/* -r -f rm /var/lib/tazpkg/*.bak -f - rm -rf /home/slitaz/distro + rm -rf $DISTRO # Optionally remove sound card selection and screen resolution. if [ -z $LaunchedByTazpanel ]; then @@ -2357,11 +2358,11 @@ [ -d $dir ] && echo $dir done >>/tmp/list - sed '/var\/run\/.*pid$/d ; /var\/run\/utmp/d ; /.*\/.gvfs/d' -i /tmp/list + sed '/var\/run\/.*pid$/d ; /var\/run\/utmp/d ; /.*\/.gvfs/d ; /home\/.*\/.cache\/.*/d' -i /tmp/list - if [ ! $(find /var/log/slitaz/tazpkg.log -size +4k) = "" ]; then - sed -i "/var\/log\/slitaz\/tazpkg.log/d" /tmp/list - fi + #if [ ! $(find /var/log/slitaz/tazpkg.log -size +4k) = "" ]; then + # sed -i "/var\/log\/slitaz\/tazpkg.log/d" /tmp/list + #fi mv -f /var/log/wtmp /tmp/tazlito-wtmp touch /var/log/wtmp @@ -2420,7 +2421,7 @@ When SliTaz is running in RAM the kernel and bootloader files are kept on the cdrom. Please insert a LiveCD or loop mount the slitaz.iso to /media/cdrom (run # mount -o loop slitaz-rolling.iso /media/cdrom ) -to let Tazlito copy the files.\n" +or # (tazpkg -gi linux --forced) to let Tazlito copy the files.\n" echo -en "----\nENTER to continue..."; read i [ ! -d /media/cdrom/boot/isolinux ] && exit 1 copy_from_cd @@ -2445,7 +2446,7 @@ status separator - echo "ISO image: $(du -sh /home/slitaz/distro/$ISO_NAME.iso)" + echo "ISO image: $(du -sh $DISTRO/$ISO_NAME.iso)" rm -f /tmp/.write-iso newline if [ -z $LaunchedByTazpanel ]; then @@ -2456,7 +2457,7 @@ eject echo -n "Please insert a blank cdrom and press ENTER..." read i && sleep 2 - tazlito burn-iso /home/slitaz/distro/$ISO_NAME.iso + tazlito burn-iso $DISTRO/$ISO_NAME.iso echo -en "----\nENTER to continue..."; read i ;; *) exit 0 ;; diff -r 2687e9f01abc -r 5d7c04a1ac79 tazlito-wiz --- a/tazlito-wiz Sun Jul 05 11:26:08 2015 +0200 +++ b/tazlito-wiz Thu Nov 05 21:48:22 2015 +0100 @@ -14,7 +14,7 @@ #[ "$rel" != "cooking" ] && rel=stable live=/home/slitaz/$rel/live db="/var/lib/tazpkg" -list="distro-packages.list" +list="$live/distro-packages.list" distro="/home/slitaz/$rel/distro" addfiles="$distro/addfiles" @@ -45,10 +45,10 @@ edit_list() { text=$(gettext "Edit the distro packages list") - cat $live/$list | yad --list $opts --text="$text" \ + cat $list | yad --list $opts --text="$text" \ --no-headers --print-all --separator="" \ --editable --column=0:TEXT > $live/list - mv -f $live/list $live/$list + mv -f $live/list $list } # Start page GUI @@ -61,7 +61,7 @@ --button="TazPanel Live:2" \ --button="gtk-cancel:1" \ --button="gtk-ok:0" \ - " " "core!gtkonly!justx!base" + " " "core!core64!gtkonly!justx!base" } # Start page handler @@ -77,7 +77,9 @@ esac # Deal with $main values text=$(gettext "Getting flavor file and packages list...") - (echo "30" && sleep 1 + (echo "30" && xterm='xterm -fa fixed-8 ' + [ -z $(which xterm) ] && xterm='terminal' + $xterm -geometry 80x10-0-0 -e tazpkg recharge name=$(echo $main | cut -d "|" -f 1) skel=$(echo $main | cut -d "|" -f 2) echo "$skel" > $live/skel @@ -96,9 +98,9 @@ skel=$(cat $live/skel) text=$(eval_gettext "Packages - The \$skel has \$pkgs packages") yad --form $opts --text="$text" --separator=" " \ - --field="$(gettext "Additional packages separated by space or by line:")":TXT \ + --field="$(gettext "Additional packages separated by space or by line:")\\n\(will be auto added to \'Edit packages list\'\)":TXT \ --button="$(gettext "Edit packages list"):2" \ - --button="gtk-cancel:1" --button="gtk-ok:0" + --button="gtk-cancel:1" --button="gtk-ok:0" --image=tazpkg } # Packages page handler @@ -108,16 +110,21 @@ # Deal with --button values case $? in 1) exit 0 ;; - 2) edit_list ;; - *) continue ;; + 2) add_to_list ; edit_list ;; + *) add_to_list ;; esac - # Deal with $main values - for pkg in $(echo $main | sed s'/\\n//'g) +} + +add_to_list() +{ + for pkg in $(echo $main | sed s'/\\n/ /'g) do - vers=$(fgrep "$pkg |" $db/packages.desc | awk '{print $3}') - if ! grep "^${pkg}$" $list; then + vers=$(grep -E "^$pkg \|" $db/packages.desc | awk '{print $3}') + [ -z $vers ] || \ + (grep -v -q "^$pkg-$vers" $list && \ echo "$pkg-$vers" >> $list - fi + ) + unset vers done } @@ -149,7 +156,8 @@ Now it's time to generate the distro. Last chance to start over or stop. \ Creating a Live system uses quite a lot of resources and takes some time. Note you can still add some files to the SliTaz root filesystem or on the \ -cdrom.") +cdrom.";echo + echo $addfiles ) text=$(gettext "Generate the distribution") echo "$info" | yad --text-info $opts --text="$text" \ --wrap --margins=20