Bug 1396248 - [yum] AttributeError: FakeRepository instance has no attribute 'compare_providers_priority'
Summary: [yum] AttributeError: FakeRepository instance has no attribute 'compare_provi...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1380360
TreeView+ depends on / blocked
 
Reported: 2016-11-17 18:56 UTC by Dan Muey
Modified: 2019-02-12 08:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-12 08:16:46 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Dan Muey 2016-11-17 18:56:17 UTC
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
```

Comment 2 Daniel Mach 2019-02-12 08:16:46 UTC
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.


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