summaryrefslogtreecommitdiff
path: root/DistUpgrade
diff options
context:
space:
mode:
authorMichael Vogt <egon@top>2005-12-05 17:45:43 +0100
committerMichael Vogt <egon@top>2005-12-05 17:45:43 +0100
commit09de14c897996d9ff3e75012338fab1d667eac94 (patch)
tree269bfe221091dd556c65d9a343ff380a5eed015f /DistUpgrade
parent4d9205d1b927d5a9cbe12b5476d8ddb0d3389b15 (diff)
downloadpython-apt-09de14c897996d9ff3e75012338fab1d667eac94.tar.gz
* do update implemented
Diffstat (limited to 'DistUpgrade')
-rw-r--r--DistUpgrade/DistUpgrade.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/DistUpgrade/DistUpgrade.py b/DistUpgrade/DistUpgrade.py
index 26ae8ae0..b86a9e3b 100644
--- a/DistUpgrade/DistUpgrade.py
+++ b/DistUpgrade/DistUpgrade.py
@@ -26,6 +26,12 @@ class DistUpgradeView(object):
def getOpCacheProgress(self):
" return a OpProgress() subclass for the given graphic"
return apt.progress.OpProgress()
+ def getFetchProgress(self):
+ " return a fetch progress object "
+ return apt.progress.FetchProgress()
+ def getInstallProgress(self):
+ " return a install progress object "
+ return apt.progress.InstallProgress()
def updateStatus(self, msg):
""" update the current status of the distUpgrade based
on the current view
@@ -163,6 +169,10 @@ class DistUpgradeControler(object):
def doPreUpgrade(self):
pass
+ def doUpdate(self):
+ progress = self._view.getFetchProgress()
+ self._cache.update(progress)
+
def doDistUpgrade(self):
self._view.askYesNoQuestion(_("Do the upgrade"),
_("lala lala"))
@@ -177,9 +187,8 @@ class DistUpgradeControler(object):
self._view.updateStatus(_("Updating repository information"))
if not self.updateSourcesList(fromDist="hoary",to="breezy"):
sys.exit(1)
-
# then update the package index files
-
+ self.doUpdate()
# then open the cache (again)
self._view.updateStatus(_("Reading cache"))
@@ -189,13 +198,14 @@ class DistUpgradeControler(object):
self.doPreUpgrade()
# calc the dist-upgrade and see if the removals are ok/expected
+ # do the dist-upgrade
self.doDistUpgrade()
- # do the dist-upgrade
# do post-upgrade stuff
# done, ask for reboot
+
def run(self):
self.breezyUpgrade()