summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@redhat.com>2005-09-20 19:15:26 +0000
committerPaul Nasrat <pnasrat@redhat.com>2005-09-20 19:15:26 +0000
commitb3e294735fce11a75f629574cb0c4a03bc9d1c38 (patch)
tree4b0aa4c7b28c28793a9a8e75a0f91cc2d4b1fa1e /yuminstall.py
parent3dcad9c42b31d6c47720c83208fc387abb8c9f57 (diff)
downloadanaconda-b3e294735fce11a75f629574cb0c4a03bc9d1c38.tar.gz
anaconda-b3e294735fce11a75f629574cb0c4a03bc9d1c38.tar.xz
anaconda-b3e294735fce11a75f629574cb0c4a03bc9d1c38.zip
productPath not name...
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/yuminstall.py b/yuminstall.py
index 920ec3648..20e20d687 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -19,6 +19,7 @@ import timer
import rpm
import rpmUtils
import urlgrabber.progress
+import urlgrabber.grabber
import yum
import yum.repos
import yum.packages
@@ -97,10 +98,13 @@ class simpleCallback:
self.instLog.flush()
self.size = hdr[rpm.RPMTAG_SIZE]
- fn = os.path.basename(path)
- fd = os.open('/mnt/source/Fedora/RPMS/' + fn, os.O_RDONLY)
- nvr = '%s-%s-%s' % ( hdr['name'], hdr['version'], hdr['release'] )
- self.fdnos[nvr] = fd
+ fn = '%s/%s/RPMS/%s' % (self.method, productPath, os.path.basename(path))
+ url = urlgrabber.grabber.urlopen(fn)
+ f = open(path, 'w+')
+ f.write(url.read())
+ fd = os.open(path, os.O_RDONLY)
+ nvra = '%s-%s-%s.%s' % ( hdr['name'], hdr['version'], hdr['release'], hdr['arch'] )
+ self.fdnos[nvra] = fd
return fd
elif what == rpm.RPMCALLBACK_INST_PROGRESS:
@@ -112,8 +116,8 @@ class simpleCallback:
elif what == rpm.RPMCALLBACK_INST_CLOSE_FILE:
hdr, path =h
- nvr = '%s-%s-%s' % ( hdr['name'], hdr['version'], hdr['release'] )
- os.close(self.fdnos[nvr])
+ nvra = '%s-%s-%s.%s' % ( hdr['name'], hdr['version'], hdr['release'], hdr['arch'] )
+ os.close(self.fdnos[nvra])
self.progress.completePackage(hdr, self.pkgTimer)
self.progress.processEvents()
@@ -376,7 +380,7 @@ class YumBackend(AnacondaBackend):
id.instProgress.setSizes(len(self.dlpkgs), self.totalSize, self.totalFiles)
id.instProgress.processEvents()
- cb = simpleCallback(intf.messageWindow, id.instProgress, pkgTimer, self.method, intf.progressWindow, self.instLog, self.modeText, self.ayum.ts)
+ cb = simpleCallback(intf.messageWindow, id.instProgress, pkgTimer, self.methodstr, intf.progressWindow, self.instLog, self.modeText, self.ayum.ts)
cb.initWindow = intf.waitWindow(_("Install Starting"),
_("Starting install process. This may take several minutes..."))