Bug 1217155 - Yumex-DNF and Copr (for instance does not honor repo priority)
Summary: Yumex-DNF and Copr (for instance does not honor repo priority)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yumex-dnf
Version: 21
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Tim Lauridsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-29 16:27 UTC by Raphael Groner
Modified: 2015-05-26 03:18 UTC (History)
8 users (show)

Fixed In Version: dnfdaemon-0.3.8-1.fc22
Clone Of:
Environment:
Last Closed: 2015-05-19 16:22:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
repo with priority (320 bytes, text/plain)
2015-04-30 09:06 UTC, Raphael Groner
no flags Details

Description Raphael Groner 2015-04-29 16:27:39 UTC
Description of problem:
Copr repo has priority=23, but yumex-dnf prefers the package from official repo to be installed.

Version-Release number of selected component (if applicable):
yumex-dnf-4.1.1-1.fc21.noarch


How reproducible:
yes

Steps to Reproduce:
1. install a package with an older version from copr repo
2. start yumex-dnf
3.

Actual results:
Package from official repo (with more current version) is suggested as update.

Expected results:
No update suggestion.

Additional info:
This feature to honor priority setting in repo file could be optional but must be applied if active.
https://docs.fedoraproject.org/en-US/Fedora/14/html/Musicians_Guide/sect-Musicians_Guide-CCRMA_Repository_Priorities.html

The only known and working work-around is to ignore the update suggestion and do not install the package.

Comment 1 Tim Lauridsen 2015-04-30 07:15:16 UTC
weird, I am just using the dnf api to get the list of updates, it should handle all the low level repo stuff, like priorities.

dnf cli dont show the update ?

Comment 2 Tim Lauridsen 2015-04-30 07:17:29 UTC
can you tell me what copr repo you are using and what package, to I can reproduce it.

Comment 3 Raphael Groner 2015-04-30 09:04:35 UTC
Try with uGet 1.10.4-1 from my Copr backports repo:
yumex-dnf-4.1.1-1.fc21.noarch
uget-1.10.4-1.fc21.x86_64

https://copr.fedoraproject.org/coprs/raphgro/Backports20/

Official repo suggests unstable uGet 1.99.x
<rant>
that I don't like, also uGet project's download area recommends stable 1.10.4-1
</rant>

Comment 4 Raphael Groner 2015-04-30 09:06:44 UTC
Created attachment 1020471 [details]
repo with priority

Comment 5 Tim Lauridsen 2015-04-30 11:46:56 UTC
Ok, did some testing

add the repo and did a dnf install uget

uget-1.10.4-1.fc21.x86_64 get installed.

$ dnf update does not find any updates.

$ sudo dnf list updates
Using metadata from Thu Apr 30 09:21:51 2015 (4:19:11 hours old)
Upgraded Packages
uget.x86_64                                                1.99.6-1.fc22                                                 updates-testing
uget.x86_64                                                1.99.6-1.fc22                                                 fedora     

This seams to be the problems, yumex-dnf get updates available the same way as 
dnf list updates, look like the cli does som extra filtering, there will exclude 
the 1.99 uget somehow.

I will dig into the the dnf code to see whats goes on.

Comment 6 Tim Lauridsen 2015-04-30 11:53:51 UTC
yumex-dnf does version based updates like

$ dnf upgrade uget-1.99.6-1.fc22

that also will upgrade to uget-1.99.6-1.fc22

Comment 7 Raphael Groner 2015-04-30 18:04:51 UTC
So is this issue a bug / rfe of dnf?

dnf-0.6.4-1.fc21.noarch

