Bug 1048973

Summary: [rfe] repo priorities and costs
Product: [Fedora] Fedora Reporter: MaxiPunkt <maxantispam>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 24CC: akozumpl, gotwig, jzeleny, langdon, lkocman, pnemade, rholy
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: hawkey-0.4.18-2.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1328467 (view as bug list) Environment:
Last Closed: 2016-04-19 13:03:29 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1328467    

Description MaxiPunkt 2014-01-06 16:30:10 UTC
Description of problem:
Wanted do give dnf/PackageKit-hawkey a try.
Beside official Fedora-repos I'm using my own, local repo.

This repo has high priority-setting:
[repo-maxipunkt]
name=Repo-MaxiPunkt for Fedora $releasever - $basearch
baseurl=file:///var/cache/repo-maxipunkt/
enabled=1
priority=1
...
...

yum/PackageKit-yum does honor this priority-setting, if "yum-plugin-priorities" is installed - meaning my own packages won't be replaced by other (newer) versions beloning to other repos, when doing a "yum update".


But dnf/PackageKit-hawkey doesn't care about "priority=1" and wants to update my packages, when doing an update.


Version-Release number of selected component (if applicable):
* dnf-0.4.10-1.fc20.noarch
* PackageKit-hawkey-0.8.15-1.fc20.x86_64



Must priority-setting be done in a different way for dnf/hawkey, or is this "just" a feature still to come?

Comment 1 Ales Kozumplik 2014-01-06 16:52:49 UTC
Hey there, thanks for the report. The priorities option is supplied by the yum-plugin-priorities plugin which is not available for DNF yet. Assigning this somewhat lower priority for now, several pieces in the DNF API are missing yet to make an implementation possible.

Comment 2 Eduard Gotwig 2014-06-03 11:30:27 UTC
I depend on this function.

Is there no change for more than 5 months?

Comment 3 Ales Kozumplik 2014-06-12 08:07:40 UTC
Hello Eduard, there has been many changes since January, see e.g. [1]

[1] https://github.com/akozumpl/dnf/commits/master

Comment 4 Ales Kozumplik 2014-07-14 12:22:37 UTC
Added with 5928785.

Comment 5 MaxiPunkt 2014-07-14 17:21:34 UTC
Cool, thanks!

Would be great if you would backport next release of dnf including this fix to FC20 (official update-repos)...

Comment 6 Fedora Update System 2014-07-17 06:42:34 UTC
hawkey-0.4.18-2.fc20, dnf-0.5.4-1.fc20, libsolv-0.6.4-0.git2a5c1c4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/hawkey-0.4.18-2.fc20,dnf-0.5.4-1.fc20,libsolv-0.6.4-0.git2a5c1c4.fc20

Comment 7 Fedora Update System 2014-07-19 06:03:03 UTC
hawkey-0.4.18-2.fc20, dnf-0.5.4-1.fc20, libsolv-0.6.4-0.git2a5c1c4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 MaxiPunkt 2014-07-29 19:26:23 UTC
Sorry, this fix doesn't work for me:

I've updated my system to new dnf/hawkey-version.
Some days later there are new updates are available for my system:

# yum update
Geladene Plugins: langpacks, priorities, refresh-packagekit
repo-maxipunkt                                                                                                    | 2.9 kB  00:00:00     
72 packages excluded due to repository priority protections
Abhängigkeiten werden aufgelöst
--> Transaktionsprüfung wird ausgeführt
---> Paket fxload.x86_64 0:2002_04_11-14.fc20 markiert, um aktualisiert zu werden
---> Paket fxload.x86_64 0:2008_10_13-1.fc20 markiert, um eine Aktualisierung zu werden
---> Paket qt.x86_64 1:4.8.6-9.fc20.1 markiert, um aktualisiert zu werden
---> Paket qt.x86_64 1:4.8.6-10.fc20 markiert, um eine Aktualisierung zu werden
---> Paket qt-devel.x86_64 1:4.8.6-9.fc20.1 markiert, um aktualisiert zu werden
---> Paket qt-devel.x86_64 1:4.8.6-10.fc20 markiert, um eine Aktualisierung zu werden
---> Paket qt-mysql.x86_64 1:4.8.6-9.fc20.1 markiert, um aktualisiert zu werden
---> Paket qt-mysql.x86_64 1:4.8.6-10.fc20 markiert, um eine Aktualisierung zu werden
---> Paket qt-x11.x86_64 1:4.8.6-9.fc20.1 markiert, um aktualisiert zu werden
---> Paket qt-x11.x86_64 1:4.8.6-10.fc20 markiert, um eine Aktualisierung zu werden
--> Abhängigkeitsauflösung beendet
...
...
...

