Bug 892789 - [RFE] Additional command line switch "--parent" for spacewalk-clone-by-date
Summary: [RFE] Additional command line switch "--parent" for spacewalk-clone-by-date
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 1.9
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Stephen Herr
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On: 838122
Blocks: spacewalk-rfe space19
TreeView+ depends on / blocked
 
Reported: 2013-01-07 21:11 UTC by Stephen Herr
Modified: 2013-03-06 18:34 UTC (History)
8 users (show)

Fixed In Version: spacewalk-utils-1.9.9-1
Doc Type: Enhancement
Doc Text:
Clone Of: 838122
Environment:
Last Closed: 2013-03-06 18:34:08 UTC
Embargoed:


Attachments (Terms of Use)

Description Stephen Herr 2013-01-07 21:11:51 UTC
+++ This bug was initially created as a clone of Bug #838122 +++

1. Proposed title of this feature request
Additional command line switch --parent for spacewalk-clone-by-date

3. What is the nature and description of the request?
Customer would like the following additions to spacewalk-clone-by-date:
-p, --parent - specify the parent when creating a clone channel of a child channel

4. Why does the customer need this? (List the business requirements here)
Convenience feature to make commands and scripting clearer

5. How would the customer like to achieve this? (List the functional
requirements here)
Add the above command line switch


9. List any affected packages or components.
spacewalk-utils / spacewalk-clone-by-date


--- Additional comment from Stephen Herr on 2013-01-07 14:44:57 EST ---

I can add the --parents switch as you describe, but the functionality actually already exists to do what you want. 

The parent channel of the existent child channels must be specified so that spacewalk-clone-by-date can correctly identify and include packages required as dependencies of erratum that have been released. The parent channel of the clones must be known so that spacewalk-clone-by-date can correctly clone the channels. So I could add an option so that:

spacewalk-clone-by-date -l sherr-child sherr-child-clone --parents sherr-parent sherr-parent-clone -d 2013-01-07

would clone only sherr-child -> sherr-child-clone and get the required parent information from the --parents option. However, This is exactly what happens already if you specify the parent channels via the normal -l or --channels option and the destination parent channel already exists.

So, for example, let's say that I have two channels:

sherr-parent
  |
  > sherr-child

I first run:

spacewalk-clone-by-date -l sherr-parent sherr-parent-clone -y -d 2013-01-07

Now I have:

sherr-parent
  |
  > sherr-child

sherr-parent-clone

I can now run:

spacewalk-clone-by-date -l sherr-child sherr-child-clone -l sherr-parent sherr-parent-clone -y -d 2013-01-07

Which will just clone sherr-child to sherr-child-clone, no changes will be made to sherr-parent-clone since it already exists and is up to date.

This would have left us with:

sherr-parent
  |
  > sherr-child

sherr-parent-clone
  |
  > sherr-child-clone

The only case where the new --parents switch would differ functionally from just specifying --channels again is if for some reason the parent and child channels are cloned to different dates. Let's say in my example that we originally cloned sherr-parent up until 2012-01-01, and then in the second command where we clone sherr-child we cloned to a date of 2013-01-01. Then the second command would also update sherr-parent-clone to be a clone of sherr-parent as of 2013-01-01, which may not be desired behavior. 

I will add the --parents option both because it is simpler / clearer in this use case and as a way to avoid the potentially unwanted dates behavior.

Comment 1 Stephen Herr 2013-01-07 21:17:45 UTC
Committed to Spacewalk master: 87bab5cd6286565be200292eccc91af44059354e

Comment 2 Stephen Herr 2013-03-01 17:06:47 UTC
Marking bug as ON_QA since tonight's build of Spacewalk nightly is a release candidate for Spacewalk 1.9.

Comment 3 Stephen Herr 2013-03-06 18:34:08 UTC
Spacewalk 1.9 has been released.

https://fedorahosted.org/spacewalk/wiki/ReleaseNotes19


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