Bug#40650: dpkg: Show diff when upgrading a conffile
> > 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.
/Anders
--
-- Of course I'm crazy, but that doesn't mean I'm wrong.
Anders Hammarquist | iko@cd.chalmers.se
Physics student | Hem: +46 31 47 69 27
Chalmers University of Technology, G|teborg, Sweden | Mob: +46 707 27 86 87
Reply to: