We've got a lot of packages that are the same module for different
versions of a language (-pm*, -py*, etc.). Often, the only difference
between these .info files is in the %n and some Depends and pathnames
in *Scripts, and these are either the language version or a condensed
form of it. What do people think about adding a new LangVersion field
that is a single place to define it, and then have two new percent
expansions to insert it as given and condensed? For example, we
currently have:

  python-cjcodecs-py21.info:
    Package: python-cjkcodecs-py21
    Depends: python21
    InstallScript: %p/bin/python2.1 setup.py install --prefix=%i

and similar for -py22 and -py23. I'm proposing:

  python-cjcodecs-py21.info:
    Package: python-cjcodecs-py%{langversion-condensed}
    LangVersion: 2.1
    Depends: python%{langversion-condensed}
    InstallScript: %p/bin/python%{langversion-raw} setup.py install --prefix=%i

Field name and %-expansion are just for this example (although I
should note that I can't find any technical problems with using
%-expansion keys longer than a single character).

That way the only thing that changes is LangVersion. It seems like
this would make it easier to maintain these things, especially for
avoiding typos/etc. for a -pm* that depends on lots of other -pm*.

I know we recently added "Type: perl $version", so this expansion
could be used in that field value as well. Or else instead of adding a
LangVersion field, just pull the version out of Type: (and extend
Type: to accept python).

Comments anyone??

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to