Bug 1328467 - [rfe] repo priorities and costs are ignored by query
Summary: [rfe] repo priorities and costs are ignored by query
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 24
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1048973
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-19 13:01 UTC by Lubos Kocman
Modified: 2016-07-21 13:51 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1048973
Environment:
Last Closed: 2016-07-21 13:51:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lubos Kocman 2016-04-19 13:01:31 UTC
Hello,

I'm cloning previous bug since I believe this issues are connected.
And the original request was fixed only for one particular use case.

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

.query itself is no

+++ This bug was initially created as a clone of Bug #1048973 +++

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?

--- Additional comment from Ales Kozumplik on 2014-01-06 11:52:49 EST ---

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.

--- Additional comment from Eduard Gotwig on 2014-06-03 07:30:27 EDT ---

I depend on this function.

Is there no change for more than 5 months?

--- Additional comment from Ales Kozumplik on 2014-06-12 04:07:40 EDT ---

Hello Eduard, there has been many changes since January, see e.g. [1]

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

--- Additional comment from Ales Kozumplik on 2014-07-14 08:22:37 EDT ---

Added with 5928785.

--- Additional comment from MaxiPunkt on 2014-07-14 13:21:34 EDT ---

Cool, thanks!

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

--- Additional comment from Fedora Update System on 2014-07-17 02:42:34 EDT ---

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

--- Additional comment from Fedora Update System on 2014-07-19 02:03:03 EDT ---

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.

--- Additional comment from MaxiPunkt on 2014-07-29 15:26:23 EDT ---

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.

--- Additional comment from Lubos Kocman on 2016-04-19 08:24:15 EDT ---



Lubos

Comment 1 Fedora Admin XMLRPC Client 2016-07-08 09:31:01 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Michael Mráka 2016-07-21 13:51:52 UTC
AFAIK this has been fixed by
https://github.com/rpm-software-management/dnf/pull/479


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