On Mar 24, 2012, at 03:32, [email protected] wrote:

> Revision: 91153
>          https://trac.macports.org/changeset/91153
> Author:   [email protected]
> Date:     2012-03-24 01:32:36 -0700 (Sat, 24 Mar 2012)
> Log Message:
> -----------
> yum: upgrade version, add newer python variants
> 
> Modified Paths:
> --------------
>    trunk/dports/sysutils/yum/Portfile
>    trunk/dports/sysutils/yum/files/patch-prefix.diff
> 
> Modified: trunk/dports/sysutils/yum/Portfile
> ===================================================================
> --- trunk/dports/sysutils/yum/Portfile        2012-03-24 05:51:24 UTC (rev 
> 91152)
> +++ trunk/dports/sysutils/yum/Portfile        2012-03-24 08:32:36 UTC (rev 
> 91153)
> @@ -3,7 +3,7 @@
> PortSystem 1.0
> 
> name          yum
> -version              3.2.28
> +version              3.2.29
> platforms     darwin
> categories    sysutils archivers
> maintainers   mac.com:n3npq afb
> @@ -16,19 +16,21 @@
> 
> homepage      http://yum.baseurl.org/
> master_sites  ${homepage}download/3.2/

You should use ${branch} here; see:

https://trac.macports.org/wiki/PortfileRecipes#branch


> -checksums    md5 91eff58aa4c25cd4f46b21201bbf9bea \
> -             sha1 2f13dbb8a78a510f9f5a5e9657592f74bafb789a \
> -             rmd160 954ce320cf0168f361bd5c163154a2a6281c3572
> +checksums    md5 8b6b106190980c606b77ebf6a81b5f70 \
> +             sha1 30207763c6a6fbf2f5dc32512bd3eb208f7d39d1 \
> +             rmd160 ab885fc93875925ae57ceabc8731357221d1fae3
> 
> patchfiles    patch-prefix.diff patch-sqlutils.py patch-packages.py
> 
> depends_lib   lib:librpm:rpm port:python24 port:py-celementtree 
> port:py-urlgrabber port:py-libxml2 port:py-yum-metadata-parser 
> port:py-iniparse port:py-pygpgme
> -depends_build        port:intltool port:py24-nose
> +depends_build        port:intltool port:py-nose

This change should not have been made. py-nose is a stub port; no port should 
depend on a stub port. Since the unification of nose, py24-nose is the python 
2.4 nose port.


> +set python.bin       ${prefix}/bin/python2.4
> +
> patch {
>               foreach patch $patchfiles {
>                       system "cd '${workpath}/${distname}' && \
> -                     sed -e 's#@@PREFIX@@#${prefix}#g' -e 
> 's#@@PYTHON@@#${prefix}/bin/python2.4#g' '${portpath}/${filesdir}/${patch}' | 
> patch -p0"
> +                     sed -e 's#@@PREFIX@@#${prefix}#g' -e 
> 's#@@PYTHON@@#${python.bin}#g' '${portpath}/${filesdir}/${patch}' | patch -p0"
>               }
> }
> 
> @@ -39,9 +41,33 @@
> 
> use_configure no
> 
> -build.args   PYTHON="${prefix}/bin/python2.4"
> -destroot.args        PYTHON="${prefix}/bin/python2.4" PYSYSDIR="${prefix}"
> +build.args   PYTHON="${python.bin}"
> +destroot.args        PYTHON="${python.bin}" PYSYSDIR="${prefix}"
> 
> +variant python25 description "use python 2.5 instead of python 2.4" {
> +     depends_lib-delete      port:python24 port:py-celementtree 
> port:py-urlgrabber port:py-libxml2 port:py-yum-metadata-parser 
> port:py-iniparse port:py-pygpgme
> +     depends_lib-append      port:python25 port:py25-celementtree 
> port:py25-urlgrabber port:py25-libxml2 port:py25-yum-metadata-parser 
> port:py25-iniparse port:py25-pygpgme
> +     depends_build-delete    port:py-nose
> +     depends_build-append    port:py25-nose
> +     set python.bin          ${prefix}/bin/python2.5
> +     build.args-delete       PYTHON="${prefix}/bin/python2.4"
> +     build.args-append       PYTHON="${prefix}/bin/python2.5"
> +     destroot.args-delete    PYTHON="${prefix}/bin/python2.4"
> +     destroot.args-append    PYTHON="${prefix}/bin/python2.5"
> +}
> +
> +variant python26 description "use python 2.6 instead of python 2.4" {
> +     depends_lib-delete      port:python24 port:py-celementtree 
> port:py-urlgrabber port:py-libxml2 port:py-yum-metadata-parser 
> port:py-iniparse port:py-pygpgme
> +     depends_lib-append      port:python26 port:py26-celementtree 
> port:py26-urlgrabber port:py26-libxml2 port:py26-yum-metadata-parser 
> port:py26-iniparse port:py26-pygpgme
> +     depends_build-delete    port:py-nose
> +     depends_build-append    port:py26-nose
> +     set python.bin          ${prefix}/bin/python2.6
> +     build.args-delete       PYTHON="${prefix}/bin/python2.4"
> +     build.args-append       PYTHON="${prefix}/bin/python2.6"
> +     destroot.args-delete    PYTHON="${prefix}/bin/python2.4"
> +     destroot.args-append    PYTHON="${prefix}/bin/python2.6"
> +}

If you're going to offer python variants (which is a good thing to offer), you 
should offer variants for each option, not just for each non-default option. 
This would rather simplify things as you wouldn't have to keep repeating python 
2.4 bits all over.

Finally, python 2.4 is going away, very soon. The default should be the 
python27 variant these days, if that's possible for this software.



_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to