[91162] trunk/dports/sysutils/yum/Portfile
Ryan Schmidt
ryandesign at macports.org
Sat Mar 24 17:11:25 PDT 2012
On Mar 24, 2012, at 09:36, afb at macports.org wrote:
> Revision: 91162
> https://trac.macports.org/changeset/91162
> Author: afb at macports.org
> Date: 2012-03-24 07:36:17 -0700 (Sat, 24 Mar 2012)
> Log Message:
> -----------
> yum: fix py-nose dependency, add branch variable, add default variant
>
> Modified Paths:
> --------------
> trunk/dports/sysutils/yum/Portfile
>
> Modified: trunk/dports/sysutils/yum/Portfile
> ===================================================================
> --- trunk/dports/sysutils/yum/Portfile 2012-03-24 14:17:40 UTC (rev 91161)
> +++ trunk/dports/sysutils/yum/Portfile 2012-03-24 14:36:17 UTC (rev 91162)
> @@ -4,6 +4,7 @@
>
> name yum
> version 3.2.29
> +set branch [join [lrange [split ${version} .] 0 1] .]
> platforms darwin
> categories sysutils archivers
> maintainers mac.com:n3npq afb
> @@ -15,7 +16,7 @@
> update each one using rpm.
>
> homepage http://yum.baseurl.org/
> -master_sites ${homepage}download/3.2/
> +master_sites ${homepage}download/${branch}/
> checksums md5 8b6b106190980c606b77ebf6a81b5f70 \
> sha1 30207763c6a6fbf2f5dc32512bd3eb208f7d39d1 \
> rmd160 ab885fc93875925ae57ceabc8731357221d1fae3
> @@ -23,7 +24,7 @@
> 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:py-nose
> +depends_build port:intltool port:py24-nose
>
> set python.bin ${prefix}/bin/python2.4
>
> @@ -44,10 +45,13 @@
> build.args PYTHON="${python.bin}"
> destroot.args PYTHON="${python.bin}" PYSYSDIR="${prefix}"
>
> -variant python25 description "use python 2.5 instead of python 2.4" {
> +variant python24 description "use python 2.4" {}
> +default_variants +python24
You should only make python24 the default variant if the user has not already chosen a different python variant. See:
https://trac.macports.org/wiki/PortfileRecipes#default_variants
Otherwise we get both variants active:
$ sudo port -s install yum +python26
---> Computing dependencies for yum
---> Fetching yum
---> Verifying checksum(s) for yum
---> Extracting yum
---> Configuring yum
---> Building yum
---> Staging yum into destroot
---> Installing yum @3.2.29_0+python24+python26
---> Activating yum @3.2.29_0+python24+python26
---> Cleaning yum
Usually you would declare all the python variants as conflicting with one another; in that case, if you don't restrict your application of default_variants, the user will get:
$ sudo port -s install yum +python26
Error: yum: Variant python26 conflicts with python24
Error: Unable to open port: Error evaluating variants
> +variant python25 description "use python 2.5" {
> 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-delete port:py24-nose
> depends_build-append port:py25-nose
> set python.bin ${prefix}/bin/python2.5
> build.args-delete PYTHON="${prefix}/bin/python2.4"
> @@ -56,10 +60,10 @@
> destroot.args-append PYTHON="${prefix}/bin/python2.5"
> }
>
> -variant python26 description "use python 2.6 instead of python 2.4" {
> +variant python26 description "use python 2.6" {
> 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-delete port:py24-nose
> depends_build-append port:py26-nose
> set python.bin ${prefix}/bin/python2.6
> build.args-delete PYTHON="${prefix}/bin/python2.4"
The python25 and python26 variants are still complicated by redundant code.
Unrelatedly, I'm realizing yum does not install any architecture-specific files, and so needs "supported_archs noarch".
I'm attaching a patch to address these issues.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum.diff
Type: application/octet-stream
Size: 3468 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20120324/626c2527/attachment.obj>
More information about the macports-dev
mailing list