Bug#40650: dpkg: Show diff when upgrading a conffile
Anders Hammarquist wrote:
> > > 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.
>
> Better yet, use sensible-pager (not everyone has less installed).
> less -E has "interesting" effects in xterms (and other terminals with
> an alternate buffer), so you really don't want to do that.
Agreed.
Regards,
Joey
--
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: