Merge lp://staging/~cr3/checkbox/940627 into lp://staging/checkbox

Proposed by Marc Tardif
Status: Merged
Merged at revision: 1303
Proposed branch: lp://staging/~cr3/checkbox/940627
Merge into: lp://staging/checkbox
Diff against target: 82 lines (+5/-16)
6 files modified
debian/changelog (+1/-0)
debian/checkbox-gtk.install (+0/-1)
gtk/checkbox-gtk.desktop.in (+0/-11)
plugins/backend_info.py (+2/-2)
po/POTFILES.in (+1/-1)
setup.cfg (+1/-1)
To merge this branch: bzr merge lp://staging/~cr3/checkbox/940627
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Marc Tardif (community) Needs Resubmitting
Review via email: mp+94622@code.staging.launchpad.net

Description of the change

When reviewing, please make sure that the changes to plugins/backend_info.py are sane. Thanks!

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Thanks for pointing out the dubious section!

Without the pointer to the desktop file, bug 776712 will resurface. So in any case they should point to the checkbox-qt file:

prefix = ["kdesudo", "--desktop", "/usr/share/applications/checkbox-qt.desktop", "--"]
prefix = ["gksu", "--description", "/usr/share/applications/checkbox-qt.desktop", "--"]

Check this merge request for a brief discussion on this topic:

https://code.launchpad.net/~carl-milette/checkbox/776712/+merge/62193

Revision history for this message
Marc Tardif (cr3) wrote :

But the checkbox-qt.desktop file will not exist in the case where only checkbox-gtk is installed. We could either check for the existence of the file and only pass it as argument when it is available. Or, we could always pass the checkbox-qt.desktop file as argument which seems to work with gksu and kdesudo if the file doesn't exist. Which would you prefer?

review: Needs Information
Revision history for this message
Daniel Manrique (roadmr) wrote :

Urgh :(

I see two solutions:

1- Add some logic to look for either checkbox-qt.desktop or checkbox-gtk.desktop and use the first one available.

2- Move to a single checkbox.desktop file. This would mean that checkbox-qt and checkbox-gtk would be mutually exclusive so this solution potentially sucks :(

3- make checkbox.desktop a symlink to the correct one, and have each package update the symlink to its .desktop file upon installation (does update-alternatives apply to .desktop files?)

OK, three solutions :)

Which one sounds easier to implement and more future-proof? (i'd say #1).

review: Needs Information
Revision history for this message
Marc Tardif (cr3) wrote :

Of the three solutions you propose, I would also lean towards the first one. However, the only problem is that the checkbox-gtk.desktop file will never exist. The point of this merge request is to prevent the confusion of potentially having two Desktop testing applications after upgrading from Oneiric to Precise. Since we agreed that checkbox-gtk should be upgraded rather than deprecated with a transitional package, we need to workaround the confusion caused by the two desktop files.

Since checkbox-gtk and checkbox-qt should be able to coexist, this also poses a problem for your second solution.

As for your third solution, my brain hurts just trying to think about it :(

Revision history for this message
Marc Tardif (cr3) wrote :

How about we revert this discussion to the suggestion you made ealier about always using the checkbox-qt.desktop file? In the most likely cases, this file will exist:

1. When installing Precise, only checkbox-qt will exist so the checkbox-qt.desktop file will be present.
2. When upgrading from Oneiric to Precise, or from Lucid to Precise for that matter, checkbox-qt will also exist so the checkbox-qt.desktop file will also be present. Even if running checkbox-gtk will effectively use the checkbox-qt.desktop file, that shouldn't make a difference.

The only corner case where bug 776712 would resurface is when someone explicitly installs checkbox-gtk and uninstalls checkbox-qt, implying also uninstalling ubuntu-desktop. I'd be comfortable with that.

Revision history for this message
Daniel Manrique (roadmr) wrote :

I think always using checkbox-qt is a reasonable behavior. In addition to what you mention in the last comment, I also checked the behavior for gksu, and if the --description points to a nonexistent file, it simply quotes that name.

So if checkbox-qt.desktop exists, it nicely says "The application named 'System Testing' wants privileges". If it doesn't exist, it says "The application named '/usr/share/applications/checkbox-qt.desktop' wants privileges".

This is potentially not entirely confusing to someone who, as you mention, removed checkbox-qt and ubuntu-desktop by hand.

So my suggestion, sneakily based mostly on *your* arguments, is to just default to checkbox-qt.desktop.

As per our new and fancy review process, since this implies some agreed-upon code changes, I'll set to "Needs Fixing".

review: Needs Fixing
Revision history for this message
Marc Tardif (cr3) wrote :

Ok, defaulting to checkbox-qt.desktop.

review: Needs Resubmitting
lp://staging/~cr3/checkbox/940627 updated
1282. By Marc Tardif

Merged from trunk.

1283. By Marc Tardif

Reverted to just using /usr/share/applications/checkbox-qt.desktop when calling kdesudo or gksu.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Awesome, thanks!

Merging.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches