[Yum-devel] [PATCH 2/5] Integrate presto support to yum
James Antill
james.antill at redhat.com
Wed Feb 27 18:24:17 UTC 2013
On Thu, 2013-02-21 at 12:57 +0100, Zdenek Pavlas wrote:
> Add the "presto" bool config option, document it.
> Add hooks to downloadPkgs().
Just found this by rel-eng running pungi in rawhide ...
[...]
> diff --git a/yum/presto.py b/yum/presto.py
> new file mode 100644
> index 0000000..08462f5
> --- /dev/null
> +++ b/yum/presto.py
[...]
> + have = ayum._up.installdict.get(new[:2], [])
This causes a traceback due to _up being None at this point, is there a
reason not to use .up. ? ... I guess we can check if _up is None and
just leave, but curious why you used the internal version (or just do
rpmdb lookups).
On the other hand it'd be nice to split this out somehow so we can give
it "lists of rpm files" instead of just the installed rpms.
> + for el in el.findall('delta'):
> + size = int(el.find('size').text)
> + old = el.get('oldepoch'), el.get('oldversion'), el.get('oldrelease')
> + if size >= best or old not in have:
> + continue
> + # the old version is installed, seq check should never fail. kill this?
> + seq = el.find('sequence').text
> + if subprocess.call(['/usr/bin/applydeltarpm', '-C', '-s', seq]) != 0:
> + self.verbose_logger.warn(_('Deltarpm sequence check failed for %s'), seq)
> + continue
> +
> + best = size
> + csum = el.find('checksum')
> + csum = csum.get('type'), csum.text
> + self.deltas[po] = size, el.find('filename').text, csum
> + if po not in self.deltas:
> + self.verbose_logger.warn(_('No suitable drpm files for %s'), po)
> + el.clear()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20130227/d615de23/attachment.asc>
More information about the Yum-devel
mailing list