#473996 dpkg: promptconfaction should offer vimdiff too

Package:
dpkg
Source:
dpkg
Description:
Debian package management system
Submitter:
Martin Hradil
Date:
2021-09-22 04:40:25 UTC
Severity:
wishlist
Tags:
#473996#5
Date:
2008-04-02 15:06:31 UTC
From:
To:
promptconfaction offers the choices of
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : background this process to examine the situation

This patch adds another option: vimdiff.
It works similarly as D, only it doesn't diff but vimdiff the files.

#473996#12
Date:
2009-07-28 21:52:44 UTC
From:
To:
Is there any reason this patch hasn't yet been applied? I'd find a menu
option very useful, rather than the current "break local config by
trashing it with upstream" vs "break the program by not upgrading its
config" choice we currently get. Every time I get such a question I
always hit Z and run

  vimdiff /etc/foo.conf{,.dpkg-new}

anyway, so having a menu option to do that directly would be useful
indeed...

#473996#23
Date:
2011-08-31 13:08:34 UTC
From:
To:
Any particular reason the above patch, or functionallity like it, hasn't
been added into dpkg yet? I find that the vast majority of cases when
dpkg finds a difference in a file, I hit Z to get a shell, then

  vimdiff /etc/somefile{,.dpkg-new}

#473996#30
Date:
2018-04-11 16:34:05 UTC
From:
To:
In order for this bug not to sit idle for yet another five years,
attached is my attempt at a patch.

I haven't been able to properly test it in all variations and
configurations, but hopefully it at least serves as a useful hint into
someone managing to get somewhere into fixing it.

I'm also offering a USD100 bounty to anyone who can get this properly
fixed and applied into Debian mainline.

https://twitter.com/cpan_pevans/status/984101376480481286

#473996#35
Date:
2018-11-23 18:09:13 UTC
From:
To:
[Adding guillem@debian.org to CC]
[Adding 473996@bugs.debian.org to CC]

Hi Paul,

Alas, I don't think that this will merged simply because it hard-
codes vimdiff. I tried applying one of the configurable variants
of patch from:

https://bugs.debian.org/120152#16

... with some success but I am a little bit unsure about the
approach and, of course, that code is now extremely old, crusty
and as you can see it had some issues after review.

Guillem, would you be amenable to applying any configurable patch
if one was to magically appear? If so, would you have any other
requirements or objections, either philosophically and technically?

Knowing the answers there here the next step here I think, or we
should just mark all of these bugs as wontfix with a suitable
justification to ameliorate any frustration.


Best wishes,

#473996#40
Date:
2018-11-25 15:06:36 UTC
From:
To:
Oh absolutely. I was fully expecting that exact objection - I just
wrote a minimal "works for me" on the hopes someone else would know how
to make that part.

I hope it does get fixed. I'd love to be able to type

  V

instead of

  Z
  vimdiff /etc/ssh/sshd_config{,.dpkg-new}

every time.

#473996#45
Date:
2018-12-02 14:06:37 UTC
From:
To:
Hi!

Exactly.

So, I think there are several related problems that have been
conflated in this mass of merged bugs, with different requirements,
which I'm now not sure have been spelled out adequately. Let me try
to quickly clear this now, and during this next week I'll untangle the
mess and probably try to salvage/prepare a patch for the first one.

 - There is a desire to make the diff generation tool configurable.
   This would ideally require, being able to pass a command-line
   with some placeholders for the old and new filenames. Or assume
   that the user will use a wrapper that honors the
   DPKG_CONFFILE_<type> environment variables, which would be slightly
   more cumbersome, but require less code.
 - There is a desire to get 3-way merge support. This is currently
   just unreliable, as we do not keep all the information required.
   I'd rather not spend time on this until the conffiledb work is
   merged, which I just need to sit down and do. :)

Thanks,
Guillem

#473996#50
Date:
2018-12-21 18:27:13 UTC
From:
To:
Hi Guillem,

Is there an ETA on this, just out of interest?

This feature seems like a fun problem to hack on, after all but
wouldn't want to get in your way or expend energy generating yet
another patch that won't ever be merged. :)


Best wishes,

#473996#55
Date:
2019-01-11 11:06:46 UTC
From:
To:
Chris Lamb wrote:

Gentle ping on this? :)


Regards,

#473996#60
Date:
2019-01-11 12:21:27 UTC
From:
To:
3way could be fun eventually, but a quick win rightnow surely is to
just allow a user to hit a key to do the equivalent of the vimdiff (or
ediff or whatever tool) they're already using. I'd be perfectly happy
for the actual command invoked to be from a config file etc... I only
hardcoded 'vimdiff' in my original patch as a quick demonstration of
the behaviour I wanted.

Really this is just about saving myself some keystrokes. I'd rather hit

  e

than

  z vimdiff /etc/sshd/ssh_config{,.dpkg_new}
  ...
  fg

every time. There's no complicated questions about 3way diff in this.

#473996#65
Date:
2019-01-20 12:59:10 UTC
From:
To:
Actually, sshd now appears to be using ucf so it's even more tedious
currently. Right now is printing:

   A new version (/tmp/fileEkQlUI) of configuration
   file /etc/ssh/sshd_config is available, but the version installed
   currently has been locally modified.

in a fullscreen dialog, offering some choices, none of which is
`vimdiff`. I can start a shell, but if I do that then it switches back
out of the full (alt)screen dialog it was running, so I have lost the
filenames in question. I have to remember to copy-and-paste so I can

  $ vimdiff /etc/ssh/sshd_config /tmp/fileEkQlUI

Additionally, ucf's way of starting a new shell hasn't properly worked,
because Ctrl-Z inside _that_ vimdiff to background itself so I can
return to the inner shell momentarily massively breaks everything -
what it in fact does is backgrounds the entire apt-get upgrade / ucf /
bash / vim  combo, meaning that when I `fg` again afterwards I return
back to apt-get upgrade and all is confused.

That admittedly is a separate bug, but is all compounded by my having
to go the long way around because I couldn't just hit `v` to begin with.

Can we please have `v`?

#473996#70
Date:
2021-09-22 04:26:56 UTC
From:
To:
Hello,

Good morning,

We have gone through your samples from a partner and Here is our  Order
List. Please do bear in mind that we are very much in  need of this
order, quote your competitive prices.

Kindly send the Order confirmation.

Your early reply will be much appreciated.

Best Regards,

Maryanah Erwin.

PT FINDORA INTERNUSA

Jln Pahlawan 66 Kec. Arjawinangun

45162 CIREBON West-Java INDONESIA

tel : +62 231 357334

fax: +62 231 357260

email: marketing@findora.com