diff options
| author | Sebastian Heinlein <sebi@sebi-pc> | 2006-09-29 17:59:09 +0200 |
|---|---|---|
| committer | Sebastian Heinlein <sebi@sebi-pc> | 2006-09-29 17:59:09 +0200 |
| commit | 7afafc629b7c5b408972aafc46ef5d1887544aac (patch) | |
| tree | 05d20b738ad00a5952a60c95732b3f883731461d /DistUpgrade/DistUpgradeControler.py | |
| parent | 90a9b9f0faf09a401693f7cfcbd362ff62559929 (diff) | |
| parent | 44bb7423ea89e0174fd33108bc1112677283114e (diff) | |
| download | python-apt-7afafc629b7c5b408972aafc46ef5d1887544aac.tar.gz | |
* merge with mvo
Diffstat (limited to 'DistUpgrade/DistUpgradeControler.py')
| -rw-r--r-- | DistUpgrade/DistUpgradeControler.py | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index e32c0c5f..7b255cf0 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -165,6 +165,7 @@ class DistUpgradeControler(object): # enable main (we always need this!) distro = Distribution() distro.get_sources(self.sources) + # make sure that main is enabled distro.enable_component(self.sources, "main") # this must map, i.e. second in "from" must be the second in "to" @@ -501,7 +502,7 @@ class DistUpgradeControler(object): "support for the following software " "packages. You can still get support " "from the community.\n\n" - "If you havn't enabled community " + "If you have not enabled community " "maintained software (universe), " "these packages will be suggested for " "removal in the next step."), @@ -551,9 +552,9 @@ class DistUpgradeControler(object): def abort(self): """ abort the upgrade, cleanup (as much as possible) """ - if hasattr(self, sources): + if hasattr(self, "sources"): self.sources.restoreBackup(self.sources_backup_ext) - if hasattr(self, aptcdrom): + if hasattr(self, "aptcdrom"): self.aptcdrom.restoreBackup(self.sources_backup_ext) # generate a new cache self._view.updateStatus(_("Restoring original system state")) @@ -622,14 +623,14 @@ class DistUpgradeControler(object): os.unlink(apt_pkg.Config.FindDir("Dir::Etc::sourceparts")+"/backport-source.list") apt_pkg.Config.Set("Dir::Cache::archives",cachedir) os.chdir(cwd) - return self.setupRequiredBackports(backportsdir) - - def setupRequiredBackports(self, backportsdir): - " setup the required backports in a evil way " # unpack it for deb in glob.glob(backportsdir+"/*.deb"): ret = os.system("dpkg-deb -x %s %s" % (deb, backportsdir)) # FIXME: do error checking + return self.setupRequiredBackports(backportsdir) + + def setupRequiredBackports(self, backportsdir): + " setup the required backports in a evil way " # setup some pathes to make sure the new stuff is used os.environ["LD_LIBRARY_PATH"] = backportsdir+"/usr/lib" os.environ["PYTHONPATH"] = backportsdir+"/usr/lib/python2.4/site-packages/" @@ -653,9 +654,11 @@ class DistUpgradeControler(object): if not self.prepare(): self.abort(1) - if self.options and self.options.haveBackports == False: - # get backported packages (if needed) - self.getRequiredBackports() + # mvo: commented out for now, see #54234, this needs to be + # refactored to use a arch=any tarball + #if self.options and self.options.haveBackports == False: + # # get backported packages (if needed) + # self.getRequiredBackports() # run a "apt-get update" now if not self.doUpdate(): |
