Bug 663848

Summary: copyFile failures not trapped in livecd-iso-to-disk
Product: [Fedora] Fedora Reporter: Frederick Grose <fgrose>
Component: livecd-toolsAssignee: Brian Lane <bcl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: adam.stokes, bcl, bruno, dhuff, Jasper.Hartline, katzj
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-17 03:25:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Frederick Grose 2010-12-17 03:14:49 UTC
The new strace-based copyFile function cp_p() uses a pipeline, so errors can go undetected.  Using set -o pipefail seems to fix this.

A separate problem occurs when an error triggers the || clause that uses a subshell to group two commands.  An inline command group seems to fix this.

Patch attached.

Steps to Reproduce:
1. Force an error in the copyFile function by renaming the source file or provide insufficient space for the copy.
2. Force the use of the cp_p() function by commenting out the gvfs-copy if-block.
3. Execute livecd-iso-to-disk.

  
Actual results:

Notice that the error does not get trapped and cause the main script to exit.

Comment 1 Frederick Grose 2010-12-17 03:25:40 UTC

*** This bug has been marked as a duplicate of bug 663849 ***