How identify and remove leftover files on buildbots?

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


On 02 Nov 2014, at 23:47 , Ryan Schmidt <ryandesign at macports.org> wrote:
> You're looking at verbose or debug output?
> 
> I always forget which ui_ function does which, since there are so many of them, but I just reminded myself by trying them, and ui_msg prints in all modes, ui_info prints in verbose and debug, and ui_debug prints only in debug mode.

OK, I should have used ui_msg, I guess.


> On Nov 2, 2014, at 4:44 PM, Marko Käning wrote:
> 
>>> Do you have a complete list of those files?
>> 
>> No, only on the buildbots one could see that. But I don’t have direct access to them.
> 
> There's nothing special about the buildbots except that you can be sure they're clean systems that haven't had user interference. So you should be able to reproduce any problem on the buildbot on your own machines.

Hmmm… That’s what I try to emulate on my system, in order to submit the port eventually to the BBs, so that their filesystems get cleaned again.


Well, now that I fixed the brackets I get a little further with these files in place:
---
$ 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:
Portfile changed since last build; discarding previous state.
--->  Computing dependencies for R
--->  Fetching archive for R
--->  Attempting to fetch R-3.1.1_8+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_8+accelerate+cairo+gfortran48+recommended.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/R
--->  Attempting to fetch R-3.1.1_8+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_8+accelerate+cairo+gfortran48+recommended
--->  Cleaning R
--->  Computing dependencies for R
Warning: Deleting residual file /opt/local/Library/Frameworks/R.framework/Resources
Warning: Deleting residual file /opt/local/Library/Frameworks/R.framework/testfile
--->  Activating R @3.1.1_8+accelerate+cairo+gfortran48+recommended
--->  Cleaning R
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.
---



OK, it looks that this does the job as expected now. This was achieved with this pre-activate phase:
---
pre-activate {
    foreach filepath [glob ${frameworks_dir}/R.framework/*] {
        if {[file exists ${filepath}] && [registry_file_registered ${filepath}] == "0"} {
            ui_warn "Deleting residual file ${filepath}"
            delete $filepath
        }
    }
}
---



BTW, does the TCL function registry_file_registered actually check whether the file in question is
registered only by the current port, or by ANY port installed??



Thanks for all the guidance, folks!!! :-)


Greets,
Marko


More information about the macports-dev mailing list