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
1=== modified file 'sessioninstaller/gstinstaller.py'
2--- sessioninstaller/gstinstaller.py 2015-08-09 10:10:34 +0000
3+++ sessioninstaller/gstinstaller.py 2015-09-28 12:48:25 +0000
4@@ -19,9 +19,9 @@
5
6 __author__ = "Sebastian Heinlein <devel@glatzor.de>"
7
8+import argparse
9 from gettext import gettext as _
10 import logging
11-import optparse
12 import re
13 import sys
14
15@@ -84,12 +84,20 @@
16
17
18 def main():
19- parser = optparse.OptionParser()
20- parser.add_option("", "--transient-for", action="store", type="int",
21+ parser = argparse.ArgumentParser()
22+ parser.add_argument("--transient-for", action="store", type=int,
23 dest="xid", default="0",
24 help=_("The X Window ID of the calling application"))
25- options, args = parser.parse_args()
26- installer = GStreamerInstaller(options.xid, args)
27+ parser.add_argument("--interaction", type=str, dest="interaction", default="show-confirm-search",
28+ help=_("Whether to ask the user to confirm installation or not (currently ignored)"))
29+ parser.add_argument("--desktop-id", type=str, dest="desktop_id", default=None,
30+ help=_("The .desktop file of the calling application (currently ignored)"))
31+ parser.add_argument("--startup-notification-id", type=str,
32+ dest="startup_notification_id", default=None,
33+ help=_("An X11-style startup notification ID"))
34+ parser.add_argument("codec", nargs="+", help=_("The codec to install (currently ignored)"))
35+ options = parser.parse_args()
36+ installer = GStreamerInstaller(options.xid, options.codec)
37 # See the documentation of gstpbutilsinstallplugins for the exit state
38 # definitions. Unluckily the PackageKit session interface doesn't support
39 # partial codec installation

Subscribers

People subscribed via source and target branches