On Mon, Mar 21, 2011 at 5:54 PM, Brian C. Lane <bcl(a)fedoraproject.org>wrote:
tools/livecd-iso-to-disk.sh | 14 +-
tools/liveimage-mount | 256
++++++++++++++++++++++++++++++++++++++------
2 files changed, 233 insertions(+), 37 deletions(-)
{...}
commit ab97a013c88441a7d6f1e0ac85342f9025e9f6ae
Author: Frederick Grose <fgrose(a)gmail.com>
Date: Mon Mar 21 14:09:49 2011 -0700
Fix pipefailure in checkSyslinuxVersion (#689329)
Use a list operation to bypass the erroneous return value.
Alter the test to something that could be used to check the
syslinux version, if desired.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index deb5473..70e80ba 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -559,7 +559,8 @@ checkSyslinuxVersion() {
echo "You need to have syslinux installed to run this script"
exit 1
fi
- if ! syslinux 2>&1 | grep -qe -d; then
+ check=($(syslinux --version 2>&1)) || :
+ if [[ 'syslinux' == $check ]]; then
SYSLINUXPATH=""
elif [ -n "$multi" ]; then
SYSLINUXPATH="$LIVEOS/syslinux"
@@ -1006,7 +1007,6 @@ fi
[ -n "$efi" -a ! -d $TGTMNT$EFI_BOOT ] && mkdir -p $TGTMNT$EFI_BOOT
# Live image copy
-set -o pipefail
if [ "$srctype" = "live" -a -z "$skipcopy" ]; then
echo "Copying live image to target device."
[ ! -d $TGTMNT/$LIVEOS ] && mkdir $TGTMNT/$LIVEOS
Sorry,
The followup patch,
https://bugzilla.redhat.com/attachment.cgi?id=486551
is needed.
commit 38c1015f1f920fd45561f6fc6b47c032f4be5afb
Author: Frederick Grose <fgrose(a)gmail.com>
Date: Mon Mar 21 03:07:48 2011 -0400
Fix pipefailure in checkSyslinuxVersion()
Use a list operation to bypass the erroneous return value.
Alter the test to something that could be used to check the
syslinux version, if desired.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index deb5473..3f4ae0d 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -559,7 +559,8 @@ checkSyslinuxVersion() {
echo "You need to have syslinux installed to run this script"
exit 1
fi
- if ! syslinux 2>&1 | grep -qe -d; then
+ check=($(syslinux --version 2>&1)) || :
+ if [[ 'syslinux' != $check ]]; then
SYSLINUXPATH=""
elif [ -n "$multi" ]; then
SYSLINUXPATH="$LIVEOS/syslinux"
@@ -1006,7 +1007,6 @@ fi
[ -n "$efi" -a ! -d $TGTMNT$EFI_BOOT ] && mkdir -p $TGTMNT$EFI_BOOT
# Live image copy
-set -o pipefail
if [ "$srctype" = "live" -a -z "$skipcopy" ]; then
echo "Copying live image to target device."
[ ! -d $TGTMNT/$LIVEOS ] && mkdir $TGTMNT/$LIVEOS