summaryrefslogtreecommitdiffstats
path: root/yum-presto/shared/prestoDownload.py
diff options
context:
space:
mode:
Diffstat (limited to 'yum-presto/shared/prestoDownload.py')
-rw-r--r--yum-presto/shared/prestoDownload.py31
1 files changed, 11 insertions, 20 deletions
diff --git a/yum-presto/shared/prestoDownload.py b/yum-presto/shared/prestoDownload.py
index 30e7514..0b7ff55 100644
--- a/yum-presto/shared/prestoDownload.py
+++ b/yum-presto/shared/prestoDownload.py
@@ -35,7 +35,7 @@ def verifyDelta(fo, po, conduit, raiseError):
fo = fo.filename
try:
- verifyChecksum(fo, po.returnSimple('deltachecksumtype'), po.returnSimple('deltachecksum'))
+ verifyChecksum(fo, po.deltachecksumtype, po.deltachecksum)
except:
if raiseError:
raise URLGrabError(-1, 'Package does not match intended download')
@@ -61,7 +61,7 @@ def verifyChecksum(filename, checksumType, csum):
return 0
def reconstruct(conduit, po, log):
- deltalocal = po.returnSimple('deltalocalpath')
+ deltalocal = po.deltalocalpath
retlist = ""
drpm = deltarpm.DeltaRpmWrapper(conduit)
@@ -119,13 +119,12 @@ def downloadPkgs(conduit, pkglist, log):
remote_pkgs = []
for po in conduit.getDownloadPackages():
if hasattr(po, 'has_drpm') and po.has_drpm:
- po.to.pkgtup = po.to.realpkgtup
- local = po.returnSimple('deltalocalpath')
+ local = po.deltalocalpath
if os.path.exists(local):
cursize = os.stat(local)[6]
- totsize = long(po.returnSimple('deltasize'))
+ totsize = long(po.deltasize)
try:
- verifyChecksum(local, po.returnSimple('deltachecksumtype'), po.returnSimple('deltachecksum'))
+ verifyChecksum(local, po.deltachecksumtype, po.deltachecksum)
except:
if po.repo.p_repo.cache:
repo_cached = True
@@ -152,29 +151,20 @@ def downloadPkgs(conduit, pkglist, log):
adderror(po, 'Insufficient space in download directory %s '
'to download' % po.repo.deltasdir)
continue
- po.simple['reallocalpath'] = po.localpath
- po.localpath = po.returnSimple('deltalocalpath')
- po.simple['realrelativepath'] = po.returnSimple('relativepath')
- po.simple['relativepath'] = po.returnSimple('deltarelativepath')
try:
- text = '(%s/%s): %s' % (i, len(remote_pkgs), os.path.basename(po.returnSimple('deltarelativepath')))
+ text = '(%s/%s): %s' % (i, len(remote_pkgs), os.path.basename(po.deltarelativepath))
deltalocal = po.repo.p_repo.getPackage(po, checkfunc=checkfunc, text=text, cache=cache)
except Errors.RepoError, e:
adderror(po, str(e))
else:
queue.put((conduit, po, log))
- po.simple['deltalocalpath'] = deltalocal
if errors.has_key(po):
del errors[po]
-
- po.simple['relativepath'] = po.returnSimple('realrelativepath')
- po.localpath = po.returnSimple('reallocalpath')
- if po.simple.has_key('realpackagesize'):
- po.simple['packagesize'] = po.returnSimple('realpackagesize')
- del po.simple['realpackagesize']
- del po.simple['realrelativepath']
- del po.simple['reallocalpath']
+
+ if hasattr(po, 'realpackagesize'):
+ po.packagesize = po.realpackagesize
+ del po.realpackagesize
# Check for waiting messages from building thread
lock.acquire()
@@ -187,6 +177,7 @@ def downloadPkgs(conduit, pkglist, log):
# Tell build thread that there are no more drpms and wait for it to exit
curthread.can_exit = True
+ queue.put(None)
curthread.join()
if curthread.messages != "":