ansible replacement by py-ansible

Joshua Root jmr at macports.org
Thu Dec 14 15:53:48 UTC 2017


On 2017-12-15 01:08 , db wrote:
> I tried upgrading ansible from 2.3.2.0.1_1 to 2.3.2.0.1_2 and it failed. The log showed a conflict with ansible (sic) so I cat'ed the portfile and noticed the ui_error in the pre-configure phase stating its replacement by py-ansible and some instructions. So I did install py-ansible and it failed with the following error.
> 
> --->  Extracting py-ansible
> Error: Failed to patch py-ansible: /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_python_py-ansible/py-ansible/work/ansible-2.4.2.0: no such file or directory

It needs the attached change.

> Why is py27-ansible not marked as requested?

Probably because it was already installed as a dependency of py-ansible
before that port failed.

- Josh
-------------- next part --------------
diff --git a/python/py-ansible/Portfile b/python/py-ansible/Portfile
index 837c3a8147..50f23e6daf 100644
--- a/python/py-ansible/Portfile
+++ b/python/py-ansible/Portfile
@@ -34,16 +34,16 @@ long_description \
 
 python.versions 27 35 36
 
-patch {
-    fs-traverse f ${worksrcpath} {
-        if {[file isfile ${f}] && [regexp {\.(py|yml|yaml)$} ${f} match]} {
-            reinplace -q "s#/etc/ansible#${prefix}/etc/ansible#g" ${f}
-            reinplace -q "s#/usr/share/ansible#${prefix}/share/ansible#g" ${f}
+if {${name} ne ${subport}} {
+    patch {
+        fs-traverse f ${worksrcpath} {
+            if {[file isfile ${f}] && [regexp {\.(py|yml|yaml)$} ${f} match]} {
+                reinplace -q "s#/etc/ansible#${prefix}/etc/ansible#g" ${f}
+                reinplace -q "s#/usr/share/ansible#${prefix}/share/ansible#g" ${f}
+            }
         }
     }
-}
 
-if {${name} ne ${subport}} {
     depends_lib-append  port:py${python.version}-six \
                         port:py${python.version}-paramiko \
                         port:py${python.version}-httplib2 \


More information about the macports-dev mailing list