[143403] trunk/dports/net/nedi/Portfile

ryandesign at macports.org ryandesign at macports.org
Sat Dec 12 09:50:19 PST 2015


Revision: 143403
          https://trac.macports.org/changeset/143403
Author:   ryandesign at macports.org
Date:     2015-12-12 00:26:33 -0800 (Sat, 12 Dec 2015)
Log Message:
-----------
nedi: fix activation failure when nedi < 1.0.9 was previously installed (#49989); use expansion operator instead of eval

Modified Paths:
--------------
    trunk/dports/net/nedi/Portfile

Modified: trunk/dports/net/nedi/Portfile
===================================================================
--- trunk/dports/net/nedi/Portfile	2015-12-12 08:12:57 UTC (rev 143402)
+++ trunk/dports/net/nedi/Portfile	2015-12-12 08:26:33 UTC (rev 143403)
@@ -6,7 +6,7 @@
 
 name                nedi
 version             1.0.9
-revision            1
+revision            2
 license             GPL-3
 categories          net
 maintainers         nomaintainer
@@ -62,16 +62,16 @@
     file mkdir ${destroot}${nedidir}
 
 # copy content to destroot
-    eval copy [glob ${worksrcpath}/*] ${destroot}${nedidir}
+    copy {*}[glob ${worksrcpath}/*] ${destroot}${nedidir}
 }
 
 post-destroot {
 
 # Fix general paths
-    eval reinplace "s|^#!.*|#!${perl5.bin}|" \
-        [glob ${destroot}${nedidir}/*.pl] \
-        [glob ${destroot}${nedidir}/contrib/*.pl] \
-        [glob ${destroot}${nedidir}/inc/*.pl]
+    reinplace "s|^#!.*|#!${perl5.bin}|" \
+        {*}[glob ${destroot}${nedidir}/*.pl] \
+        {*}[glob ${destroot}${nedidir}/contrib/*.pl] \
+        {*}[glob ${destroot}${nedidir}/inc/*.pl]
 
     reinplace "s|netstat|/usr/sbin/netstat|g" \
         ${destroot}${nedidir}/inc/libmisc.pm
@@ -116,6 +116,17 @@
         ${destroot}/Library/LaunchDaemons
 }
 
+pre-activate {
+    # nedi < 1.0.9 installed this symlink directly, bypassing the destroot.
+    # Remove it if found to prevent activation failure.
+    set f /Library/LaunchDaemons/org.macports.nedisyslog.plist
+    if {![catch {file type ${f}}] && [registry_file_registered ${f}] == "0"} {
+        if {[catch {delete ${f}}]} {
+            ui_warn "Cannot delete ${f}; please remove it manually"
+        }
+    }
+}
+
 notes \
   "**** To complete the NeDi OS X installation ****
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/b9fe2ade/attachment.html>


More information about the macports-changes mailing list