To be able to test new dnf-version, I have canceled these yum-updates.


But new dnf-version doesn't find ANY updates.
At least it doesn't try to overwrite my personal RPM's with higher priority-setting anymore:

# dnf update
Repo-MaxiPunkt for Fedora 20 - x86_64                                                                     11 MB/s | 110 kB     00:00    
Abhängigkeiten sind aufgelöst.
Nichts zu tun.


To be able to test new hawkey-version, I have uninstalled yum-backend for packagekit:
# yum erase PackageKit-yum

# pkcon backend-details
Name:           hawkey
Description:    Hawkey
Author: Richard Hughes <richard>


# pkcon get-updates
Aktualisierungen werden abgerufen[=========================]         
Warten in Warteschlange       [=========================]         
Fertig                        [=========================]         
Normal          audiofile-1:0.3.6-2.fc20.x86_64 (fedora)                        A library for accessing various audio file formats
Normal          audiofile-devel-1:0.3.6-2.fc20.x86_64 (fedora)                  Development files for Audio File applications
Normal          fxload-2008_10_13-1.fc20.x86_64 (updates)                       A helper program to download firmware into FX and FX2 EZ-USB devices
Normal          gpsd-3.9-4.fc20.x86_64 (updates)                                Service daemon for mediating access to a GPS
Normal          gpsd-devel-3.9-4.fc20.x86_64 (updates)                          Development files for the gpsd library
Normal          gpsd-libs-3.9-4.fc20.x86_64 (updates)                           Client libraries in C and Python for talking to a running gpsd or GPS
Normal          kde-plasma-translatoid-1.30-10.svn01092011.fc20.x86_64 (fedora) Translator Using Google Translator
Normal          libzen-0.4.29-2.fc20.x86_64 (fedora)                            Shared library for libmediainfo and medianfo*
Normal          libzen-devel-0.4.29-2.fc20.x86_64 (fedora)                      Include files and mandatory libraries for development
Normal          qmmp-0.7.7-1.fc20.1.x86_64 (updates)                            Qt-based multimedia player
Normal          qt-1:4.8.6-10.fc20.x86_64 (updates)                             Qt toolkit
Normal          qt-devel-1:4.8.6-10.fc20.x86_64 (updates)                       Development files for the Qt toolkit
Normal          qt-mysql-1:4.8.6-10.fc20.x86_64 (updates)                       MySQL driver for Qt's SQL classes
Normal          qt-x11-1:4.8.6-10.fc20.x86_64 (updates)                         Qt GUI-related libraries
Normal          soxr-0.1.1-2.fc20.x86_64 (fedora)                               The SoX Resampler library
Normal          soxr-devel-0.1.1-2.fc20.x86_64 (fedora)                         Development files for soxr
Normal          tinyxml2-1.0.11-3.20130805git0323851.fc20.x86_64 (fedora)       Simple, small and efficient C++ XML parser
Normal          tinyxml2-devel-1.0.11-3.20130805git0323851.fc20.x86_64 (fedora) Development files for tinyxml2


New hawkey-version does find the updates, BUT
it also wants to overwrite my personal RPM's with higher priority-setting!


So beside the other issue (dnf can't find updates available),
there still something is wrong with your recent fix.

Comment 9 Lubos Kocman 2016-04-19 12:24:15 UTC
Hi team

It's not working at all. This is currently a blocker for modularity project.

Why is it a blocker?

I can't use pungi's lookaside (hey if something is in this repo with super high priority ... don't make it part of result (e.g. this is already in another module). Both priority and cost are totally ignored and I can't really say what repo will be the result of query from :-P

Lubos

Comment 10 Lubos Kocman 2016-04-19 13:03:29 UTC
Closing this particular bug, as it fixes one usecase. My usecase (.query()) is tracked in Bug 1328467

Lubos

Comment 11 Langdon White 2018-05-21 19:23:45 UTC
I believe this is meant to be closed.