summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--image.py3
-rw-r--r--installmethod.py5
-rw-r--r--urlinstall.py2
-rw-r--r--yuminstall.py12
5 files changed, 18 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 76aa09c90..0c7d5b1d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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
+
2007-08-13 Chris Lumens <clumens@redhat.com>
* fsset.py (FileSystemSet.setActive): Don't try to check for bootable
diff --git a/image.py b/image.py
index 789721f1b..8a2620a6f 100644
--- a/image.py
+++ b/image.py
@@ -313,9 +313,6 @@ class CdromInstallMethod(ImageInstallMethod):
self.messageWindow(_("Error"),
_("Unable to access the disc."))
- def unlinkFilename(self, fullName):
- pass
-
def filesDone(self):
# we're trying to unmount the CD here. if it fails, oh well,
# they'll reboot soon enough I guess :)
diff --git a/installmethod.py b/installmethod.py
index 099ee82fe..599a2a0f2 100644
--- a/installmethod.py
+++ b/installmethod.py
@@ -84,11 +84,6 @@ class InstallMethod:
def filesDone(self):
pass
- ## Remove a file if it was fetched from a remote system.
- # @param fullName The full path to the file to be removed.
- def unlinkFilename(self, fullName):
- pass
-
## The constructor.
# @param method The --method= parameter passed to anaconda from loader.
# @param rootpath The --rootpath= parameter passed to anaconda from loader.
diff --git a/urlinstall.py b/urlinstall.py
index ce25da98b..078ec4269 100644
--- a/urlinstall.py
+++ b/urlinstall.py
@@ -179,8 +179,6 @@ class UrlInstallMethod(InstallMethod):
def copyFileToTemp(self, filename):
return self.__copyFileToTemp(self.pkgUrl, filename)
- def unlinkFilename(self, fullName):
- os.remove(fullName)
def setIntf(self, intf):
self.intf = intf
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