1
from __future__ import absolute_import
6
from .DistUpgradeFetcherCore import DistUpgradeFetcherCore
8
class DistUpgradeFetcherSelf(DistUpgradeFetcherCore):
9
def __init__(self, new_dist, progress, options, view):
10
DistUpgradeFetcherCore.__init__(self,new_dist,progress)
12
# user chose to use the network, otherwise it would not be
13
# possible to download self
14
self.run_options += ["--with-network"]
15
# make sure to run self with proper options
16
if options.cdromPath is not None:
17
self.run_options += ["--cdrom=%s" % options.cdromPath]
18
if options.frontend is not None:
19
self.run_options += ["--frontend=%s" % options.frontend]
21
def error(self, summary, message):
22
return self.view.error(summary, message)
24
def runDistUpgrader(self):
25
" overwrite to ensure that the log is copied "
26
# copy log so it isn't overwritten
27
logging.info("runDistUpgrader() called, re-exec self")
29
shutil.copy("/var/log/dist-upgrade/main.log",
30
"/var/log/dist-upgrade/main_update_self.log")
32
DistUpgradeFetcherCore.runDistUpgrader(self)