[Yum-devel] repoquery/yumquery/something
Panu Matilainen
pmatilai at welho.com
Fri Sep 10 09:47:32 UTC 2004
On Fri, 10 Sep 2004, seth vidal wrote:
> > 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>
Depends a lot on the xml file .. for some very simple and short things ok.
Anyway seems we agree that a common-for-all-clients xml config for the
repositories would be a good thing.
> > > 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.
I'm not worried about parsing it in python but from things like
shell-scripts, sed/awk/perl stuff and such.
- Panu -
More information about the Yum-devel
mailing list