Merge lp:~laney/sessioninstaller/gst-1.6-compat into lp:sessioninstaller

Proposed by Iain Lane
Status: Needs review
Proposed branch: lp:~laney/sessioninstaller/gst-1.6-compat
Merge into: lp:sessioninstaller
Diff against target: 39 lines (+13/-5)
1 file modified
sessioninstaller/gstinstaller.py (+13/-5)
To merge this branch: bzr merge lp:~laney/sessioninstaller/gst-1.6-compat
Reviewer Review Type Date Requested Status
Aptdaemon Developers Pending
Review via email: mp+272589@code.launchpad.net

Description of the change

gst 1.6 calls gst with some additional parameters (--interaction --desktop-id --startup-notification-id) which we don't know about and were erroring out on.

They are part of the "Modify2" packagekit API which sessioninstaller doesn't know about (in common with most other implementations it seems) - just ignore them for now, but don't crash.

To post a comment you must log in.

Unmerged revisions

151. By Iain Lane

Don't break with the way new gstramer calls gst-install.

New gstreamer codec install API passes the parameters --interaction
--desktop-id and -startup-notification-id to us. We don 't support them (yet),
and should not error out but should ignore them instead. They are part of a new
PackageKit API.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'sessioninstaller/gstinstaller.py'
--- sessioninstaller/gstinstaller.py 2015-08-09 10:10:34 +0000
+++ sessioninstaller/gstinstaller.py 2015-09-28 12:48:25 +0000
@@ -19,9 +19,9 @@
1919
20__author__ = "Sebastian Heinlein <devel@glatzor.de>"20__author__ = "Sebastian Heinlein <devel@glatzor.de>"
2121
22import argparse
22from gettext import gettext as _23from gettext import gettext as _
23import logging24import logging
24import optparse
25import re25import re
26import sys26import sys
2727
@@ -84,12 +84,20 @@
8484
8585
86def main():86def main():
87 parser = optparse.OptionParser()87 parser = argparse.ArgumentParser()
88 parser.add_option("", "--transient-for", action="store", type="int",88 parser.add_argument("--transient-for", action="store", type=int,
89 dest="xid", default="0",89 dest="xid", default="0",
90 help=_("The X Window ID of the calling application"))90 help=_("The X Window ID of the calling application"))
91 options, args = parser.parse_args()91 parser.add_argument("--interaction", type=str, dest="interaction", default="show-confirm-search",
92 installer = GStreamerInstaller(options.xid, args)92 help=_("Whether to ask the user to confirm installation or not (currently ignored)"))
93 parser.add_argument("--desktop-id", type=str, dest="desktop_id", default=None,
94 help=_("The .desktop file of the calling application (currently ignored)"))
95 parser.add_argument("--startup-notification-id", type=str,
96 dest="startup_notification_id", default=None,
97 help=_("An X11-style startup notification ID"))
98 parser.add_argument("codec", nargs="+", help=_("The codec to install (currently ignored)"))
99 options = parser.parse_args()
100 installer = GStreamerInstaller(options.xid, options.codec)
93 # See the documentation of gstpbutilsinstallplugins for the exit state101 # See the documentation of gstpbutilsinstallplugins for the exit state
94 # definitions. Unluckily the PackageKit session interface doesn't support102 # definitions. Unluckily the PackageKit session interface doesn't support
95 # partial codec installation103 # partial codec installation

Subscribers

People subscribed via source and target branches