Hello community,

here is the log from the commit of package live-fat-stick for openSUSE:Factory 
checked in at 2015-07-21 13:27:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/live-fat-stick (Old)
 and      /work/SRC/openSUSE:Factory/.live-fat-stick.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "live-fat-stick"

Changes:
--------
--- /work/SRC/openSUSE:Factory/live-fat-stick/live-fat-stick.changes    
2015-03-09 10:09:30.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.live-fat-stick.new/live-fat-stick.changes       
2015-07-21 13:28:35.000000000 +0200
@@ -1,0 +2,5 @@
+Fri Jul 10 13:36:53 UTC 2015 - [email protected]
+
+- fixes for isoname and path with spaces in them
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ live-fat-stick ++++++
--- /var/tmp/diff_new_pack.ELBXGI/_old  2015-07-21 13:28:36.000000000 +0200
+++ /var/tmp/diff_new_pack.ELBXGI/_new  2015-07-21 13:28:36.000000000 +0200
@@ -41,6 +41,7 @@
                        sleep 2
                done
                rmdir $stickmount &>/dev/null || echo "unable to remove 
$stickmount, please remove manually"
+               rm $isopath &>/dev/null
        fi
 }
 clean_up () {
@@ -175,12 +176,14 @@
 
 #variables
 isomount=$(mktemp -d)
-iso_symlink=$(mktemp) ; rm $iso_symlink ; ln -s "$1" $iso_symlink
+isopath=$(readlink -f "$1")
+iso_symlink=$(mktemp) ; rm $iso_symlink ; ln -s "$isopath" $iso_symlink
 stickmount=$(mktemp -d)
 stickdevice=$(echo $2 | sed 's/[0-9]*//g')
 stickbase=$(basename $2)
 isoname=$(basename "$1")
-isonameshort=$(echo $isoname | cut -d "-" -f 1,2,3)
+isonametr=$(echo $isoname | tr " " _)
+isonameshort=$(echo $isoname | cut -d "-" -f 1,2,3 | tr " " _)
 #stickuuid=$(ls -l /dev/disk/by-uuid/ |grep $stickbase | cut -d " " -f 9)
 stickuuid=$(blkid -s UUID -o value $2)
 stickpart=$(basename $2 | sed 's/[a-z]*//g')
@@ -189,6 +192,11 @@
 liveusbgui=/tmp/liveusbgui
 benice="nice ionice -c3"
 
+if [[ $isoname != $isonametr ]]; then
+       echo "removing space/s from iso name copied to the destination disk"
+       export isoname=$isonametr
+fi
+
 if [[ ! -h /dev/disk/by-uuid/$stickuuid ]]; then
         echo "wrong uuid detected, please file bug with output of: blkid $2"
 fi
@@ -247,12 +255,12 @@
                appendsection="append initrd=initrd-$isonameshort boot=casper 
iso-scan/filename=/$isoname"
        fi
        if [[ $distroname == fedora ]]; then
-               mkdir -p $syslinuxpath
-               mkdir -p $stickmount/$isonameshort
+               mkdir -p "$syslinuxpath"
+               mkdir -p "$stickmount/$isonameshort"
                echo "copying the content of iso image, this may take a while"
-               $benice cp -r "$isomount/*" "/$stickmount/$isonameshort/"
-               mv $stickmount/$isonameshort/isolinux/initrd0.img 
$syslinuxpath/initrd-$isonameshort
-               mv $stickmount/$isonameshort/isolinux/vmlinuz0 
$syslinuxpath/linux-$isonameshort
+               $benice cp -r "$isomount"/* "/$stickmount/$isonameshort/"
+               mv "$stickmount/$isonameshort"/isolinux/initrd0.img 
$syslinuxpath/initrd-$isonameshort
+               mv "$stickmount/$isonameshort"/isolinux/vmlinuz0 
$syslinuxpath/linux-$isonameshort
                appendsection="append initrd=initrd-$isonameshort 
root=UUID=$stickuuid rootfstype=vfat rd.live.dir=/$isonameshort/LiveOS/ ro 
rd.live.image rd.luks=0 rd.md=0 rd.dm=0 quiet rhgb"
        fi
        umount $isomount &>/dev/null
@@ -348,7 +356,7 @@
        are_you_sure "continue ?" "y" "n"
 fi
 if [[ $distroname == isohybrid ]];then
-       try_cp_with_progress $1 $2
+       try_cp_with_progress "$1" "$2"
 else
        mkdir $isomount $stickmount &>/dev/null
        if ! mount $2 $stickmount &>/dev/null; then
@@ -380,7 +388,7 @@
        if [[ $distroname != fedora ]]; then
                if [[ ! -f $stickmount/$isoname ]]; then
                        echo "copying $isoname to usb stick"
-                       try_cp_with_progress $1 $stickmount/$isoname
+                       try_cp_with_progress "$1" "$stickmount/$isoname"
                else
                        echo "using existing $isoname on the stick"
                fi


Reply via email to