How identify and remove leftover files on buildbots?

Marko Käning MK-MacPorts at techno.ms
Sun Nov 2 04:07:40 PST 2014


On 02 Nov 2014, at 12:49 , Joshua Root <jmr at macports.org> wrote:
> You're not calling glob properly. You're looping over a list containing
> 2 elements, the first of which is 'glob'. Print out $filepath right
> after it's set to see this.

Oh, I see I missed the brackets. :/

Well, after fixing this I tried again and finally have to realise that my pre-activate phase doesn’t seem
to get called at all:

---
pre-activate {
    ui_warn "pre-activate::start"
    foreach file {[glob ${prefix}/Library/Frameworks/R.framework/]} {
        set filepath ${prefix}/${file}
        ui_warn "Found residual file ${filepath}"
        if {[file exists ${filepath}] && [registry_file_registered ${filepath}] == "0"} {
            ui_warn "Deleting residual file ${filepath}"
            file delete -force $filepath
        }
    }
    ui_warn "pre-activate::end”
}
---

as you can see here:

---
$ sudo port activate 
--->  Computing dependencies for R
--->  Activating R @3.1.1_0+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/_opt_local_var_macports_registry_portfiles_R-3.1.1_0_b7a977ec04f3cf13705119222720f517ea82db667f1b01c418883c442bac4545-9666/R/main.log
Warning: Failed to execute portfile from registry for R @3.1.1_0+accelerate+cairo+gfortran48+recommended
--->  Activating R @3.1.1_0+accelerate+cairo+gfortran48+recommended
Error: port activate failed: 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.
$ grep "pre-activate::" /opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_R-3.1.1_0_b7a977ec04f3cf13705119222720f517ea82db667f1b01c418883c442bac4545-9666/R/main.log
$
---

At least I can’t spot those ui_warn messages as you can see above. :(

Greets,
Marko


More information about the macports-dev mailing list