I do not think dpkg, yum and libzypp package-version-handling are
compatible. They have their own rules/logic.
IMHO it is best practices to use the pkg-manager version compare logic.
They all provide CLI interface for that reason to allow comparing plain
version strings.


On Wed, Apr 16, 2014 at 3:08 PM, Christoph Kassen
<notifications@github.com>wrote:

> In ponyexpress/api/lib/repositories.py:
>
> > @@ -168,15 +168,7 @@ def get_repositories(self, expression):
> >      def _ver_tuple(self, z):
> >          """Parse debian/ubuntu style version strings and return a tuple containing only numbers"""
> >
> > -        if self.pattern is None:
> > -            self.pattern = re.compile('/(?<=\d)(?=\D)|(?<=\D)(?=\d)/')
> > -
> > -        a = self.pattern.split(z)
> > -
> > -        if a is not None and len(a) > 0:
> > -            return tuple([str(x) for x in a[0] if x.isdigit()])
> > -
> > -        return None
> > +        return re.sub('([0-9]+)', lambda x: x.group().zfill(10), z)
> >
> >      def ver_cmp(self, a, b):
> >          """Compare two version tuples"""
>
> We don't want to add dependencies wich pin us to the Debian/Ubuntu
> platform. Right now this is the only supported platform, but the
> architecture allows other repository types as well. I'm not sure if this is
> ever going to happen, there might be interest for that, especially when
> pony is combined with the cve/cpe handling.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/TelekomCloud/pony-express/pull/35/files#r11682438>
> .
>