Comment 8 Radek Holy 2015-05-04 15:56:13 UTC
"dnf list updates" works more like "dnf check-update" then like "dnf upgrade".
"dnf upgrade" takes into account which packages can be installed (e.g. do not conflict) and stuff like repository priorities. This cannot be achieved without doing the depsolving step (and "dnf list updates" intentionally doesn't do dependency solving).

To decide whether the problem is in DNF or in YUMEX, we need to know how YUMEX uses DNF. Tim, can you post the relevant parts of how YUMEX uses DNF's API?

Comment 9 Radek Holy 2015-05-04 16:01:05 UTC
This is basically what should YUMEX do to find the same upgrades as DNF:

    import dnf

    with dnf.Base() as base:
        base.read_all_repos()
        base.fill_sack()
        base.upgrade_all()
        base.resolve()
        # inspect base.transaction.install_set and base.transaction.remove_set

(don't forget to handle the appropriate exceptions)

Comment 10 Tim Lauridsen 2015-05-05 16:32:54 UTC
moving this back to yumex-dnf.

I just use dnf.Base.upgrades().latest() to get available updates, it just get available updates from the repos, to say anything about if the updates can be installed and don't handle stuff like repo priority etc.

This is not a direct bug in dnf, I will just need a better way to handle updates
in yumex-dnf

Comment 11 Tim Lauridsen 2015-05-05 17:29:02 UTC
fixed upstream in dnfdaemon

https://github.com/timlau/dnf-daemon/commit/340ffa055837a14cf07d3ea5b702c61ce6fa33e2

Comment 12 Raphael Groner 2015-05-05 17:34:25 UTC
There is definitely a discrepancy between available updates listed in "dnf update" and yumex-dnf's updates list. I guess that must have something to do with enabled copr repositories, e.g. while "dnf update" does not suggest the copr build, yumex-dnf recommends this update - but I am not sure if it's somehow also related to wrong versioning of those individual packages.

Comment 13 Tim Lauridsen 2015-05-06 05:35:48 UTC
(In reply to Raphael Groner from comment #12)
> There is definitely a discrepancy between available updates listed in "dnf
> update" and yumex-dnf's updates list. I guess that must have something to do
> with enabled copr repositories, e.g. while "dnf update" does not suggest the
> copr build, yumex-dnf recommends this update - but I am not sure if it's
> somehow also related to wrong versioning of those individual packages.

this should not be the case with current upstream, I will make a new release very soon.

Comment 14 Raphael Groner 2015-05-06 09:59:48 UTC
(In reply to Tim Lauridsen from comment #11)
> fixed upstream in dnfdaemon
> 
> https://github.com/timlau/dnf-daemon/commit/
> 340ffa055837a14cf07d3ea5b702c61ce6fa33e2

Thanks! Please let me know when there's a new version ready to test.

Comment 15 Fedora Update System 2015-05-06 11:38:21 UTC
dnfdaemon-0.3.8-1.fc21,yumex-dnf-4.1.2-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dnfdaemon-0.3.8-1.fc21,yumex-dnf-4.1.2-1.fc21

Comment 16 Fedora Update System 2015-05-06 11:38:36 UTC
dnfdaemon-0.3.8-1.fc22,yumex-dnf-4.1.2-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/dnfdaemon-0.3.8-1.fc22,yumex-dnf-4.1.2-1.fc22

Comment 17 Raphael Groner 2015-05-10 12:48:35 UTC
(In reply to Fedora Update System from comment #15)
> dnfdaemon-0.3.8-1.fc21,yumex-dnf-4.1.2-1.fc21 has been submitted as an
> update for Fedora 21.
> https://admin.fedoraproject.org/updates/dnfdaemon-0.3.8-1.fc21,yumex-dnf-4.1.
> 2-1.fc21

This is not fixed with version 4.1.2 of yumex-dnf. But I detect that the setting "show newest only" does prevent to have the copr build with an older version within the list. If that checkbox is unmarked, there are both versions available with their individual repo. Maybe there's a feature conflict?

Although, I'll give positive karma cause this here is a minor issue.

Comment 18 Tim Lauridsen 2015-05-10 13:46:42 UTC
It is fixed in the default update list, and it will not show the uget 1.99 update 
by default, but if you are searching for uget, you will se the uget 1.99 and be able to update it, if you like too

Comment 19 Raphael Groner 2015-05-10 14:12:52 UTC
(In reply to Tim Lauridsen from comment #18)
> It is fixed in the default update list, and it will not show the uget 1.99
> update 
> by default, but if you are searching for uget, you will se the uget 1.99 and
> be able to update it, if you like too

This explanation sounds reasonable with the "show newest" setting.
Setting status back to MODIFIED.

Comment 20 Fedora Update System 2015-05-10 23:54:53 UTC
Package yumex-dnf-4.1.2-1.fc21, dnfdaemon-0.3.8-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing yumex-dnf-4.1.2-1.fc21 dnfdaemon-0.3.8-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-7760/dnfdaemon-0.3.8-1.fc21,yumex-dnf-4.1.2-1.fc21
then log in and leave karma (feedback).

Comment 21 Fedora Update System 2015-05-19 16:22:24 UTC
yumex-dnf-4.1.2-1.fc21, dnfdaemon-0.3.8-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2015-05-26 03:18:02 UTC
dnfdaemon-0.3.8-1.fc22, yumex-dnf-4.1.2-1.fc22 has been pushed to the Fedora 22 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.