+++ 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.