| Summary: | [yum] AttributeError: FakeRepository instance has no attribute 'compare_providers_priority' | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Dan Muey <drmuey> |
| Component: | yum | Assignee: | Packaging Maintenance Team <packaging-team-maint> |
| Status: | CLOSED WONTFIX | QA Contact: | BaseOS QE Security Team <qe-baseos-security> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.3 | CC: | dmach, james.antill, mdomonko |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-02-12 08:16:46 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: | |
| Bug Depends On: | |||
| Bug Blocks: | 1380360 | ||
There is no plan to fix this bug during RHEL 7 life cycle. If you still consider the issue important, please contact your support representative. |
This is not an issue in yum v3.2.29 but we are seeing it in v3.4.3. The pseudo repository “installed” is a FakeRepository object. ```._compare_providers()``` in v3.4.3 now does: ``` # Respect the repository priority for each provider, the default is 80 pkgresults[po] += (100 - po.repo.compare_providers_priority) * 10 self.verbose_logger.log(logginglevels.DEBUG_4, _('compare_providers_priority for %s is %s' % (po, po.repo.compare_providers_priority))) ``` the problem being that the FakeRepository class does not have ```compare_providers_priority``` (and so you get the error that is the Summary). We worked around this for now by doing this at the top of our library: ``` if not hasattr(yum.packages.FakeRepository, 'compare_providers_priority'): yum.packages.FakeRepository.compare_providers_priority = 99 ```