Ticket #15514 (new enhancement)
reinplace should warn if nothing got replaced
|Reported by:||ryandesign@…||Owned by:||macports-tickets@…|
What's always bugged me about reinplace is that you get no notification if nothing got replaced, which will probably bite you later. If you use a patchfile to modify a file, and the patch is out of date, the patch fails to apply and the port command exits with an error. This is good; it alerts the port author to the situation and they can fix it by changing or removing the patch. But with reinplace, if the underlying file you're modifying has changed such that the reinplace no longer causes anything to change, you get no warning and the port command proceeds.
I think the correct behavior might ultimately be to error out entirely if a reinplace doesn't change a file, just like we do with failed patches. But as a first step, to get port authors used to this change, it might be friendlier to just print a warning for now.
The attached patch adds a warning if a reinplace doesn't change the underlying file.
- Milestone changed from Port Enhancements to MacPorts base enhancements