summaryrefslogtreecommitdiff
path: root/UpdateManager/DistUpgradeFetcher.py
diff options
context:
space:
mode:
Diffstat (limited to 'UpdateManager/DistUpgradeFetcher.py')
-rw-r--r--UpdateManager/DistUpgradeFetcher.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py
index aa51066a..af07cfb4 100644
--- a/UpdateManager/DistUpgradeFetcher.py
+++ b/UpdateManager/DistUpgradeFetcher.py
@@ -105,15 +105,13 @@ class DistUpgradeFetcher(object):
return True
def gpgauthenticate(self, file, signature,
- keyring='/etc/apt/trusted.gpg',
- trustdb='/etc/apt/trustdb.gpg'):
+ keyring='/etc/apt/trusted.gpg'):
""" authenticated a file against a given signature, if no keyring
is given use the apt default keyring
"""
gpg = GnuPGInterface.GnuPG()
gpg.options.extra_args = ['--no-options',
'--no-default-keyring',
- '--trustdb-name',trustdb,
'--keyring', keyring]
proc = gpg.run(['--verify', signature, file],
create_fhs=['status','logger','stderr'])
@@ -190,7 +188,10 @@ class DistUpgradeFetcher(object):
def runDistUpgrader(self):
#print "runing: %s" % script
- os.execv(self.script,[])
+ if os.getuid() != 0:
+ os.execv("/usr/bin/gksu",["gksu",self.script])
+ else:
+ os.execv(self.script,[self.script])
def cleanup(self):
# cleanup