When reinplace doesn't change a file

Ryan Schmidt ryandesign at macports.org
Wed Jun 4 23:09:41 PDT 2008


On Jun 5, 2008, at 00:04, Jordan Hubbard wrote:

> On Jun 4, 2008, at 9:37 PM, Joshua Root wrote:
>
>> Ryan Schmidt wrote:
>>
>>> Can I get an opinion from our port authors? I think MacPorts should
>>> at least issue a warning (if not error out entirely) when a  
>>> reinplace
>>> command doesn't end up changing a file. Do you agree?
>>>
>>> I filed a ticket with a patch:
>>>
>>> http://trac.macports.org/ticket/15514
>>
>> Thumbs up from me.
>
> Only a partial thumbs up from me.  I think that the application of  
> purely prophylactic transforms is a perfectly legitimate use of  
> reinplace, and I don't see how you can distinguish those from  
> actual "replace failures" per-se.   If you're really keen to add  
> this, then the calling syntax of reinplace should be augmented with  
> an optional -strict argument flag to selectively enable it.   If  
> you can prove that the default logic can be reversed without  
> breaking half the ports tree, I'd also be fine with a -noerror flag  
> to disable it instead.

Just to clarify: no ports will be broken by the current patch, which  
just issues a warning if a reinplace does nothing. I see this as  
similar to the warning that was added when a port installs files  
outside the usual directory structure. We could even add the same  
wording. ("Please fix or indicate this misbehavior (if it is  
intended), it will be an error in future releases!") But like that  
warning, you're right that there should be a way for port authors to  
disable it. A flag on reinplace to suppress the warning seems the  
logical place to do this. This would mean that we have to release a  
version of MacPorts with that flag before port authors can begin  
incorporating it into their portfiles.

I'm going to reinstall all my ports to a different prefix, and I'll  
see how many of my ports get this warning, and I'll look into whether  
or not the behavior it's intended.



More information about the macports-dev mailing list