Bug 739985 - PackageKit-zif treats empty transaction as an error
Summary: PackageKit-zif treats empty transaction as an error
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: 15
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-20 15:42 UTC by Kevin Kofler
Modified: 2012-08-07 19:51 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 19:51:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kevin Kofler 2011-09-20 15:42:46 UTC
Description of problem:
After updating my system with KPackageKit, KPackageKit tries to check if there's anything left to update and comes up with a dialog claiming there are broken dependencies, but the actual message from PackageKit-zif just says there's nothing to do. Apparently, all the other backends (or at least the ones KPackageKit was tested with, i.e. aptcc and yum) just return an empty transaction, whereas PackageKit-zif treats this as an error.

Version-Release number of selected component (if applicable):
zif-0.2.4-0.78.20110918git.fc15.x86_64
PackageKit-zif-0.6.17-1.fc15.libzif.so.3.x86_64
kpackagekit-0.6.3.3-2.fc15.plasma.x86_64
(The KPackageKit build is the same as the official kpackagekit-0.6.3.3-2.fc15 except that I backported my Plasma services patch.)

How reproducible:
Always? (Seems to have happened both times there were updates available so
far.)

Steps to Reproduce:
1. Update your system using KPackageKit.
  
Actual results:
KPackageKit comes up with a bogus error after the transaction completes.

Expected results:
No error. PackageKit-zif should match the behavior of the other backends.

Comment 1 Richard Hughes 2011-09-20 16:28:12 UTC
Hmm, an unusual bug. Could you get a packagekitd --verbose log of what happens when you update and then get the updates list again please? I think something might have been cached when it shouldn't have been. Thanks.

Comment 2 Kevin Kofler 2011-09-20 20:31:10 UTC
The verbose output:

22:30:18        Zif                 starting resolve with 0 to install, 0 to update, and 0 to remove                                                            
22:30:18        Zif                 2198 already in world state                 
22:30:18        Zif                 starting INSTALL on loop 1                  
22:30:18        Zif                 starting UPDATE on loop 1                   
22:30:18        Zif                 starting REMOVE on loop 1                   
22:30:18        Zif                 starting CONFLICTS on loop 1                
22:30:18        Zif                 loop 1 now resolved = YES                   
22:30:18        PackageKit          emitting error-code dep-resolution-failed, 'cannot resolve transaction: no packages will be installed, removed or updated'

Comment 3 Richard Hughes 2011-09-21 13:37:39 UTC
Okay, I think what's happening here is actually more subtle.

KPK -> GetUpdates
*Zif returns (foo bar baz)*
*PK desolves (foo bar baz) using Zif*
PK <- updates list(foo bar baz)
KPK -> UpdatePackage(foo bar baz)
PK -> Success!

KPK -> GetUpdates
*Zif returns (foo bar baz)*
*PK desolves (foo bar baz) using Zif*

#boom# - transaction comes up empty as there's nothing to do.

Note: this only happens if KPK is doing the GetUpdates with an idle background hint. I'll play with this a bit more tonight.

Comment 4 Kevin Kofler 2011-09-26 21:20:05 UTC
Any news on this one? It still happens with:
zif-0.2.5-0.129.20110926git.fc15.x86_64
PackageKit-0.6.17-1.fc15.zifbackend.20110926git.x86_64
PackageKit-zif-0.6.17-1.fc15.zifbackend.20110926git.x86_64
i.e. with zif and pk-backend-zif.c from today's git master.

Comment 5 Richard Hughes 2011-09-27 09:36:09 UTC
Can you try with PK master please:

commit 2c3982fa6c4a6efcb503e13e2fbe1f8d647f7704
Author: Richard Hughes <richard>
Date:   Tue Sep 27 10:35:24 2011 +0100

    zif: When the transaction has no thing to do, use the correct PK error code enum
    
    Resolves https://bugzilla.redhat.com/show_bug.cgi?id=739985

Thanks!

Comment 6 Kevin Kofler 2011-09-27 10:46:58 UTC
I can't build it now because the libzif headers are broken in today's snapshot (zif-0.2.5-0.131.20110927git):

In file included from pk-backend-zif.c:27:0:
/usr/include/libzif/zif.h:47:28: fatal error: zif-store-meta.h: No such file or directory
compilation terminated.

Comment 7 Kevin Kofler 2011-09-27 20:51:43 UTC
I built a custom PackageKit-0.6.17-1.fc15.zifbackend.20110926git.1 now which includes this fix, I'll report what happens after the next update push.

Comment 8 Kevin Kofler 2011-09-27 21:02:58 UTC
(PS: The PackageKit-0.6.17-1.fc15.zifbackend.20110926git.1 build is up in my zif-backport repository, as usual.)

Comment 9 Kevin Kofler 2011-09-28 00:28:10 UTC
Tested with today's kde-plasma-networkmanagement update.

Unfortunately, KPackageKit still pops up an error/warning dialog. The error message now at least makes more sense, but it's telling me that "None of the selected packages could be updated" (which kinda implies that some packages were selected and an update of them requested; a user might incorrectly assume that it was the update that he/she requested that didn't work, when in fact that update worked perfectly and the "problem" is that there's nothing left to update now). So, while the error message is more correct now, the real problem lies elsewhere.

Comment 10 Fedora End Of Life 2012-08-07 19:51:28 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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