FS#12995 - vi shouldnt create backup files during installation
Attached to Project:
Release Engineering
Opened by Greg (dolby) - Tuesday, 27 January 2009, 04:52 GMT
Last edited by Dieter Plaetinck (Dieter_be) - Sunday, 08 March 2009, 16:55 GMT
Opened by Greg (dolby) - Tuesday, 27 January 2009, 04:52 GMT
Last edited by Dieter Plaetinck (Dieter_be) - Sunday, 08 March 2009, 16:55 GMT
|
Details
I am creating this here, as the problem is that this is
affecting new installations. Vi doesnt contain set nobackup
in its default config as it did in the past.
That results to creation of backups for files edited with vi during installation in your newly created system. http://bugs.archlinux.org/task/12944#comment38214 |
This task depends upon
Closed by Dieter Plaetinck (Dieter_be)
Sunday, 08 March 2009, 16:55 GMT
Reason for closing: Implemented
Sunday, 08 March 2009, 16:55 GMT
Reason for closing: Implemented
Rather than fiddle with config files, we can simply modify the installer to use:
EDITOR="vi --cmd 'set nobackup'"
instead of
EDITOR="vi"
It's a simple enough fix. Hell, if we want to sate everyone, we could always add two menu options "vim with backup files" and "vim without backup files" or something more clear :)
As far as the last part i dont get its point. I dont think anyone wants the backup files.
If i want to see how the original file looks like i usually go to /var/cache/pacman/pkg.
I, for one, use vim's backup files all the time on some machines. While I don't know if I'd use them for configs like rc.conf, I *do* use them
And if i may say so, if theres no backup files, noone is gonna complain, like its the case up til today.
If someone wanted to have those backup files there would be complaints even with the old vim config.
With backup files people already started griping. http://bugs.archlinux.org/task/12944#comment38214 :)
I suggest we provide 2 "editors" (vim with and without backup files) and steer uncertain users into the right direction with clever phrasing:
* nano (easier)
* vi with backup files
* vi without backup files (experienced users)
Also i dont think thats possible with the solution phrakture suggested?
Little finetuned phrasing:
* nano (easy)
* vi with backup files (experienced users)
* vi without backup files (very experienced users)
Lets say a new Arch user, but experienced in Linux, chooses vi to edit the files.
The installer gives him the capability of editing the files more than once. Hes clumsy sleepy or tired, so lets say he edited 5-6 of them, 5 times each.
How do you know think his /etc is gonna look like when he boots into the system? Its gonna be full of backups.
I really don't see what's wrong with just having two options for vi. I think it's a clean, simple and efficient fix.
or remove "set backup" from the global virc/vimrc
If you're a vi user, you should know how your editor behaves and how to work with it. (and :set backup yourself if you want that)
so tell me, is no backups the default/"commonly accepted" behaviour for vi?
Does that change anything? Vim is not an editor whose purpose is to be used in installations.
Noone wants backups to be present in their fresh installation.
If you dont change it expect to see bug reports concerning this in the future cause people will not know about this.
They dont expect vim to behave that way.
I mean more globally. "vim as it is widely known" as in "the behaviour people will expect, even (and especially) if they come from other distro's where they used vim and now install arch for the first time"
> Vim is not an editor whose purpose is to be used in installations.
an editor has the purpose of editing text files. where and what for the editing of text files is, it should not matter.
> Noone wants backups to be present in their fresh installation.
So you asked everyone? I for one like backup files...there are probably more people.
As for the "So you asked everyone?" question.
3 people bothered to comment on this and they all said they dont want backups. I dont know what everyone else does or doesnt want cause noone else bothered to comment.
If all of what ive written above is not enough to convince you that its not the behaviour a user would expect, nor the developers would want from the installation i cant think of something that will.
This has nothing to do with staying vanilla or generalities like that. Theyre totally irrelevant here.
Maybe you could ask users in the mailing list to get more opinions if you think im the only one who doesnt want backups.
However, and here's the important point, when someone installs an arch system, they expect a clean install. If a brand new install came with .pacnew and .pacsav files, would it bother you? It'd bother me!
I think we should look at it from that angle - we're talking about installing a clean system, and it's not clean.
quote /etc/virc:
if has("vms")
set nobackup " do not keep a backup file, use versions instead
else
set backup " keep a backup file
endif
My reasoning is that since keeping backups with vi is the default, this is what vi users expect. (but then again, since they are installing a system, one could also say they except a clean system).
-> If you keep backups, some users may complain about a dirty system
-> If you don't, some users may save a file with an error in it, realise it later, hope to find a backup file, but find out there is none.
What about this?
We leave backup files enabled, but at the end of the installation we do a rm $DESTDIR/etc/*~ ? That way we combine the advantages of both approaches and everybody is happy and we can live hand in hand in a world of rainbows and unicorns :)
"Rather than fiddle with config files, we can simply modify the installer to use:
EDITOR="vi --cmd 'set nobackup'" instead of EDITOR="vi""
Also you say: "My reasoning is that since keeping backups with vi is the default, this is what vi users expect."
As a grub user i dont expect to find a graphical grub either. Why is that taken into consideration only for vi?
Anyway, the above was just to demonstrate that its not what users expect the deal here. Its about how you (the developers of the installer) want it to behave.
I fixed it, so you can stop trolling now.