On Fri, Apr 06, 2007 at 05:39:43PM +0200, Ingo Schwarze wrote:
> When a file installed by a @sample packing list directive was changed
> locally, manually updating it can be tedious after pkg_add -r.
> Even worse, after updating many packages using pkg_add -u,
> finding out which config files need updating is non-trivial.
> 
> The following patch prepares a diff between the old and the new default
> versions.  Just read this diff, apply it to your installed version,
> manually resolve any conflicts and you are done.
> 
> This diff is still proof-of-concept quality.  In particular, i should
> probably use p5-Text-Diff instead of system(diff).  In case you like
> the general idea, i shall do the necessary polishing.  Any advice
> is welcome.

the idea is fine, don't worry about the polishing, I'll refactor it a bit
to avoid having so much code in there.

- using p5-Text-Diff is not such a good idea, we tend to prefer keeping
pkg_add entirely in base.
- you don't want to use system, but get a pipe opened to a diff command.
That way, you don't need a temporary file.
- read about the list-based versions of diff and open. They are necessary
for anything security-related.

Reply via email to