[Libosinfo] [osinfo-db PATCH 1/4] ubuntu: Improve the volume-id regex
Fabiano Fidêncio
fidencio at redhat.com
Thu Feb 14 10:03:57 UTC 2019
On Thu, Feb 14, 2019 at 10:46 AM Christophe Fergeau <cfergeau at redhat.com>
wrote:
> On Wed, Feb 13, 2019 at 08:19:24PM +0100, Fabiano Fidêncio wrote:
> > The first release of Ubuntu ISOs usually have their volume-id as, for
> > instance:
> > Ubuntu-Server 18.04 LTS amd64
> >
> > Whenever a new release is done, a new digit is added as, for instance:
> > Ubuntu-Server 18.04.1 LTS amd64
> >
> > However, at least with 18.04, they had a new release for the server
> > media that looks like:
> > Ubuntu-Server 18.04.1+ LTS amd64
> >
> > This '+' addition breaks the current used regular expression to match
> > the media's volume-id. In order to take a safer path, let's expand all
> > the regular expressions that have '(.\d)?' to use '(.\d\+?)?' instead,
> > being able then to also match the '+'.
> >
> > The command used to change all the entries is:
> > sed -i -e 's/(.\\d)?/(.\\d\\+?)?/g' ubuntu-*.xml.in
> >
> > Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
> > ---
> > data/os/ubuntu.com/ubuntu-10.04.xml.in | 4 ++--
> > data/os/ubuntu.com/ubuntu-12.04.xml.in | 8 ++++----
> > data/os/ubuntu.com/ubuntu-14.04.xml.in | 8 ++++----
> > data/os/ubuntu.com/ubuntu-14.10.xml.in | 8 ++++----
> > data/os/ubuntu.com/ubuntu-15.04.xml.in | 8 ++++----
> > data/os/ubuntu.com/ubuntu-15.10.xml.in | 8 ++++----
> > data/os/ubuntu.com/ubuntu-16.04.xml.in | 14 ++++++-------
> > data/os/ubuntu.com/ubuntu-16.10.xml.in | 16 +++++++--------
> > data/os/ubuntu.com/ubuntu-17.04.xml.in | 14 ++++++-------
> > data/os/ubuntu.com/ubuntu-17.10.xml.in | 12 +++++------
> > data/os/ubuntu.com/ubuntu-18.04.xml.in | 10 ++++-----
> > data/os/ubuntu.com/ubuntu-18.10.xml.in | 12 +++++------
> > data/os/ubuntu.com/ubuntu-19.04.xml.in | 10 ++++-----
> > data/os/ubuntu.com/ubuntu-6.06.xml.in | 28 +++++++++++++-------------
> > data/os/ubuntu.com/ubuntu-8.04.xml.in | 12 +++++------
> > data/os/ubuntu.com/ubuntu-9.04.xml.in | 8 ++++----
>
> A bunch of the older releases don't look for xx.yy.zz in the volume id,
> but only for xx.yy. Your patch is missing these. It's not clear to me if
> it's intentional that we don't have these matches for these releases, or
> if it's just something that was overlooked.
>
I guess it's been overlooked for a few years :-)
I'll do the changes on those files as well to keep them as the others.
Do you want to see a v2 of this patch?
[snip]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libosinfo/attachments/20190214/6a1a9f86/attachment.htm>
More information about the Libosinfo
mailing list