Bug 1097634
Summary: | RFE : add option --latest to spacewalk-repo-sync | ||
---|---|---|---|
Product: | [Community] Spacewalk | Reporter: | Stéphane Gaubert <s.gaubert> |
Component: | Server | Assignee: | Jiří Dostál <jdostal> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Satellite QA List <satqe-list> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 2.2 | CC: | jdobes, jdostal |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | spacewalk-backend-2.4.14-1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-10-08 13:27:18 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: | |||
Bug Depends On: | |||
Bug Blocks: | 737830, 1267654 |
Description
Stéphane Gaubert
2014-05-14 08:26:09 UTC
Hello, You can now use --latest or -n option to sync only latest packages. I have also added this feature to web interface, so you can now schedule sync with latest packages only. Hope this helps. spacewalk-repo-sync fix: 58f90487820c2f139b8d1d1600401b6129de6288 web interface feature: 7801fb5e5cd76e84d04ac4c866fddec6dcbaa3ea Hello, Thank you for this work. I have pulled your fix for spacewalk-repo-sync from git and quick tested it on a small channel. It seems that the result of of latest_packages function from spacewalk.satellite_tools.reposync contains more than the latest packages contained in the yum repository to synchronize. For example, from this list of RPMs : java-1.7.1-ibm-1.7.1.0.0-1jpp.4.el7-1.i686 java-1.7.1-ibm-1.7.1.0.0-1jpp.4.el7-1.x86_64 java-1.7.1-ibm-1.7.1.1.0-1jpp.2.el7_0-1.i686 java-1.7.1-ibm-1.7.1.1.0-1jpp.2.el7_0-1.x86_64 java-1.7.1-ibm-1.7.1.1.0-1jpp.3.el7_0-1.i686 java-1.7.1-ibm-1.7.1.1.0-1jpp.3.el7_0-1.x86_64 java-1.7.1-ibm-1.7.1.1.1-1jpp.1.el7_0-1.i686 java-1.7.1-ibm-1.7.1.1.1-1jpp.1.el7_0-1.x86_64 java-1.7.1-ibm-1.7.1.2.0-1jpp.3.el7_0-1.i686 java-1.7.1-ibm-1.7.1.2.0-1jpp.3.el7_0-1.x86_64 java-1.7.1-ibm-1.7.1.2.10-1jpp.3.el7_0-1.i686 java-1.7.1-ibm-1.7.1.2.10-1jpp.3.el7_0-1.x86_64 java-1.7.1-ibm-1.7.1.3.0-1jpp.2.el7_1-1.i686 java-1.7.1-ibm-1.7.1.3.0-1jpp.2.el7_1-1.x86_64 java-1.7.1-ibm-1.7.1.3.10-1jpp.1.el7_1-1.i686 java-1.7.1-ibm-1.7.1.3.10-1jpp.1.el7_1-1.x86_64 the latest_packages function returns all RPMs except java-1.7.1-ibm-1.7.1.0.0-1jpp.4.el7-1.i686 and java-1.7.1-ibm-1.7.1.0.0-1jpp.4.el7-1.x86_64. I'd expect it to return java-1.7.1-ibm-1.7.1.3.10-1jpp.1.el7_1-1.i686 and java-1.7.1-ibm-1.7.1.3.10-1jpp.1.el7_1-1.x86_64. I also see that this function removes all but the latest versions of a package from the Spacewalk channel by calling self.disassociate_package for all packages that are not the latest version present in the repository to synchronize. I would like to be able to keep the previous versions of a package in my channels until I decide to cleanup the obsoleted versions that are not currently installed on one of my system. I'd wish that spacewalk-repo-sync didn't call disassociate package for the packages not selected by the --latest option. Regards, Stéphane Please check spacewalk git 9f189c34f6d18fc064a2a8e21c195f3c6152b384. Please give me some feedback if it works better. Thanks, Jiri Hello Jiri, Thank you for the update and sorry for the delay in testing this new version. I was away from work the previous weeks. This new version still returns too many RPMs. From the list of RPMs from my previous post, a call to latest_packages now returns this list : java-1.7.1-ibm-1.7.1.0.0-1jpp.4.el7-1.i686 java-1.7.1-ibm-1.7.1.0.0-1jpp.4.el7-1.x86_64 java-1.7.1-ibm-1.7.1.1.0-1jpp.2.el7_0-1.i686 java-1.7.1-ibm-1.7.1.1.0-1jpp.2.el7_0-1.x86_64 java-1.7.1-ibm-1.7.1.1.1-1jpp.1.el7_0-1.i686 java-1.7.1-ibm-1.7.1.1.1-1jpp.1.el7_0-1.x86_64 java-1.7.1-ibm-1.7.1.2.10-1jpp.3.el7_0-1.i686 java-1.7.1-ibm-1.7.1.2.10-1jpp.3.el7_0-1.x86_64 java-1.7.1-ibm-1.7.1.3.0-1jpp.2.el7_1-1.i686 java-1.7.1-ibm-1.7.1.3.0-1jpp.2.el7_1-1.x86_64 java-1.7.1-ibm-1.7.1.3.10-1jpp.1.el7_1-1.i686 java-1.7.1-ibm-1.7.1.3.10-1jpp.1.el7_1-1.x86_64 From the source code, this seems to be the consequence of taking into account the release of the RPMs when checking if a newer version of an RPM has been already seen (package.getNRA). May I suggest to just take the name and the arch of an RPM for this check ? Regards, Stéphane Spacewalk 2.4 has been released. |