#295: Provide proper functions for ENVRA manipulation -------------------------+-------------------------------------------------- Reporter: kparal | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Finger Food Component: core | Keywords: -------------------------+-------------------------------------------------- Some testcases need to manipulate ENVRA names, like stripping epoch, stripping architecture, detecting whether build name contains epoch, parsing out package name, etc. The current implementation (taken from depcheck) is clearly sub-optimal, because it doesn't reflect the full RPM naming spec, just the most widespread usage (e.g. can colon be part of NVR, except for separating epoch?):
{{{ def strip_epoch(rpmstr): return rpmstr.split(':',1)[-1] # works for E:N-V-R.A or N-V-R.A def strip_arch(rpmstr): return rpmstr.rsplit('.',1)[0] }}}
Let's create one or more methods for these tasks in our library and let's use rpmUtils module in them. That ensures that the correct algorithms for detecting epochs, names, releases, etc are used.
Most of the use cases for those methods have been mentioned in the description, but search through available code whether some more use cases are needed.
#295: Provide proper functions for ENVRA manipulation -------------------------+-------------------------------------------------- Reporter: kparal | Owner: jskladan Type: enhancement | Status: new Priority: minor | Milestone: Finger Food Component: core | Resolution: Keywords: | -------------------------+-------------------------------------------------- Changes (by kparal):
* owner: => jskladan
#295: Provide proper functions for ENVRA manipulation -------------------------+-------------------------------------------------- Reporter: kparal | Owner: jskladan Type: enhancement | Status: assigned Priority: minor | Milestone: Finger Food Component: core | Resolution: Keywords: | -------------------------+-------------------------------------------------- Changes (by jskladan):
* status: new => assigned
#295: Provide proper functions for ENVRA manipulation -------------------------+-------------------------------------------------- Reporter: kparal | Owner: jskladan Type: enhancement | Status: assigned Priority: minor | Milestone: Finger Food Component: core | Resolution: Keywords: | -------------------------+-------------------------------------------------- Comment (by jskladan):
Patch replacing these functions is in reviewboard https://fedorahosted.org/reviewboard/r/125
Note, that changes for upgradepath & depcheck are not included in the patch, since I'd like to discuss the method first.
#295: Provide proper functions for ENVRA manipulation -------------------------+-------------------------------------------------- Reporter: kparal | Owner: jskladan Type: enhancement | Status: assigned Priority: minor | Milestone: Finger Food Component: core | Resolution: Keywords: | -------------------------+-------------------------------------------------- Comment (by kparal):
Reviewed.
#295: Provide proper functions for ENVRA manipulation -------------------------+-------------------------------------------------- Reporter: kparal | Owner: jskladan Type: enhancement | Status: assigned Priority: minor | Milestone: Finger Food Component: core | Resolution: Keywords: | -------------------------+-------------------------------------------------- Comment (by jskladan):
Fixed accoring to the comments you provided.
#295: Provide proper functions for ENVRA manipulation -------------------------+-------------------------------------------------- Reporter: kparal | Owner: jskladan Type: enhancement | Status: assigned Priority: minor | Milestone: Finger Food Component: core | Resolution: Keywords: | -------------------------+-------------------------------------------------- Comment (by kparal):
Reviewed.
#295: Provide proper functions for ENVRA manipulation -------------------------+-------------------------------------------------- Reporter: kparal | Owner: jskladan Type: enhancement | Status: assigned Priority: minor | Milestone: Finger Food Component: core | Resolution: Keywords: | -------------------------+-------------------------------------------------- Comment (by jskladan):
fixed.
#295: Provide proper functions for ENVRA manipulation -------------------------+-------------------------------------------------- Reporter: kparal | Owner: jskladan Type: enhancement | Status: assigned Priority: minor | Milestone: Finger Food Component: core | Resolution: Keywords: | -------------------------+-------------------------------------------------- Comment (by kparal):
Reviewed.
#295: Provide proper functions for ENVRA manipulation -------------------------+-------------------------------------------------- Reporter: kparal | Owner: jskladan Type: enhancement | Status: closed Priority: minor | Milestone: Finger Food Component: core | Resolution: fixed Keywords: | -------------------------+-------------------------------------------------- Changes (by jskladan):
* status: assigned => closed * resolution: => fixed
Comment:
Pushed to Master. Closing.
#295: Provide proper functions for ENVRA manipulation -------------------------+-------------------------------------------------- Reporter: kparal | Owner: jskladan Type: enhancement | Status: closed Priority: minor | Milestone: 0.5.0 Component: core | Resolution: fixed Keywords: | -------------------------+-------------------------------------------------- Changes (by kparal):
* milestone: Finger Food => 0.5.0
Comment:
Just a note - pushed to master as 128606012b06ba5db3a2ef63c993c4246aa9d51a .
autoqa-devel@lists.fedorahosted.org