Bug 326619 - Accepting License agreement does not work when more than one license has to be accepted
Summary: Accepting License agreement does not work when more than one license has to b...
Status: RESOLVED FIXED
Alias: None
Product: apper
Classification: Applications
Component: general (show other bugs)
Version: 0.8.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Daniel Nicoletti
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-25 09:53 UTC by Wolfgang Bauer
Modified: 2014-04-23 13:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
patch that "fixes" the problem (850 bytes, patch)
2013-10-25 10:00 UTC, Wolfgang Bauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Bauer 2013-10-25 09:53:16 UTC
I tried to update my openSUSE 13.1RC1 system using Apper (last updated on Oct
15th) but it failed:

First I get a dialog about "License required for openSUSE by openSUSE" (LICENSE
AGREEMENT® 13.1).

If I click on "Accept Agreement" I just get:
"The license agreement was not agreed to. To use this software you have to
accept the license." Details: "You've to agree/decline a license"

Strange enough, after a few times trying this (failing every time) and then
choosing "Cancel", I suddenly only got a license agreement for flash-player.
But I can't reproduce this, after cancelling that I only ever got the first one
about openSUSE.

I tried to run "pkcon update" and this seemed to work: it showed me 3 license
agreements, one after the other (openSUSE, flash-player, and fluendo-mp3), and
continued to download the updates. I killed packagekitd then though, to be able
to still reproduce the original problem. But at least it proceeded further than
Apper.

I didn't install any of the updates yet, so I can still try to investigate (it's a VM anyway).

Debug output of Apper when accepting the first license:
apper(3026) PkTransaction::slotFinished: 1 22
apper(3026) PkTransaction::slotErrorCode: errorCode:  34 "You've to
agree/decline a license"
apper(3026) PkTransaction::slotFinished: 5 22
apper(3026) PkTransaction::slotFinished: finished KeyRequired or EulaRequired: 
5
apper(3026) PkTransaction::acceptEula: Accepting EULA "openSUSE"
apper(3026) PkTransaction::slotFinished: 1 24
apper(3026) PkTransaction::slotErrorCode: errorCode:  34 "You've to
agree/decline a license"
apper(3026) PkTransaction::slotFinished: 5 22
apper(3026) PkTransaction::slotFinished: finished KeyRequired or EulaRequired: 
5
apper(3026) PkTransaction::slotFinished: Not Handling Required Action
apper(3026) PkTransaction::setExitStatus: 1
apper(3026)/kdeui (KNotification) KNotificationManager::close: 6
apper(3026) PkTransaction::setExitStatus: 1
Comment 1 Wolfgang Bauer 2013-10-25 10:00:44 UTC
Created attachment 83103 [details]
patch that "fixes" the problem

Attached patch makes this work for me.
I don't think this is the right way to fix the issue, but it may provide further clues what's going wrong in the first place.
Comment 2 Wolfgang Bauer 2013-10-25 10:15:11 UTC
To clarify:
The issue is that d->handlingActionRequired is not reset to false after accepting the license.
So it is still true when the next license agreement has to be accepted and slotEulaRequired bails out without showing that second license agreement.
Comment 3 Wolfgang Bauer 2013-10-25 12:34:02 UTC
Proposed fix:
https://git.reviewboard.kde.org/r/113428/
Comment 4 Wolfgang Bauer 2013-10-27 15:03:15 UTC
Git commit 91084eef8b999d04ef5b8cd6b140e2c4d8b942dd by Wolfgang Bauer.
Committed on 27/10/2013 at 14:56.
Pushed by wbauer into branch 'master'.

Fix accepting multiple license agreements

This patch fixes the handling of more than one license agreement by
setting d->handlingActionRequired = false in requeueTransaction().

Before, this was still true when entering slotEulaRequired() for the
second license. That one was not shown therefore, but Apper aborted
instead.

M  +5    -0    libapper/PkTransaction.cpp

http://commits.kde.org/apper/91084eef8b999d04ef5b8cd6b140e2c4d8b942dd