Bug 672277

Summary: Exporter allows incorrect combination command line options
Product: Red Hat Satellite 5 Reporter: Šimon Lukašík <slukasik>
Component: Satellite SynchronizationAssignee: Michael Mráka <mmraka>
Status: CLOSED ERRATA QA Contact: Dimitar Yordanov <dyordano>
Severity: medium Docs Contact:
Priority: medium    
Version: 540CC: cperry, dyordano, jhutar, mmraka
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-backend-1.2.13-56 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-21 09:44:53 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:
Bug Depends On:    
Bug Blocks: 715348    

Description Šimon Lukašík 2011-01-24 17:01:23 UTC
Description of problem:

During a verification of

  Bug 650165 - Incremental dump creation in Satellite 5.4 is flawed

which brings new options (--use-rhn-date, --use-sync-date) to
rhn-satellite-exporter. I have find out that following commands:

  rhn-satellite-exporter <...> --use-rhn-date --use-sync-date
  rhn-satellite-exporter <...> --use-sync-date --use-rhn-date

has different semantics. (In my case, some packages landed in the
dump only for the former one).

Looking at the code, I suppose these options are meant to be mutually
exclusive. Unfortunately they are not. A last one wins.

I would like r-s-e to complain, when both options are used together.

Brief look at documentation says that optparser itself doesn't support
mutexes, but we can still handle it by explicit condition. 


Version-Release number of selected component (if applicable):
spacewalk-backend-tools-1.2.13-25.el5sat

Comment 1 Michael Mráka 2011-01-26 13:58:32 UTC
Fixed in spacewalk.git
commit 5d844a9a6f173089700bdea4e06e9c35e8751b9c
    672277 - made --use-rhn-date and --use-sync-date mutually exclusive

Fixed spacewalk package spacewalk-backend-1.3.50-1.

Comment 2 Michael Mráka 2011-10-26 08:58:44 UTC
Backported to SATELLITE-5.4 as
commit 11c5e3082aeba00884f1e7f32c8ecac39c744f2b
    672277 - made --use-rhn-date and --use-sync-date mutually exclusive

Comment 5 errata-xmlrpc 2011-11-21 09:44:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1466.html