~dylanmccall/ubuntu/lucid/gdebi/bug-591470

« back to all changes in this revision

Viewing changes to GDebi/GDebi.py

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Franco, debian/control
  • Date: 2006-08-22 15:52:22 UTC
  • Revision ID: james.westby@ubuntu.com-20060822155222-ogz4nhf9wmkhhnnr
Tags: 0.1.6
* New Python Policy release. (Closes: #380810)
  - Bump up Standards-Version to 3.7.2
  - Move debhelper and python-all-dev to Build-Depends field
  - Add python-support to Build-Depends-Indep field
    [debian/control]
  - debian/rules: Add dh_pysupport call before dh_python
  - Add debian/pycompat and debian/pyversions
* Merge 0.1.6ubuntu1 changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
 
70
70
        self.cprogress = self.CacheProgressAdapter(self.progressbar_cache)
71
71
        self._cache = MyCache(self.cprogress)
 
72
        if self._cache._depcache.BrokenCount > 0:
 
73
                err_header = _("Broken dependencies")
 
74
                err_body = _("Your system has broken dependencies. "
 
75
                             "This application can not continue until "
 
76
                             "this is fixed. "
 
77
                             "To fix it run 'sudo synaptic' or "
 
78
                             "'sudo apt-get install -f' "
 
79
                             "in a terminal window.")
 
80
                self.show_alert(gtk.MESSAGE_ERROR, err_header, err_body)
 
81
                sys.exit(1)
72
82
        self.statusbar_main.push(self.context, "")
73
83
        self._options = options
74
84
        
181
191
                                               gtk.TEXT_SEARCH_TEXT_ONLY,
182
192
                                               None)
183
193
            buf.apply_tag(tag , iter, end)
184
 
        except:
 
194
        except KeyError:
185
195
            buf.set_text("No description is available")
186
196
 
187
197
        # set various status bits
349
359
                return
350
360
 
351
361
        if os.getuid() != 0:
352
 
            self.dialog_admin.set_transient_for(self.window_main)
353
 
            res = self.dialog_admin.run()
354
 
            self.dialog_admin.hide()
355
 
            if res == gtk.RESPONSE_OK:
356
 
                os.execl("/usr/bin/gksu", "gksu", "--desktop",
357
 
                         "/usr/share/applications/gdebi.desktop",
358
 
                         "--", "gdebi-gtk", "--non-interactive",
359
 
                         self._deb.file)
 
362
            os.execl("/usr/bin/gksu", "gksu", "--desktop",
 
363
                     "/usr/share/applications/gdebi.desktop",
 
364
                     "--", "gdebi-gtk", "--non-interactive",
 
365
                     self._deb.file)
360
366
            return
361
367
 
362
368
        # check if we can lock the apt database
439
445
        # show the button
440
446
        self.button_deb_install_close.set_sensitive(True)
441
447
        self.button_deb_install_close.grab_default()
 
448
        self.label_action.set_markup("<b><big>"+_("Installation finished")+"</big></b>")
442
449
        if dprogress.exitstatus == 0:
443
450
            self.label_install_status.set_markup("<i>"+_("Package '%s' was installed") % os.path.basename(self._deb.file)+"</i>")
444
451
        else: