[Libosinfo] [PATCH 1/2] opensuse: Recognize future versions
Lasse Schuirmann
lasse.schuirmann at gmail.com
Mon Aug 11 16:24:47 UTC 2014
2014-08-11 16:07 GMT+02:00 Zeeshan Ali (Khattak) <zeeshanak at gnome.org>:
> On Sun, Aug 10, 2014 at 3:55 PM, Lasse Schuirmann
> <lasse.schuirmann at gmail.com> wrote:
>> ---
>> data/oses/opensuse.xml.in | 50 +++++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 50 insertions(+)
>>
>> diff --git a/data/oses/opensuse.xml.in b/data/oses/opensuse.xml.in
>> index c368d10..d424b5c 100644
>> --- a/data/oses/opensuse.xml.in
>> +++ b/data/oses/opensuse.xml.in
>> @@ -418,4 +418,54 @@
>> </resources>
>> </os>
>>
>> + <!-- Generic entry for future openSUSE releases. Please update the
>> + 'upgrades', 'derives-from', 'volume-id' and 'resources' nodes
>> + accordingly each time you add a new (specific) entry for a new
>> + release. -->
>> + <os id="http://opensuse.org/opensuse/unknown">
>> + <short-id>opensuse-unknown</short-id>
>> + <_name>openSUSE</_name>
>> + <version>unknown</version>
>> + <_vendor>openSUSE</_vendor>
>> + <family>linux</family>
>> + <distro>opensuse</distro>
>> + <upgrades id="http://opensuse.org/opensuse/13.1" />
>> + <derives-from id="http://opensuse.org/opensuse/13.1" />
>> + <release-status>prerelease</release-status>
>> +
>> + <media arch="i686">
>> + <iso>
>> + <volume-id>openSUSE-1([4-9]..|3.[2-9])-DVD</volume-id>
>> + <system-id>LINUX</system-id>
>> + <publisher-id>SUSE LINUX GmbH</publisher-id>
>> + </iso>
>> + <kernel>boot/i386/loader/linux</kernel>
>> + <initrd>boot/i386/loader/initrd</initrd>
>> + </media>
>> + <media arch="x86_64">
>> + <iso>
>> + <volume-id>openSUSE-1([4-9]..|3.[2-9])-DVD-x86_64</volume-id>
>
> Regex seems weird. Isn't it assuming that:
>
> * 1[4-9] versions' minor version will be only 1 character and it can
> be any character?
I could write 1[4-9].[0-9]+ if it suits you better. I dont see any
behavioural differences though.
> * 13 versions' is also assumed to be only 1 character but in this case
> its been restricted to numerics only?
You need this restriction here to not match any previous (13.[0-1]) versions.
Does
1([4-9]\.[0-9]+|3\.([2-9][0-9]*|1[0-9]+))
suit you better? Its certainly more exact but not so easy to
understand IMHO and you probably need more time to adjust it whenever
you introduce a new version explicitly.
Lasse
More information about the Libosinfo
mailing list