[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#40650: dpkg: Show diff when upgrading a conffile

daniel@bluegreen.dhis.org wrote:
> Package: dpkg
> Version:
> Severity: wishlist
>   Hello,
>   When a modified conffile is updated, dpkg shows a prompt with the options
> (if I remember this correctly): "Y/N/Z".  I generally use the opportunity to
> execute the command 'diff -u conffile conffile.dpkg-dist |& less' and see what
> would change if I entered "Y".  It would be incredibly useful if there were a
> "D" option which executed this command automatically, and however pasta-like
> dpkg's code is, I imagine that the following pseudocode would work:
>   if (userchoice == 'D')
>     {
>       char *temp=malloc(200+2*strlen(conffilename));
>       sprintf("diff -u %s %s.dpkg-dist 2>&1 | less",temp);
>       system(temp);
>       free(temp);
>     }

Better use less -E so you won't end up *in* less until the diff is bigger
than your screen size.  It's an interesting feature request and I guess
that I would like it.



No question is too silly to ask, but, of course, some are too silly
to answer.   -- Perl book

Please always Cc to me when replying to me on the lists.

Reply to: