Description of problem: Documentation of rlRpmDownload says "Try to download specified package." However it tries to download mix of installed and specified NVR. Option --source is especially nasty, as it ignores specified version,release and finishes successfully. But with wrong srpm. Version-Release number of selected component (if applicable): beakerlib-redhat-1-29.el7eso Steps to Reproduce: 0. yum install -y java-1.8.0-openjdk # of other version than below) 1. rlRpmDownload java-1.8.0-openjdk 1.8.0.131 7.b12.el7 src 2. rlRpmDownload --source java-1.8.0-openjdk 1.8.0.131 7.b12.el7 Actual results: 1) :: [ 11:25:31 ] :: rlRpmDownload: Fetching RPM java-1.8.0-openjdk-1.8.0.131-7.b12.el7.src :: [ 11:25:31 ] :: [ INFO ] :: trying to get the package using method 'direct' :: [ 11:25:31 ] :: trying download from '...packages/java-1.8.0-openjdk/1.8.0.121/6.b14.el7/src/java-1.8.0-openjdk-1.8.0.131-7.b12.el7.src.rpm' 2) trying download from '.../packages/java-1.8.0-openjdk/1.8.0.121/6.b14.el7/src/java-1.8.0-openjdk-1.8.0.121-6.b14.el7.src.rpm' Expected results: Use specified Version, Release in URL (not installed one). Detection should be used only if the user omitted arguments. Additional info:
So the problem is with --source. I guess this comes from the fact that --source was used especially by rlFetchSrcForInstalled where just name of the package is expected and version and release is got from the installed one. Is that right?
Unfortunately the problem is in both. The only difference is that --source exits with 0 and hides the issue. In neither case rlRpmDownload downloads _specified_ n v r a
fixed by https://github.com/beakerlib/beakerlib/commit/24815efefc6375b558904d4c54a1f533d8a6a80c
Works for me, but two notes: - Isn't it a bit verbose? - Why there are ther duplicate tries? # rlRpmDownload --source java-1.8.0-openjdk 1.8.0.20 3.b26.el6 :: [ 02:35:10 ] :: rlRpmDownload: Fetching source RPM java-1.8.0-openjdk-1.8.0.20-3.b26.el6. :: [ 02:35:10 ] :: [ INFO ] :: trying to get the package using method 'direct' :: [ 02:35:10 ] :: [ INFO ] :: trying tool rpm with nvr :: [ 02:35:11 ] :: [ INFO ] :: rpm 'java-1.8.0-openjdk-1.8.0.20-3.b26.el6' not available using 'rpm' tool :: [ 02:35:11 ] :: [ INFO ] :: trying tool rpm with nvr :: [ 02:35:11 ] :: [ INFO ] :: rpm 'java-1.8.0-openjdk-1.8.0.20-3.b26.el6' not available using 'rpm' tool :: [ 02:35:11 ] :: [ INFO ] :: trying tool rpm with n :: [ 02:35:11 ] :: [ INFO ] :: rpm 'java-1.8.0-openjdk' not available using 'rpm' tool :: [ 02:35:11 ] :: [ INFO ] :: trying tool rpm with n :: [ 02:35:11 ] :: [ INFO ] :: rpm 'java-1.8.0-openjdk' not available using 'rpm' tool :: [ 02:35:11 ] :: [ INFO ] :: trying tool repoquery with nvr :: [ 02:35:11 ] :: [ INFO ] :: rpm 'java-1.8.0-openjdk-1.8.0.20-3.b26.el6' not available using 'repoquery' tool :: [ 02:35:11 ] :: [ INFO ] :: trying tool repoquery with nvr :: [ 02:35:11 ] :: [ INFO ] :: rpm 'java-1.8.0-openjdk-1.8.0.20-3.b26.el6' not available using 'repoquery' tool :: [ 02:35:11 ] :: [ INFO ] :: trying tool repoquery with n :: [ 02:35:12 ] :: [ INFO ] :: got rpm info for 'java-1.8.0-openjdk' via 'repoquery' :: [ 02:35:12 ] :: trying download from .....
It looks like duplicate but actually it tries brew and koji locations. I will probably turn those logs to debug logs in future. For now, as this is complete rework, I think it may help with finding problems.