~ubuntu-branches/ubuntu/trusty/software-center/trusty

« back to all changes in this revision

Viewing changes to softwarecenter/backend/installbackend_impl/packagekitd.py

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2012-12-06 17:30:50 UTC
  • Revision ID: package-import@ubuntu.com-20121206173050-n7mxi5fzlsvtdh9l
Tags: 5.5.2
* lp:~mvo/software-center/fix-pygobject-deprecation-warnings:
  - fix deprecation warninings with the latest python-gi
* lp:~mvo/software-center/minor-logging-fixes:
  - drop some LOG.info() messages to LOG.debug() to spam the user
    less
* lp:~mvo/software-center/trivial-close-ui-tweak:
  - hide the main window immediately when closing down
* lp:~mvo/software-center/5.4-fix-save-person-to-config:
  - This branch ensures that the "username" is saved everytime
    that the ubuntu sso whoami call is done
* lp:~mvo/software-center/use-dpkg-builddeps:
  - use dpkg-checkbuilddeps to find test-dependencies
* lp:~mvo/software-center/update-sc-cmdline-flexibility:
  - update-software-center-agent: 
    + add --target-db-path commandline
  - update-software-center: 
    + add --app-install-desktop-dir and --target-db-path commandline
* lp:~mvo/software-center/raring-pep8:
  - fixes for new pep8

Show diffs side-by-side

added added

removed removed

Lines of Context:
230
230
 
231
231
    def remove(self, app, iconname, addons_install=[],
232
232
                addons_remove=[], metadata=None):
233
 
        self.remove_multiple((app,), (iconname,),
234
 
                addons_install, addons_remove, metadata
235
 
        )
 
233
        self.remove_multiple(
 
234
            (app,), (iconname,), addons_install, addons_remove, metadata)
236
235
 
237
236
    def remove_multiple(self, apps, iconnames,
238
 
                addons_install=[], addons_remove=[], metadatas=None):
 
237
                        addons_install=[], addons_remove=[], metadatas=None):
239
238
 
240
239
        pkgnames = [app.pkgname for app in apps]
241
240
        appnames = [app.appname for app in apps]
248
247
        # temporary hack
249
248
        pkgnames = self._fix_pkgnames(pkgnames)
250
249
 
251
 
        self.client.remove_packages_async(pkgnames,
252
 
                    False,  # allow deps
253
 
                    False,  # autoremove
254
 
                    None,  # cancellable
255
 
                    self._on_progress_changed,
256
 
                    None,  # progress data
257
 
                    self._on_remove_ready,  # callback ready
258
 
                    None  # callback data
 
250
        self.client.remove_packages_async(
 
251
            pkgnames,
 
252
            False,  # allow deps
 
253
            False,  # autoremove
 
254
            None,  # cancellable
 
255
            self._on_progress_changed,
 
256
            None,  # progress data
 
257
            self._on_remove_ready,  # callback ready
 
258
            None  # callback data
259
259
        )
260
260
        self.emit("transaction-started", pkgnames[0], appnames[0], 0,
261
261
            TransactionTypes.REMOVE)
265
265
        if filename is not None:
266
266
            LOG.error("Filename not implemented")  # FIXME
267
267
        else:
268
 
            self.install_multiple((app,), (iconname,),
269
 
                 addons_install, addons_remove, metadata
270
 
            )
 
268
            self.install_multiple(
 
269
                (app,), (iconname,), addons_install, addons_remove, metadata)
271
270
 
272
271
    def install_multiple(self, apps, iconnames,
273
272
        addons_install=[], addons_remove=[], metadatas=None):
289
288
        # PackageKit from installing untrusted packages
290
289
        # (in general, all enabled repos should have GPG signatures,
291
290
        # which is enough for being marked "trusted", but still)
292
 
        self.client.install_packages_async(True,  # only trusted
293
 
                    pkgnames,
294
 
                    None,  # cancellable
295
 
                    self._on_progress_changed,
296
 
                    None,  # progress data
297
 
                    self._on_install_ready,  # GAsyncReadyCallback
298
 
                    None  # ready data
 
291
        self.client.install_packages_async(
 
292
            True,  # only trusted
 
293
            pkgnames,
 
294
            None,  # cancellable
 
295
            self._on_progress_changed,
 
296
            None,  # progress data
 
297
            self._on_install_ready,  # GAsyncReadyCallback
 
298
            None  # ready data
299
299
        )
300
300
        self.emit("transaction-started", pkgnames[0], appnames[0], 0,
301
301
            TransactionTypes.INSTALL)