summaryrefslogtreecommitdiff
path: root/DistUpgrade
diff options
context:
space:
mode:
Diffstat (limited to 'DistUpgrade')
-rw-r--r--DistUpgrade/DistUpgrade.cfg4
-rw-r--r--DistUpgrade/DistUpgradeControler.py14
-rw-r--r--DistUpgrade/DistUpgradeViewNonInteractive.py3
3 files changed, 14 insertions, 7 deletions
diff --git a/DistUpgrade/DistUpgrade.cfg b/DistUpgrade/DistUpgrade.cfg
new file mode 100644
index 00000000..979d7c0c
--- /dev/null
+++ b/DistUpgrade/DistUpgrade.cfg
@@ -0,0 +1,4 @@
+[Distro]
+From=breezy
+To=Dapper
+ValidOrigin=Ubuntu
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index ca43e80c..1ba0f7e0 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -28,8 +28,8 @@ import subprocess
import logging
import re
import statvfs
+import ConfigParser
-from UpdateManager.Common.SimpleGladeApp import SimpleGladeApp
from SoftwareProperties.aptsources import SourcesList, SourceEntry
from gettext import gettext as _
from DistUpgradeCache import MyCache
@@ -42,13 +42,13 @@ class DistUpgradeControler(object):
self._view.updateStatus(_("Reading cache"))
self.cache = None
+ self.config = ConfigParser.ConfigParser()
+ self.config.read(['DistUpgrade.cfg'])
+
# some constants here
- #self.fromDist = "hoary"
- #self.toDist = "breezy"
- self.fromDist = "breezy"
- self.toDist = "dapper"
-
- self.origin = "Ubuntu"
+ self.fromDist = self.config.get("Distro","From")
+ self.toDist = self.config.get("Distro","To")
+ self.origin = self.config.get("Distro","ValidOrigin")
# forced obsoletes
self.forced_obsoletes = []
diff --git a/DistUpgrade/DistUpgradeViewNonInteractive.py b/DistUpgrade/DistUpgradeViewNonInteractive.py
index f77d3d43..e8236565 100644
--- a/DistUpgrade/DistUpgradeViewNonInteractive.py
+++ b/DistUpgrade/DistUpgradeViewNonInteractive.py
@@ -19,6 +19,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
+import apt
+import logging
+
class NonInteractiveDistUpgradeView(object):
" non-interactive version of the upgrade view "
def __init__(self):