Bug 1448510 - rlRpmDownload ignores specified version, release
Summary: rlRpmDownload ignores specified version, release
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: beakerlib
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: Dalibor Pospíšil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-05 15:39 UTC by Lukáš Zachar
Modified: 2017-06-13 10:17 UTC (History)
5 users (show)

Fixed In Version: beakerlib-1.13-3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-13 10:17:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lukáš Zachar 2017-05-05 15:39:52 UTC
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:

Comment 1 Dalibor Pospíšil 2017-05-06 19:08:34 UTC
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?

Comment 2 Lukáš Zachar 2017-05-10 13:05:22 UTC
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

Comment 5 Lukáš Zachar 2017-05-18 06:45:17 UTC
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 .....

Comment 6 Dalibor Pospíšil 2017-05-18 06:49:31 UTC
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.


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