How identify and remove leftover files on buildbots?
Ryan Schmidt
ryandesign at macports.org
Sun Nov 2 15:26:17 PST 2014
> On Nov 2, 2014, at 5:21 PM, Marko Käning <MK-MacPorts at techno.ms> wrote:
>
> On 03 Nov 2014, at 00:12 , Ryan Schmidt <ryandesign at macports.org> wrote:
>> Any port.
>
> Ok.
>
>
>> Note that the registry only contains files and symlinks, not directories, which some of the items you're globbing are.
>
> OK.
>
>
>> If you're sure that no port other than R should be installing anything in ${frameworks_dir}/R.framework, but rkward or some other port previously did without registering that, you could just unconditionally delete that pre-activate.
>
> I mean, that’s what I am doing with the pre-activate phase as is now, right?!
> Everything found in there gets deleted.
I was saying you could possibly simplify the code to
pre-activate {
delete ${frameworks_dir}/R.framework
}
if you're sure that no other port installs files there.
>
>> Or you could fs-traverse that directory and just delete things not registered to any port.
>
> I haven’t used fs-traverse up to now, but I thought that is what the current implementation of my pre-activate phase does… Or not?
You're currently using glob, not fs-traverse. glob is a standard Tcl command that finds matching items in one directory. It doesn't attempt to look into its subdirectories.
https://www.tcl.tk/man/tcl/TclCmd/glob.htm
fs-traverse is a MacPorts-specific addition to Tcl which traverses a directory's subdirectories. It's like the "find" command on the command line.
More information about the macports-dev
mailing list