Makefile                    |    2 +-
 imgcreate/yuminst.py        |    4 ++++
 tools/livecd-creator        |    3 +++
 tools/livecd-iso-to-disk.sh |   28 ++++++++++++++++++++--------
 4 files changed, 28 insertions(+), 9 deletions(-)

New commits:
commit c41e07bf5960aded17d6db26a41737f755fbd0ca
Author: Brian C. Lane <[email protected]>
Date:   Wed Dec 22 15:23:17 2010 -0800

    Version 14.1

diff --git a/Makefile b/Makefile
index 917027f..87e8448 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 
-VERSION = 14.0
+VERSION = 14.1
 
 INSTALL = /usr/bin/install -c
 INSTALL_PROGRAM = ${INSTALL}


commit 19d1af5da0cf38a4d2e942b6bd0ec611dca3040d
Author: Frederick Grose <[email protected]>
Date:   Wed Dec 22 13:59:06 2010 -0800

    Trap copyFile errors (#663849)
    
    'Set -o pipefail' is needed with the new starce-based copy function.
    Also, keep || clauses inprocess, so that an exit command applies to
    the main script and not just a subshell.

diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 23e2d4a..b730b52 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -664,13 +664,15 @@ fi
 [ -n "$efi" -a ! -d $USBMNT/EFI/boot ] && mkdir -p $USBMNT/EFI/boot
 
 # Live image copy
+set -o pipefail
 if [ "$isotype" = "live" -a -z "$skipcopy" ]; then
     echo "Copying live image to USB stick"
     [ ! -d $USBMNT/$LIVEOS ] && mkdir $USBMNT/$LIVEOS
     [ -n "$keephome" -a -f "$USBMNT/$HOMEFILE" ] && mv $USBMNT/$HOMEFILE 
$USBMNT/$LIVEOS/$HOMEFILE
     if [ -n "$skipcompress" -a -f $CDMNT/LiveOS/squashfs.img ]; then
         mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT || exitclean
-        copyFile $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || 
(umount $CDMNT ; exitclean)
+        copyFile $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || {
+            umount $CDMNT ; exitclean ; }
         umount $CDMNT
     elif [ -f $CDMNT/LiveOS/squashfs.img ]; then
         copyFile $CDMNT/LiveOS/squashfs.img $USBMNT/$LIVEOS/squashfs.img || 
exitclean


commit 9a9cdc758163150b2afc6bb038e23e8fd6dba2e0
Author: Brian C. Lane <[email protected]>
Date:   Tue Nov 30 15:14:53 2010 -0800

    Create tmpdir if it doesn't exist (#658632)
    
    If the directory passed to --tmpdir doesn't exist, create it and its
    parent directories.

diff --git a/tools/livecd-creator b/tools/livecd-creator
index d352d74..64b645a 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -25,6 +25,7 @@ import optparse
 import logging
 
 import imgcreate
+from imgcreate.fs import makedirs
 
 class Usage(Exception):
     def __init__(self, msg = None, no_error = False):
@@ -116,6 +117,8 @@ def main():
 
     creator = imgcreate.LiveImageCreator(ks, name, fs_label)
     creator.tmpdir = os.path.abspath(options.tmpdir)
+    if not os.path.exists(creator.tmpdir):
+        makedirs(creator.tmpdir)
     creator.compress_type = options.compress_type
     creator.skip_compression = options.skip_compression
     creator.skip_minimize = options.skip_minimize


commit 2cdb0e512959985a90e0c4acac58cb8ffcd4c4d8
Author: Frederick Grose <[email protected]>
Date:   Mon Nov 29 17:15:09 2010 -0800

    Fix partition number selection for MMC bus devices (#587411)
    
    Enable detection of partition number prefixes.

diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 4cfca27..23e2d4a 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -68,6 +68,13 @@ getdisk() {
     partnum=${p##$device}
 }
 
+getpartition() {
+    DEV=$1
+    pa=$( < /proc/partitions )
+    pa=${pa##*$DEV}
+    partnum=${pa%% *}
+}
+
 resetMBR() {
     if isdevloop "$DEV"; then
         return
@@ -166,11 +173,12 @@ createGPTLayout() {
     partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep 
^$device:)
     size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
     /sbin/parted --script $device unit b mkpart '"EFI System Partition"' fat32 
17408 $(($size - 17408)) set 1 boot on
-    USBDEV=${device}1
     # Sometimes automount can be _really_ annoying.
     echo "Waiting for devices to settle..."
     /sbin/udevadm settle
     sleep 5
+    getpartition ${device#/dev/}
+    USBDEV=${device}${partnum}
     umount $USBDEV &> /dev/null
     /sbin/mkdosfs -n LIVE $USBDEV
     USBLABEL="UUID=$(/sbin/blkid -s UUID -o value $USBDEV)"
@@ -188,15 +196,16 @@ createMSDOSLayout() {
     partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep 
^$device:)
     size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
     /sbin/parted --script $device unit b mkpart primary fat32 17408 $(($size - 
17408)) set 1 boot on
-    if ! isdevloop "$DEV"; then
-        USBDEV=${device}1
-    else
-        USBDEV=${device}
-    fi
     # Sometimes automount can be _really_ annoying.
     echo "Waiting for devices to settle..."
     /sbin/udevadm settle
     sleep 5
+    if ! isdevloop "$DEV"; then
+        getpartition ${device#/dev/}
+        USBDEV=${device}${partnum}
+    else
+        USBDEV=${device}
+    fi
     umount $USBDEV &> /dev/null
     /sbin/mkdosfs -n LIVE $USBDEV
     USBLABEL="UUID=$(/sbin/blkid -s UUID -o value $USBDEV)"
@@ -214,11 +223,12 @@ createEXTFSLayout() {
     partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep 
^$device:)
     size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//')
     /sbin/parted --script $device unit b mkpart primary ext2 17408 $(($size - 
17408)) set 1 boot on
-    USBDEV=${device}1
     # Sometimes automount can be _really_ annoying.
     echo "Waiting for devices to settle..."
     /sbin/udevadm settle
     sleep 5
+    getpartition ${device#/dev/}
+    USBDEV=${device}${partnum}
     umount $USBDEV &> /dev/null
     /sbin/mkfs.ext4 -L LIVE $USBDEV
     USBLABEL="UUID=$(/sbin/blkid -s UUID -o value $USBDEV)"


commit 8ee15a854952a7e15c8f7ebaeb3de44bcc5c072b
Author: Lubomir Rintel <[email protected]>
Date:   Sat Nov 20 13:01:24 2010 +0100

    Tolerate empty transactions
    
    It can be useful when rebuilding the image without adding or removing a
    package.

diff --git a/imgcreate/yuminst.py b/imgcreate/yuminst.py
index 9e54982..5f3333b 100644
--- a/imgcreate/yuminst.py
+++ b/imgcreate/yuminst.py
@@ -171,6 +171,10 @@ class LiveCDYum(yum.YumBase):
             (res, resmsg) = self.buildTransaction()
         except yum.Errors.RepoError, e:
             raise CreatorError("Unable to download from repo : %s" %(e,))
+        # Empty transactions are generally fine, we might be rebuilding an
+        # existing image with no packages added
+        if resmsg and resmsg[0].endswith(" - empty transaction"):
+            return res
         if res != 2:
             raise CreatorError("Failed to build transaction : %s" % 
str.join("\n", resmsg))
         


--
livecd mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/livecd

Reply via email to