Buildbot cruft: /opt/local/bin/mvn31
Mojca Miklavec
mojca at macports.org
Tue Mar 17 23:30:59 PDT 2015
On Wed, Mar 18, 2015 at 7:09 AM, Ryan Schmidt wrote:
> On Mar 17, 2015, at 3:24 PM, Blair Zajac wrote:
>>
>> Funny, I found this code in the maven3 port because of this bug:
>>
>> pre-activate {
>> # Remove stray files on Mavericks buildbot
>> foreach file {bin/mvn3} {
>> set filepath ${prefix}/${file}
>> if {[file exists ${filepath}] && [registry_file_registered ${filepath}] == "0"} {
>> delete ${filepath}
>> }
>> }
>> }
>>
>> I’ll put this in maven31 for an hour and then remove it.
>
> If these crufty files are present on the buildbot builders, then they are probably also present on the system of any user who installed the port.
No, not necessarily. The files could also be present because of a
failure on the buildbot (if the build was broken in the middle of
activation step for example, so that files ended up on the system, but
they were never registered).
I'm not saying this is the case here, but it often is.
I also hacked (someone else's) Portfile once to get rid of the
leftovers on the buildbot (after the admins didn't reply for more than
24 hours) and it worked. But it left weird history in SVN of that
Portfile which was undesirable side effect.
I suggested that we should introduce a dummy port for these kind of hacks.
Otherwise someone could write a script and introduce a special button
on the buildbot to remove any leftovers between the builds (similar to
force build, there could be a force clean button; or force build a
"clean-the-buildbot" port). Removing the leftovers could also be part
of the standard cleaning step. After all the ports are deactivated, a
script could check whether there are any files in $prefix that weren't
supposed to be there and remove them.
Mojca
More information about the macports-dev
mailing list