~gandelman-a/software-properties/lp829109

« back to all changes in this revision

Viewing changes to UpdateManager/DistUpgradeFetcher.py

  • Committer: glatzor at ubuntu
  • Date: 2006-08-02 16:37:59 UTC
  • mfrom: (337.2.3 main)
  • Revision ID: glatzor@ubuntu.com-20060802163759-8b0cf671227833b3
* merge with main

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
        return True
106
106
 
107
107
    def gpgauthenticate(self, file, signature,
108
 
                        keyring='/etc/apt/trusted.gpg',
109
 
                        trustdb='/etc/apt/trustdb.gpg'):
 
108
                        keyring='/etc/apt/trusted.gpg'):
110
109
        """ authenticated a file against a given signature, if no keyring
111
110
            is given use the apt default keyring
112
111
        """
113
112
        gpg = GnuPGInterface.GnuPG()
114
113
        gpg.options.extra_args = ['--no-options',
115
114
                                  '--no-default-keyring',
116
 
                                  '--trustdb-name',trustdb,
117
115
                                  '--keyring', keyring]
118
116
        proc = gpg.run(['--verify', signature, file],
119
117
                       create_fhs=['status','logger','stderr'])
190
188
 
191
189
    def runDistUpgrader(self):
192
190
        #print "runing: %s" % script
193
 
        os.execv(self.script,[])
 
191
        if os.getuid() != 0:
 
192
            os.execv("/usr/bin/gksu",["gksu",self.script])
 
193
        else:
 
194
            os.execv(self.script,[self.script])
194
195
 
195
196
    def cleanup(self):
196
197
      # cleanup