FS#45042 - pacmatic 20150126-1, optionally depends vim, but is actually required

Attached to Project: Community Packages
Opened by Dan Örjestad (kiipa) - Thursday, 21 May 2015, 12:38 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 09 August 2017, 04:51 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Kyle Keen (keenerd)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The pacmatic package (from the offical repo) has vim listed as an optional dep, but when trying to update the new without vim this message appears:

"6 pacnew files found (0 added). Update files now? (Y/n) y
==> ERROR: Cannot find the vim -d binary required for viewing differences."

Additional info:
* package version(s): 20150126-1


Steps to reproduce:
Install pacmatic from offical repo, remove vim if not installed and run "pacmatic -Syu".
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Wednesday, 09 August 2017, 04:51 GMT
Reason for closing:  Not a bug
Comment by Kyle Keen (keenerd) - Thursday, 21 May 2015, 13:00 GMT
1) You can say "no".
2) You can override $DIFFPROG with something non-vim.

I am open to suggestions for how you would like it to actually work, but vim is already pretty optional.
Comment by Dan Örjestad (kiipa) - Thursday, 21 May 2015, 13:08 GMT
I must've been too quick to report this, I didn't realise that the stage (updating the news files) is not critical (oops).

But I think it'd be a good idea to first check if vim is available, if not then don't prompt to update the files but instead print a notice about it (that you need vim or similar to complete that stage) and continue.
Comment by Kyle Keen (keenerd) - Thursday, 21 May 2015, 13:20 GMT
That would be a little tricky. Pacmatic doesn't handle the diff merging at all. It shells out to pacdiff, which then finds the new configs and runs the diff editor. (And pacdiff can be slotted out for anything else with $pacdiff_program) Pacdiff's editor can be configured as well. So pacmatic is removed from the editor by two degrees and it is not possible to cover the possibilities beyond a single common case.

Pacmatic could have a very fragile check that can only handle one default case, or pacdiff could be patched to more gracefully deal with a missing $DIFFPROG. I would suggest the second option.
Comment by Dan Örjestad (kiipa) - Thursday, 21 May 2015, 16:13 GMT
I see. Is it possible to see if pacdiff throws an error, and in that case continue without saving the news files?

Loading...