summaryrefslogtreecommitdiff
path: root/DistUpgrade/DistUpgradeControler.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-08-29 12:08:03 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-08-29 12:08:03 +0200
commit908a5b52764aa2073efa52feb2ee8b9c19c31279 (patch)
treef1677849dfdb5537fc992ca06b9583f2c7f26fba /DistUpgrade/DistUpgradeControler.py
parent9ae9f5c1136d645d7caeae8789f2c3a32e06c6cf (diff)
downloadpython-apt-908a5b52764aa2073efa52feb2ee8b9c19c31279.tar.gz
* move the logging to /var/log/dist-upgrade/{main,apt,term}.log
Diffstat (limited to 'DistUpgrade/DistUpgradeControler.py')
-rw-r--r--DistUpgrade/DistUpgradeControler.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index 3a775099..c01b0f97 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -1,6 +1,6 @@
# DistUpgradeControler.py
#
-# Copyright (c) 2004,2005 Canonical
+# Copyright (c) 2004-2006 Canonical
#
# Author: Michael Vogt <michael.vogt@ubuntu.com>
#
@@ -37,9 +37,20 @@ from gettext import gettext as _
import gettext
from DistUpgradeCache import MyCache
+
+class DistUpgradePolicy(object):
+ """ this is a abstract polciy object that allows to implement different upgrade
+ types (e.g. one for full net upgrades, one for only CDROM upgrades
+ """
+ def __init__(self):
+ pass
+
+
class DistUpgradeControler(object):
+ """ this is the controler that does most of the work """
+
def __init__(self, distUpgradeView):
gettext.bindtextdomain("update-manager",os.path.join(os.getcwd(),"mo"))
gettext.textdomain("update-manager")
@@ -61,7 +72,7 @@ class DistUpgradeControler(object):
# turn on debuging in the cache
apt_pkg.Config.Set("Debug::pkgProblemResolver","true")
- fd = os.open("/var/log/dist-upgrade-apt.log",
+ fd = os.open("/var/log/dist-upgrade/apt.log",
os.O_RDWR|os.O_CREAT|os.O_TRUNC)
os.dup2(fd,1)
os.dup2(fd,2)