How identify and remove leftover files on buildbots?

Marko Käning MK-MacPorts at techno.ms
Sun Nov 2 05:18:57 PST 2014


Below you’ll find what I changed, which includes the revbump.

Unfortunately the pre-activate phase is NOT entered:
---
$ tree /opt/local/Library/Frameworks/R.framework
/opt/local/Library/Frameworks/R.framework
├── Resources
│   ├── library
│   │   └── testfile
│   └── testfile
└── testfile

2 directories, 3 files
$ sudo port upgrade
Password:
--->  Computing dependencies for R
--->  Fetching archive for R
--->  Attempting to fetch R-3.1.1_1+accelerate+cairo+gfortran48+recommended.darwin_13.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/R
--->  Attempting to fetch R-3.1.1_1+accelerate+cairo+gfortran48+recommended.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/R
--->  Attempting to fetch R-3.1.1_1+accelerate+cairo+gfortran48+recommended.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/R
--->  Fetching distfiles for R
--->  Verifying checksums for R
--->  Extracting R
--->  Configuring R
--->  Building R
--->  Staging R into destroot
--->  Installing R @3.1.1_1+accelerate+cairo+gfortran48+recommended
--->  Cleaning R
--->  Computing dependencies for R
--->  Activating R @3.1.1_1+accelerate+cairo+gfortran48+recommended
Error: org.macports.activate for port R returned: Image error: /opt/local/Library/Frameworks/R.framework/Resources already exists and does not belong to a registered port.  Unable to activate port R. Use 'port -f activate R' to force the activation.
Please see the log file for port R for details:
    /opt/local/var/macports/logs/_Users_marko_WC_SVN_MacPorts_dports_math_R/R/main.log
--->  Scanning binaries for linking errors
--->  No broken files found.
---

Trying to change from pre-activate to post-install phase now...






$ svn diff
Index: Portfile
===================================================================
--- Portfile	(revision 127729)
+++ Portfile	(working copy)
@@ -12,6 +12,7 @@
 
 #Remember to remove revision line when bumping version
 version                     ${major}.${minor}.${point}
+revision                    1
 
 categories                  math science
 maintainers                 me.com:kjell.konis
@@ -92,7 +93,7 @@
                             path:lib/pkgconfig/glib-2.0.pc:glib2 \
                             port:freetype \
                             port:fontconfig \
-                            port:gettext 
+                            port:gettext
     configure.args-delete   --without-cairo
     configure.args-append   --with-cairo
 }
@@ -245,6 +246,19 @@
     ln -s ${resources}/bin/Rscript ${destroot}${prefix}/bin/Rscript
 }
 
+pre-activate {
+    ui_info "pre-activate::start"
+    foreach file {[glob ${prefix}${frameworks_dir}/R.framework/]} {
+        set filepath ${file}
+        ui_info "Found residual file ${filepath}"
+        if {[file exists ${filepath}] && [registry_file_registered ${filepath}] == "0"} {
+            ui_warn "Deleting residual file ${filepath}"
+            file delete -force $filepath
+        }
+    }
+    ui_info "pre-activate::end"
+}
+
 livecheck.type      regex
 livecheck.url       [lindex ${master_sites} 0]
 livecheck.regex     >${name}-(\[0-9.\]+)${extract.suffix}<


More information about the macports-dev mailing list