Merge lp:~alexhenrie24/gdebi/fix-mime-type into lp:gdebi

Proposed by Alex Henrie
Status: Merged
Merged at revision: 487
Proposed branch: lp:~alexhenrie24/gdebi/fix-mime-type
Merge into: lp:gdebi
Diff against target: 53 lines (+7/-3)
4 files modified
GDebi/GDebiCommon.py (+1/-1)
data/gdebi-kde.desktop.in (+1/-1)
data/gdebi.desktop.in (+1/-1)
debian/changelog (+4/-0)
To merge this branch: bzr merge lp:~alexhenrie24/gdebi/fix-mime-type
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Dimitri John Ledkov Pending
Luca Falavigna Pending
gdebi-developers Pending
Review via email: mp+263322@code.launchpad.net

Description of the change

xdg-open, used by Chromium and other applications, currently opens .deb files with /usr/lib/mime/debian-view instead of GDebi. It ignores GDebi because .deb files are detected as application/vnd.debian.binary-package, but gdebi.desktop only registers the nonstandard MIME types application/x-deb and application/x-debian-package. This is unfortunate because GDebi is far more user-friendly than debian-view.

I can't see a good reason to maintain support for the nonstandard MIME types. I think it would be best to drop them and instead register the MIME type that actually works.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks a bunch! Its fine to remove the old mime-type, we might consider bringing it back if there are apps (like filemanagers) out there that use it to send it to gdebi. But for now I'm in favour of using only the real one. Thanks again!

review: Approve
Revision history for this message
Alex Henrie (alexhenrie24) wrote :

Thank you!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'GDebi/GDebiCommon.py'
--- GDebi/GDebiCommon.py 2014-04-22 07:44:07 +0000
+++ GDebi/GDebiCommon.py 2015-06-30 06:36:33 +0000
@@ -96,7 +96,7 @@
96 logging.debug("open failed with %s" % e)96 logging.debug("open failed with %s" % e)
97 mimetype=guess_type(file)97 mimetype=guess_type(file)
98 if (mimetype[0] != None and98 if (mimetype[0] != None and
99 mimetype[0] != "application/x-debian-package"):99 mimetype[0] != "application/vnd.debian.binary-package"):
100 self.error_header = _("'%s' is not a Debian package") % os.path.basename(file)100 self.error_header = _("'%s' is not a Debian package") % os.path.basename(file)
101 self.error_body = _("The MIME type of this file is '%s' "101 self.error_body = _("The MIME type of this file is '%s' "
102 "and can not be installed on this system.") % mimetype[0]102 "and can not be installed on this system.") % mimetype[0]
103103
=== modified file 'data/gdebi-kde.desktop.in'
--- data/gdebi-kde.desktop.in 2013-08-03 23:06:56 +0000
+++ data/gdebi-kde.desktop.in 2015-06-30 06:36:33 +0000
@@ -7,7 +7,7 @@
7Terminal=false7Terminal=false
8Type=Application8Type=Application
9Categories=Qt;KDE;System;9Categories=Qt;KDE;System;
10MimeType=application/x-deb;application/x-debian-package;10MimeType=application/vnd.debian.binary-package;
11OnlyShowIn=KDE;11OnlyShowIn=KDE;
12InitialPreference=1212InitialPreference=12
13X-Ubuntu-Gettext-Domain=gdebi13X-Ubuntu-Gettext-Domain=gdebi
1414
=== modified file 'data/gdebi.desktop.in'
--- data/gdebi.desktop.in 2013-08-03 23:06:56 +0000
+++ data/gdebi.desktop.in 2015-06-30 06:36:33 +0000
@@ -7,7 +7,7 @@
7Terminal=false7Terminal=false
8Type=Application8Type=Application
9Categories=System;9Categories=System;
10MimeType=application/x-deb;application/x-debian-package;10MimeType=application/vnd.debian.binary-package;
11NotShowIn=KDE;11NotShowIn=KDE;
12X-Ubuntu-Gettext-Domain=gdebi12X-Ubuntu-Gettext-Domain=gdebi
13StartupNotify=true13StartupNotify=true
1414
=== modified file 'debian/changelog'
--- debian/changelog 2014-11-18 11:45:04 +0000
+++ debian/changelog 2015-06-30 06:36:33 +0000
@@ -2,6 +2,10 @@
22
3 * Use vte 2.913 * Use vte 2.91
44
5 [ Alex Henrie ]
6 * Use standard MIME type vnd.debian.binary-package so that xdg-open
7 foo.deb will use gdebi
8
5 -- Iain Lane <iain@orangesquash.org.uk> Tue, 18 Nov 2014 10:54:30 +00009 -- Iain Lane <iain@orangesquash.org.uk> Tue, 18 Nov 2014 10:54:30 +0000
610
7gdebi (0.9.5.5) unstable; urgency=medium11gdebi (0.9.5.5) unstable; urgency=medium

Subscribers

People subscribed via source and target branches

to status/vote changes: