Bug 947942 - RFE - provide option to use update_date in spacewalk-clone-by-date cli utility
Summary: RFE - provide option to use update_date in spacewalk-clone-by-date cli utility
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.10
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Stephen Herr
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 855467 space20
TreeView+ depends on / blocked
 
Reported: 2013-04-03 15:11 UTC by Paresh Mutha
Modified: 2013-08-02 13:01 UTC (History)
1 user (show)

Fixed In Version: spacewalk-utils-1.10.4-1
Clone Of:
Environment:
Last Closed: 2013-08-02 13:01:15 UTC
Embargoed:


Attachments (Terms of Use)
Proposed patch (5.13 KB, patch)
2013-04-03 15:54 UTC, Paresh Mutha
no flags Details | Diff

Description Paresh Mutha 2013-04-03 15:11:52 UTC
Description of problem:
spacewalk-clone-by-date uses errata's issue_date while cloning errata's into the channel. But when we try to clone/add errata's into the cloned channel from web-ui, it refers/displays the update_date and not the issue_date.

If we want to have uniformity between the cloned channels created from web-ui and cli, both should refer to the same date (issue or update date). Thus this feature request to add the option with which we can use update_date when the channel is being cloned using spacewalk-clone-by-date command

How reproducible:
Always

Steps to Reproduce:
1. spacewalk-clone-by-date -u username -p password -d 2007-10-30 -l rhel-i386-server-5 test-channel1
2. Login to web-ui, go to test-channel1 -> Errata tab
3. Check the Update date of errata
  
Actual results:
There are errata's which are updated after 2007-10-30

Expected results:
No errata's should be added which are released/update after the date mentioned in the spacewalk-clone-by-date command i.e 2007-10-30

add a option --use-update-date to refer the errata's update_date instead of issue_date

Comment 2 Paresh Mutha 2013-04-03 15:54:06 UTC
Created attachment 731229 [details]
Proposed patch

Comment 3 Paresh Mutha 2013-04-03 15:55:14 UTC
# spacewalk-clone-by-date -u admin -d 2007-10-30 -l rhel-i386-server-5 testpatch-issue-date

..snip..

By continuing the following will be cloned:
  rhel-i386-server-5 -> testpatch-issue-date  (108/2704 Errata)

Continue with clone (y/n)?y

Cloning Errata into testpatch-issue-date (108):
________________________________________
######################################## - complete
Copying repodata, please wait.
Solving Dependencies (485): 
..snip..
######################################## - complete

Checking the channel -> Errata -> List/Remove tab we see :

Type 	Advisory 	Synopsis 	Updated
Security Advisory 	CLA-2007:0724 	Critical: firefox security update 	12/4/07
Security Advisory 	CLA-2007:0740 	Moderate: bind security update 	12/4/07
Product Enhancement Advisory 	CLA-2007:0658 	redhat-rpm-config enhancement update 	11/7/07
Bug Fix Advisory 	CLA-2007:0959 	Updated kernel packages for Red Hat Enterprise Linux 5 Update 1 	11/7/07
Bug Fix Advisory 	CLA-2007:0574 	libXp bug fix update 	11/7/07
Bug Fix Advisory 	CLA-2007:0544 	selinux-policy bug fix update 	11/7/07
Bug Fix Advisory 	CLA-2007:0579 	gfs2-utils bug fix update 	11/7/07
Bug Fix Advisory 	CLA-2007:0563 	quagga bug fix update 	11/7/07 


8 errata's which were having update date >  10/30/07  were cloned.
Now using --use-update-date option those were not added.

# spacewalk-clone-by-date -u admin -d 2007-10-30 -l rhel-i386-server-5 testpatch-update-date --use-update-date
..snip..
By continuing the following will be cloned:
  rhel-i386-server-5 -> testpatch-update-date  (100/2704 Errata)

Continue with clone (y/n)?y

Cloning Errata into testpatch-update-date (100):
________________________________________
######################################## - complete
Copying repodata, please wait.
Solving Dependencies (453): 
..snip..
######################################## - complete

Comment 4 Stephen Herr 2013-04-05 19:53:26 UTC
Patch accepted, thanks!

Spacewalk master:
3f8e200c4ee6aa1fab10bdfe4bdaf27b641c4f28
41aa3b461a33023df545664d0d259732d07f8680

Comment 5 Stephen Herr 2013-04-08 13:54:31 UTC
And 7eafbb14995178fa106c1e2f4efa35407570e9b5 to fix pylint error.

Comment 6 Tomáš Kašpárek 2013-08-02 13:01:15 UTC
Fix for this bug is present in Spacewalk 2.0, closing this bug as CURRENTRELEASE.


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