Date: Wed, 15 Aug 2001 13:48:29 +0200 From: Anton Berezin <tobez@tobez.org> To: Sheldon Hearn <sheldonh@starjuice.net> Cc: Stijn Hoop <stijn@win.tue.nl>, ports@FreeBSD.org Subject: Re: The evils of Makefile-embedded perl scripts vs patches Message-ID: <20010815134829.B81696@heechee.tobez.org> In-Reply-To: <58526.997875545@axl.seasidesoftware.co.za>; from sheldonh@starjuice.net on Wed, Aug 15, 2001 at 01:39:05PM %2B0200 References: <58425.997875060@axl.seasidesoftware.co.za> <58526.997875545@axl.seasidesoftware.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 15, 2001 at 01:39:05PM +0200, Sheldon Hearn wrote: > > [Was Re: Re: cvs commit: ports/games/freeciv ...] > > On Wed, 15 Aug 2001 13:31:00 +0200, Sheldon Hearn wrote: > > What's wrong with it is that the Makefile isn't a place that folks > > expect to find patches. People expect to find patches in the files > > directory, names patch-*. Properly stored patches are also easier > > to submit back to the vendor. > Also, embedded perl scripts tend not to error out on failure to find a > match. This means it's far too easy for the perl script to become > stale. > This was a perfect example. The perl script did absolutely _nothing_ > useful any more. A patch file would have failed to apply, which would > help the maintainer keep things tidy. It is not difficult to account for this situation in a perl one-liner: perl -i -pe 's/something/something else/' some_file should become perl -i -pe 's/something/something else/ && $n++; END { exit 1 unless $n }' some_file The truth is that it seems nobody thought about this potential problem before, and we were not doing this. I maintain that for very simple patches it is still better to use one-liners magic in a Makefile rather than creating full-blown patch files. We just need to take into consideration the potential for these one-liners to become stale over time. =Anton. -- May the tuna salad be with you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010815134829.B81696>