The following is true for Intrepid release (and earlier), Kubuntu (KDE),
default install

TEST CASE:
A)
 1. install Kubuntu Intrepid (full release) - default install
 2. if apt updates and generates an authentication failure, a hook is generated 
and placed in /var/lib/update-notifier/user.d/
 3. update-notifier-kde detects the hook but it does nothing with it as the 
command line in 'apt-auth-failure.note' is as follows:
     'gksu -- synaptic --non-interactive --update-at-startup --hide-main-window'
     The default install of Kubuntu has neither gksu nor synaptic (they have 
kdesudo and install-package as equivalents).
B)
 1. install Kubuntu Intrepid (full release) and install gksu along with synaptic
 2. if apt updates and generates an authentication failure, a hook is generated 
and placed in /var/lib/update-notifier/user.d/
 3. update-notifier-kde detects the hook and it runs successfully, however the 
user experience is now inconsistent (we should
     be using the Kubuntu native applications). 

ANALYSIS

Under the existing apt, the package hook for apt failures will only run
if a) gksu is installed and b) synaptic is installed. In the test cases
above, we find two issues: 1) a default install does not work as
expected due to the fact the user is never notified that apt had an auth
failure and 2) in order to make it work, we have to install two non-
native packages.

We could simply add gksu and synaptic to the Kubuntu seed, however, this
presents a problem for Kubuntu, which aims to provide Qt/KDE application
equivalents to their Ubuntu Gtk+/Gnome counterparts. A more elegant
solution would be to have a simple wrapper script detect the desktop
session running and whether the associated su and package manager is
installed and execute the apt updater based on the results. This wraper
would then be called from the 'apt-auth-failure.note' hook.

WORKAROUND:

I have written a wrapper script which accomplishes the 'elegant'
solution meantioned above. Installing this wrapper script and modifying
the 'apt-auth-failure.note' Command entry to point to the wrapper allows
a number of possible combinations to work, thus providing the user with
the expected results.

1) It detects which desktop session is running (kde, gnome, etc) and sets the 
preferred applications based on this
2) It detects which of the preferred applications are installed
3) It runs the apt update via the results of 1) and 2) above or prints an error 
indicating no suitable combination exists to exec the hook

The patch for this solution is included in this bug report.

The patch allows for any combination of gksu, kdesudo and any
combination of synaptic, install-package to provide a successful result.
The script is also written in such a way as to allow other applications
(gksudo, kdesu, adept, etc) to be inserted fairly easily (comments
indicate where to do this).

-- 
Refreshing package lists in KDE should prefer Adept over Synaptic
https://bugs.launchpad.net/bugs/288653
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to