On Mon, Mar 21, 2011 at 2:46 AM, Frederick Grose <[email protected]> wrote:
> *Bug 689329* <https://bugzilla.redhat.com/show_bug.cgi?id=689329> - > livecd-iso-to-disk > installs syslinux files in root directory > > From the bug report: > > The new set -o pipefail option, set early, changes a return value in > > checkSyslinuxVersion() leading to SYSLINUXPATH being set to "". > > The attached patch rewrites the test. The earlier test tested the usage > > function in /usr/bin/syslinux. > > The replacement checks the the --version output for a general 'syslinux' > response. > > This should exercise the installed program like the previous test, but I'm not > > > familiar with the use case for the failure condition that leads to > SYSLINUXPATH > being set to "". > > --Fred Fixing the test logic: commit 38c1015f1f920fd45561f6fc6b47c032f4be5afb Author: Frederick Grose <[email protected]> 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
-- livecd mailing list [email protected] https://admin.fedoraproject.org/mailman/listinfo/livecd
