Bug 981944

Summary: compare exits with a non-zero exit code when no error occurred
Product: [Fedora] Fedora Reporter: Tom Hughes <tom>
Component: ImageMagickAssignee: Pavel Alexeev <pahan>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: nmurray, pahan
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: 2013-07-10 20:42:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom Hughes 2013-07-07 08:44:28 UTC
Description of problem:

In rawhide the ImageMagick compare command line tool exits with a non-zero exit code (specifically an exit code of one) even when everything worked fine.

Version-Release number of selected component (if applicable):

ImageMagick-6.8.6.3-1.fc20.x86_64

How reproducible:

Every time.

Steps to Reproduce:

rawhide [~] % compare image.jpg image.jpg /tmp/diff.jpg
rawhide [~] % echo $?
1

Actual results:

1

Expected results:

0

Additional info:

This works fine in F19 with ImageMagick 6.7.8.9.

Comment 1 Pavel Alexeev 2013-07-10 20:42:53 UTC
Thank you for the bugreport and willing make free software better.

Problem reported upstream: http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=23722

Comment 2 Pavel Alexeev 2013-07-15 18:41:49 UTC
Got upstream answer:
A perfect match for -metric ncc is 1 and not zero. If the user wants that default, then just add -metric ncc until the issue is resolved

see http://www.imagemagick.org/Usage/compare/#statistics