[Yum-devel] Exposing location base
Paul Nasrat
pnasrat at redhat.com
Wed Nov 9 23:22:05 UTC 2005
Hi all,
Following on from my rpmmd list comments, I'd like to ensure we have
base exposed in yum.
Let me know if you think the attached patch will break anything, the
most risky change is:
def _bn(self, qn):
if qn.find('}') == -1: return qn
return qn.split('}')[1]
def _prefixprops(self, elem, prefix):
ret = {}
for key in elem.attrib.keys():
ret[prefix + '_' + self._bn(key)] = elem.attrib[key]
return ret
As I didn't really want location_{http://url/to/base/xml/blah}base as a
field. This will affect namespaced attributes we parse using
_prefixprops, of which I believe location_base was the only one.
I've tested as follows
1) Generate repo without url createrepo -g Fedora/base/comps.xml -x
debug .
2) Test using repoquery
repoquery --repoid development --qf '%{basepath} %{relativepath}' -q
perl-Inline
None Fedora/RPMS/perl-Inline-0.44-15.noarch.rpm
3) Disable sqlite cache - edit repoquery and after repoq.doConfigSetup()
add:
if hasattr(repoq.repos, 'sqlite'):
repoq.repos.sqlite = False
repoq.repos._selectSackType()
repoquery --repoid development --qf '%{basepath} %{relativepath}' -q
perl-Inline
None Fedora/RPMS/perl-Inline-0.44-15.noarch.rpm
4) regenerate cache to have base
createrepo -u media:/rawhide-20051109/#1 -g Fedora/base/comps.xml -x
debug .
5) With sqlite:
repoquery --repoid development --qf '%{basepath} %{relativepath}' -q
perl-Inline
media:/rawhide-20051109/#1 Fedora/RPMS/perl-Inline-0.44-15.noarch.rpm
6) without
repoquery --repoid development --qf '%{basepath} %{relativepath}' -q
perl-Inline
media:/rawhide-20051109/#1 Fedora/RPMS/perl-Inline-0.44-15.noarch.rpm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-location-base.patch
Type: text/x-patch
Size: 4543 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20051109/ba8e4fce/attachment.bin
More information about the Yum-devel
mailing list