Bug 1306304 - [perf] cache installed set of packages in query (for updates)
[perf] cache installed set of packages in query (for updates)
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
: Reopened
: 1254904 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-10 09:08 EST by 0xHM
Modified: 2016-03-26 13:58 EDT (History)
8 users (show)

See Also:
Fixed In Version: dnf-1.1.7-2.fc23 dnf-1.1.7-2.fc24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-26 13:58:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description 0xHM 2016-02-10 09:08:40 EST
Description of problem:

DNF does not handle cli "repository-packages REPO upgrade" as it should.T
The problem is that current :

https://github.com/rpm-software-management/dnf/blob/master/dnf/base.py#L1559

    def upgrade_all(self, reponame=None):
        # :api
        if reponame is None:
            self._goal.upgrade_all()
        else:
            try:
                self.upgrade('*', reponame)
            except dnf.exceptions.MarkingError:
                pass

After getting to that point it will call upgrade function with packages "*".

After that it will filter all system packages, but why ?

        def is_installed_by_name(pkg_name):
            return first(self.sack.query().installed().filter(name=pkg_name))

Version-Release number of selected component (if applicable):

1.1.6
  Installed: dnf-0:1.1.6-2.fc23.noarch at 2016-02-05 12:07
  Built    : Fedora Project at 2016-02-03 12:23

  Installed: rpm-0:4.13.0-0.rc1.11.fc23.x86_64 at 2016-02-05 11:50
  Built    : Fedora Project at 2016-02-02 11:52


Steps to Reproduce:
1. add print before with https://github.com/rpm-software-management/dnf/blob/master/dnf/base.py#L1529  you can print the package name

 
2. dnf repository-packages REPONAME upgrade
3. wait

Actual results:
prints all packages installed
slowness


Expected results:
Can be done much faster and smarter.

Additional info:
Comment 1 Honza Silhan 2016-02-10 09:27:05 EST
Thanks for the report.
Comment 2 Honza Silhan 2016-02-10 09:27:35 EST
*** Bug 1254904 has been marked as a duplicate of this bug. ***
Comment 3 Fedora Update System 2016-02-25 08:53:09 EST
dnf-plugins-core-0.1.17-1.fc23 dnf-1.1.7-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0123ce82c1
Comment 4 Fedora Update System 2016-02-25 08:56:12 EST
dnf-plugins-core-0.1.17-1.fc22 dnf-1.1.7-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f673381075
Comment 5 Fedora Update System 2016-03-09 12:19:36 EST
dnf-1.1.7-2.fc23 dnf-plugins-core-0.1.17-1.fc23 libsolv-0.6.19-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0123ce82c1
Comment 6 Fedora Update System 2016-03-09 12:21:24 EST
dnf-1.1.7-2.fc22 dnf-plugins-core-0.1.17-1.fc22 libsolv-0.6.19-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f673381075
Comment 7 Fedora Update System 2016-03-10 11:52:50 EST
dnf-1.1.7-2.fc22, dnf-plugins-core-0.1.17-1.fc22, libsolv-0.6.19-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f673381075
Comment 8 Fedora Update System 2016-03-10 11:54:24 EST
dnf-1.1.7-2.fc23, dnf-plugins-core-0.1.17-1.fc23, libsolv-0.6.19-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0123ce82c1
Comment 9 Fedora Update System 2016-03-13 19:54:51 EDT
dnf-1.1.7-2.fc23, dnf-plugins-core-0.1.17-1.fc23, libsolv-0.6.19-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2016-03-19 08:15:53 EDT
dnf-1.1.7-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c030d24231
Comment 11 Fedora Update System 2016-03-19 23:57:45 EDT
dnf-1.1.7-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c030d24231
Comment 12 Fedora Update System 2016-03-26 13:57:37 EDT
dnf-1.1.7-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

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