Bug 351311 - configure software sources only refreshes the database and doesn't open the configuration window
Summary: configure software sources only refreshes the database and doesn't open the c...
Status: RESOLVED FIXED
Alias: None
Product: muon
Classification: Applications
Component: misc (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Jonathan Thomas
URL:
Keywords:
: 351867 352929 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-08-15 02:33 UTC by gdiamondfist
Modified: 2015-09-20 08:04 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: Plasma 5.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gdiamondfist 2015-08-15 02:33:36 UTC
Muon package manager
version: 5.3.95
os: Linux (x86_64) release 4.1.0-3-generic  (Kubuntu 15.10)

When selecting the settings menu item and picking the "configure software sources" Muon will just update the repositories.  The window where you can update the software sources and adjust the settings never appears.  It is as if the window was opened, something changed and the close button was pressed.     Happens even after reboot. 


Reproducible: Always

Steps to Reproduce:
1.open muon package manager
2.select configure software sources
3.

Actual Results:  
Muon updates the package lists without ever opening the configure window

Expected Results:  
the configure window would open and the software database wouldn't update until after the close button was pressed.
Comment 1 Harald Sitter 2015-08-17 12:33:01 UTC
Aleix, the pkexec port broke software-properties-kde in libmuonapt :/

Firstly, the argument list for the kprocess is using a string rather than the list itself.

["pkexec",  "software-properties --attach yaydyaa"]
should *at least* be
["pkexec",  "software-properties", "--attach yaydyaa"]
pkexec checks if the second arg is a file that exists on disk, so by making it one string pkexec fails that check as "/usr/bin/software-properties-kde --attach -yolo" is no actual file.

Secondly, since software-properties-kde is a gui application we need to install a polkit actions file that enables the allow_gui option (e.g. http://paste.ubuntu.com/12107439/). So we could use desktop files (so we get message translation) BUT kauth-policy-gen is a hardcoded converter so we can't use it unless we expand it to allow for more control over the conversion content (i.e. it has a fixed set of desktop keys it converts to a very specific xml config).
That's where I gave up as it being too much effort.
Either we expand kauth-policy-gen or write our own local tool (in a more suitable language than cpp? :P) or screw translations or revert to kdesudo or port to kdesu. Personally I think the last option would be good enough since kdesu should now internally default to sudo and is less effort anyway. Another somewhat more expensive option is to port the software-properties-kde app to the dbus api that already exists to enable polkitting of the UI directly removing the need to elevate the entire binary.
Comment 2 Harald Sitter 2015-08-17 12:33:36 UTC
Oh, this also applies Discover FWIW. Anywhere that QAptAction is used really.
Comment 3 Aleix Pol 2015-08-17 16:20:02 UTC
Git commit 25dfb3006480b17042efcebdb860c9fd89184591 by Aleix Pol.
Committed on 17/08/2015 at 16:17.
Pushed by apol into branch 'Plasma/5.4'.

pkexec wants split arguments

M  +2    -5    libmuonapt/QAptActions.cpp

http://commits.kde.org/muon/25dfb3006480b17042efcebdb860c9fd89184591
Comment 4 Harald Sitter 2015-08-18 08:28:49 UTC
That's not enough unfortunately. This is where the second part of the problem comes in with having to allow_gui as otherwise what happens after providing auth is:
> QXcbConnection: Could not connect to display 
as $DISPLAY is not forwarded.
Comment 5 Aleix Pol 2015-08-19 12:01:40 UTC
I'd say using kdesu framework would be a safe bet. I can work on it after holidays, if nobody beats me to it.
Comment 6 Harald Sitter 2015-08-31 08:12:52 UTC
*** Bug 351867 has been marked as a duplicate of this bug. ***
Comment 7 Aleix Pol 2015-08-31 14:17:22 UTC
Please test: https://git.reviewboard.kde.org/r/125003/
Comment 9 Harald Sitter 2015-09-20 08:04:36 UTC
*** Bug 352929 has been marked as a duplicate of this bug. ***