diff options
author | Jeremy Katz <katzj@redhat.com> | 2007-08-13 19:28:40 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2007-08-13 19:28:40 +0000 |
commit | 0b52379fa65dbf91b2dde37088b1e9e821ff1cd0 (patch) | |
tree | 624cafaede4b375553364d9441d19c0a6f6771ca /yuminstall.py | |
parent | a6269c166079750ad74ce932909a7fffc7684130 (diff) | |
download | anaconda-0b52379fa65dbf91b2dde37088b1e9e821ff1cd0.tar.gz anaconda-0b52379fa65dbf91b2dde37088b1e9e821ff1cd0.tar.xz anaconda-0b52379fa65dbf91b2dde37088b1e9e821ff1cd0.zip |
2007-08-13 Jeremy Katz <katzj@redhat.com>
* yuminstall.py (AnacondaCallback): Remove without using the
installmethod's unlinkFilename
* image.py (unlinkFilename): Remove method
* installmethod.py (unlinkFilename): Remove
* urlinstall.py (unlinkFilename): Remove
Diffstat (limited to 'yuminstall.py')
-rw-r--r-- | yuminstall.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/yuminstall.py b/yuminstall.py index 17299a1bd..87d009afe 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -31,7 +31,6 @@ import rhpl from yum.constants import * from yum.Errors import RepoError, YumBaseError, PackageSackError from yum.yumRepo import YumRepository -from installmethod import FileCopyException from backend import AnacondaBackend from product import productName, productStamp from sortedtransaction import SplitMediaTransactionData @@ -92,6 +91,7 @@ class AnacondaCallback: self.modeText = modeText self.openfile = None + self.inProgressPo = None def setSizes(self, numpkgs, totalSize, totalFiles): self.numpkgs = numpkgs @@ -166,6 +166,7 @@ class AnacondaCallback: self.ayum._handleFailure(po) repo.nomoremirrors = False continue + self.inProgressPo = po return self.openfile.fileno() @@ -175,7 +176,14 @@ class AnacondaCallback: fn = self.openfile.name self.openfile.close() self.openfile = None - self.method.unlinkFilename(fn) + + repo = self.repos.getRepo(self.inProgressPo.repoid) + if len(filter(lambda u: u.startswith("file:"), repo.baseurl)) == 0: + try: + os.remove(fn) + except OSError, e: + log.debug("unable to remove file %s" %(e,)) + self.inProgressPo = None self.donepkgs += 1 self.doneSize += hdr['size']/1024.0 |