Package: moreutils
Version: 0.14
Severity: normal
Tags: patch

According to Debian Policy ยง11.4:

> every program that launches an editor or pager must use the EDITOR or 
> PAGER environment variable to determine the editor or pager the user 
> wishes to use. If these variables are not set, the programs 
> /usr/bin/editor and /usr/bin/pager should be used, respectively.

However, vipe and vidir as shipped default to vi, regardless of the 
user's choice of editor.

A patch is attached.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-powerpc
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages moreutils depends on:
ii  libc6                         2.3.6-7    GNU C Library: Shared libraries
ii  perl                          5.8.8-4    Larry Wall's Practical Extraction 

moreutils recommends no packages.

-- no debconf information
Common subdirectories: moreutils-0.14/debian and 
moreutils-0.14.usrbineditor/debian
diff -u moreutils-0.14/vidir moreutils-0.14.usrbineditor/vidir
--- moreutils-0.14/vidir        2006-07-12 13:35:31.000000000 -0400
+++ moreutils-0.14.usrbineditor/vidir   2006-07-17 16:38:59.000000000 -0400
@@ -35,7 +35,7 @@
 
 =item EDITOR
 
-Editor to use. Defaults to vi if not set.
+Editor to use. Defaults to /usr/bin/editor if not set.
 
 =item VISUAL
 
@@ -99,7 +99,7 @@
 @dir=();
 close OUT;
 
-my @editor="vi";
+my @editor="/usr/bin/editor";
 if (exists $ENV{EDITOR}) {
        @editor=split(' ', $ENV{EDITOR});
 }
diff -u moreutils-0.14/vipe moreutils-0.14.usrbineditor/vipe
--- moreutils-0.14/vipe 2006-07-12 12:52:49.000000000 -0400
+++ moreutils-0.14.usrbineditor/vipe    2006-07-17 16:39:36.000000000 -0400
@@ -19,7 +19,7 @@
 
 =item EDITOR
 
-Editor to use. Defaults to vi if not set.
+Editor to use. Defaults to /usr/bin/editor if not set.
 
 =item VISUAL
 
@@ -51,7 +51,7 @@
 close STDOUT;
 open(STDOUT, ">/dev/tty") || die "reopen stdout: $!";
 
-my @editor="vi";
+my @editor="/usr/bin/editor";
 if (exists $ENV{EDITOR}) {
        @editor=split(' ', $ENV{EDITOR});
 }

Reply via email to