Bug 1237014

Summary: PackageKit ignores exclude in /etc/dnf/dnf.conf
Product: [Fedora] Fedora Reporter: Tomas Lestach <tlestach>
Component: PackageKitAssignee: Richard Hughes <rhughes>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: jetchko.jekov, jonathan, kalevlember, rdieter, rhughes, smparrish
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-30 15:51:07 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:

Description Tomas Lestach 2015-06-30 08:00:38 UTC
Description of problem:
PackageKit keeps telling me there're updates for packages I listed in exclude of /etc/dnf/dnf.conf

Version-Release number of selected component (if applicable):
PackageKit-Qt5-0.9.5-1.fc22.x86_64
PackageKit-glib-1.0.6-6.fc22.x86_64
PackageKit-1.0.6-6.fc22.x86_64

How reproducible:
always

Steps to Reproduce:
1. set a package (or more) to be excluded from updates in /etc/dnf/dnf.conf as:

# grep exclude /etc/dnf/dnf.conf 
exclude=tito
2. dnf update --refresh
3. wait for the PackageKit event

Actual results:
# dnf update --refresh
...
Last metadata expiration check performed 0:00:00 ago on Tue Jun 30 09:54:17 2015.
Dependencies resolved.
Nothing to do.
Complete!

PackageKit reports there's a tito update for my system.

Expected results:
PackageKit may not ignore /etc/dnf/dnf.conf

Comment 1 Rex Dieter 2015-06-30 11:58:05 UTC
PackageKit doesn't use dnf, so sorry, the expectation that it should respect directives in dnf.conf is invalid.

Comment 2 Tomas Lestach 2015-06-30 12:56:08 UTC
I'm not telling PackageKit shall use dnf. But as dnf is the default package manager in fc22, PackageKit should read its configuration to behave in the similar way like dnf does.

Btw. I have the exclude defined in /etc/yum.conf as well:
# grep exclude /etc/yum.conf 
exclude=tito
and PackageKit wants to update my excluded file anyway.

I do not see any way to define excludes for PackageKit. Even if there would be any separate way, I doubt the users would be willing to configure it separately and keep the configuration in sync with their dnf.conf/yum.conf.

Comment 3 Rex Dieter 2015-06-30 13:01:32 UTC
The last release that supported what you describe was fedora 20, when PackageKit used a yum-based backend.  Since f21, that's no longer true.

Like I said, if you now expect PackageKit to respect yum.conf or dnf.conf, that's an invalid assumption, sorry.

Comment 4 Rex Dieter 2015-06-30 13:02:57 UTC
Feel free to ask onlist or other support forums for help on how to make PackageKit exclude things (personally, I'm not aware of any way to do that unfortunately),
https://fedoraproject.org/wiki/Communicating_and_getting_help

Comment 5 Tomas Lestach 2015-06-30 13:52:59 UTC
Well, I do not need support, how to make PackageKit exclude packages.
I feel the fact PackageKit does not acknowledge the default package manager configuration is a bug.

Again, I am not saying PackageKit shall use dnf or yum. It should just use its configuration.

Comment 6 Rex Dieter 2015-11-12 18:02:30 UTC
That probably won't happen, sorry.

One workaround though, you *can* add excludes to .repo files, PackageKit does respect that (in my own testing).

Comment 7 Jetchko Jekov 2015-11-19 21:11:53 UTC
No offense but that's not the way PackageKit should behave. 
DNF is a default package manager in Fedora. One must not be forced to use workarounds but PackageKit should respect DNF's configuration.
I just got bitten by this bug which rendered my desktop unusable (nvidia binary blob + xorg 1.18) until I managed to figure out what happened and most importantly *why* that happened.

So yes, it is a bug.

Comment 8 Rex Dieter 2015-11-19 22:41:19 UTC
No offense taken (by me). 

I'm just sharing the reality of how these are currently designed (in comment #1)

I even offered an alternate implementation to achieve the same goal (in comment #6)

As an aside (and is strictly offtopic, but worth mentioning):  Re-opening bugs just because you disagree with current design likely isn't very constructive.  There are much better ways to affect change, if that's what you want.

Comment 9 Jetchko Jekov 2015-11-20 08:54:27 UTC
So let's see whats are you proposing. 
In my particular case with masking x11-xorg*:

I should put same exclude line in fedora*.repo files
I am tracking some copr repos which include x11 so I should put that line there too.
I also have some external repos because of that nvidia driver which inlude x11 so I should put that line there too.

In the end, your proposal is to make *same* chance in several files (in my case 7) and keep them in sync instead in *one* single file, just because PackageKit is flawed. What if i have more use cases for such excludes? I have to track which repository include packages I intend to exclude and put exclude lines in respective files.
I guess you can see how this proposal is not a working solution at all.

(I was *not* the one who reopened the bug)

Comment 10 Rex Dieter 2015-11-30 15:51:07 UTC

*** This bug has been marked as a duplicate of bug 1256108 ***