~ubuntu-branches/ubuntu/raring/software-center/raring-proposed

« back to all changes in this revision

Viewing changes to softwarecenter/backend/installbackend_impl/aptd.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:
26
26
from subprocess import (
27
27
    Popen,
28
28
    PIPE,
29
 
    )
30
 
 
31
 
from gi.repository import GObject
32
 
 
33
 
from softwarecenter.utils import (sources_filename_from_ppa_entry,
34
 
                                  release_filename_in_lists_from_deb_line,
35
 
                                  obfuscate_private_ppa_details,
36
 
                                  utf8,
37
 
                                  )
 
29
)
 
30
 
 
31
from gi.repository import GObject, GLib
 
32
 
 
33
from softwarecenter.utils import (
 
34
    sources_filename_from_ppa_entry,
 
35
    release_filename_in_lists_from_deb_line,
 
36
    obfuscate_private_ppa_details,
 
37
    utf8,
 
38
)
38
39
from softwarecenter.enums import (
39
40
    TransactionTypes,
40
41
    PURCHASE_TRANSACTION_ID,
41
 
    )
 
42
)
42
43
from softwarecenter.paths import APPORT_RECOVERABLE_ERROR
43
44
 
44
45
from aptdaemon import client
54
55
    BaseTransactionsWatcher,
55
56
    BaseTransaction,
56
57
    TransactionFinishedResult,
57
 
    TransactionProgress)
 
58
    TransactionProgress,
 
59
)
58
60
from softwarecenter.backend.installbackend import InstallBackend
59
61
 
60
62
from gettext import gettext as _
744
746
            trans.meta_data["sc_add_repo_and_install_try"] = str(retry + 1)
745
747
            sourcepart = trans.meta_data[
746
748
                "sc_add_repo_and_install_sources_list"]
747
 
            GObject.timeout_add_seconds(30, self._reload_for_commercial_repo,
 
749
            GLib.timeout_add_seconds(30, self._reload_for_commercial_repo,
748
750
                                     app, trans.meta_data, sourcepart)
749
751
 
750
752
    # internal helpers
752
754
        # cleanup progress signal (to be sure to not leave dbus
753
755
        # matchers around)
754
756
        if self._progress_signal:
755
 
            GObject.source_remove(self._progress_signal)
 
757
            GLib.source_remove(self._progress_signal)
756
758
            self._progress_signal = None
757
759
        # attach progress-changed signal for current transaction
758
760
        if current:
823
825
        cleaned_error_details = obfuscate_private_ppa_details(
824
826
            trans.error_details)
825
827
        msg = utf8("%s: %s\n%s\n\n%s") % (
826
 
              utf8(_("Error")),
827
 
              utf8(enums.get_error_string_from_enum(trans.error_code)),
828
 
              utf8(enums.get_error_description_from_enum(trans.error_code)),
829
 
              utf8(cleaned_error_details))
 
828
            utf8(_("Error")),
 
829
            utf8(enums.get_error_string_from_enum(trans.error_code)),
 
830
            utf8(enums.get_error_description_from_enum(trans.error_code)),
 
831
            utf8(cleaned_error_details))
830
832
        self._logger.error("error in _on_trans_finished '%s'" % msg)
831
833
        # show dialog to the user and exit (no need to reopen the cache)
832
834
        if not trans.error_code: