mknetrel: accept package names with dashes

Jan Nieuwenhuizen janneke@gnu.org
Tue Jul 23 23:01:00 GMT 2002


Christopher Faylor <cgf@redhat.com> writes:

> On Mon, Jul 22, 2002 at 07:24:00PM +0200, Jan Nieuwenhuizen wrote:
>>A small extension I made to mknetrel, to make the tetex-* and the
>>cross-* packages: the ver(sion) is something like [0-9]+-[0-9]+
>>at the end; and the base is all except $ver.
>
> You say "extension" and I say "so long gcc-mingw-3_1-20020516-3".

Yes, of course, I understand that in the absence of a
sane/strict/smart package naming policy, you'll be able to device a
weird package name + version combo that cannot be parsed.

I was quite certain that this small change, because it's not only a
bit simpler and more robust, but also because handles more simple
cases better than the previous code and I needed it, would be a
no-brainer to apply.  There must have been something that I missed.

If you really want parse and support that `unconventionally' mingw
example, I can try to send you another patch for it?

Jan.

$ ./parse foe-2.0-1  
base: <foe>
ver: <2.0-1>
base: <foe>
ver: <2.0-1>
$ ./parse foe-bar-2.0-1
base: <foe>
ver: <bar-2.0-1>
base: <foe-bar>
ver: <2.0-1>
$ ./parse gcc-mingw-3_1-20020516-3
base: <gcc>
ver: <mingw-3_1-20020516-3>
base: <gcc-mingw-3_1>
ver: <20020516-3>
$ ./parse "so long gcc-mingw-3_1-20020516-3"
base: <so long gcc>
ver: <mingw-3_1-20020516-3>
base: <so long gcc-mingw-3_1>
ver: <20020516-3>


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org



More information about the Cygwin-apps mailing list