Bug 663847 - copyFile failures not trapped in livecd-iso-to-disk
Summary: copyFile failures not trapped in livecd-iso-to-disk
Status: CLOSED DUPLICATE of bug 663849
Alias: None
Product: Fedora
Classification: Fedora
Component: livecd-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-12-17 03:14 UTC by Frederick Grose
Modified: 2010-12-17 03:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-12-17 03:26:26 UTC
Type: ---

Attachments (Terms of Use)

Description Frederick Grose 2010-12-17 03:14:11 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:26:26 UTC

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

Note You need to log in before you can comment on or make changes to this bug.