[Yum-devel] repoquery/yumquery/something
seth vidal
skvidal at phy.duke.edu
Fri Sep 10 06:39:57 UTC 2004
> Nod. Not an issue if the repomd libraries come with a default FC/whatever
> installation but for people downloading separately it is. And yum isn't
> exactly big package...
well yum is in @Base in FC - so that helps some.
> Then we'll need a tool for adding and removing repositories into the .xml
> file - I don't consider xml "end user editable" by any means. Something
> like 'repoconfig --add http://foo.bar.com/some/repo' perhaps. But agreed -
> we don't want to end up parsing yum.conf, up2date's sources, apt's
> sources.list[.d/*] and all from every tool that's supposed to read the
> config, better have it in one place and instead of yet another
> config-file-format use xml for it.
For short config things I've always considered xml user editable but
<shrug>
> > pkg with a zero epoch:
> > name-ver-rel.arch
> > pkg with a non-zero epoch:
> > epoch:name-ver-rel.arch
>
> ...but I think it should be easy to parse from scripts, and conditionals
> like that make life more complicated. I wouldn't mind showing epoch
> always, zero (or absent) or not since absent epoch means zero anyway these
> days. Arch certainly should be present at all times in the output.
def stringToVersion(verstring):
if verstring is None:
return (None, None, None)
i = string.find(verstring, ':')
if i != -1:
epoch = string.atol(verstring[:i])
else:
epoch = '0'
j = string.find(verstring, '-')
if j != -1:
if verstring[i + 1:j] == '':
version = None
else:
version = verstring[i + 1:j]
release = verstring[j + 1:]
else:
if verstring[i + 1:] == '':
version = None
else:
version = verstring[i + 1:]
release = None
return (epoch, version, release)
That parses the above formats w/o a problem, I think.
-sv
More information about the Yum-devel
mailing list