Package: less
Version: 418-1
Severity: serious
Justification: Unsuitable for release because of unexpected behavior

$ echo "This is a plain text file" >test.deb
$ less test.deb
test.deb:

*** Contents:
test.deb (END)

Doing the same on an Etch system does show the contents correctly:
$ echo "This is a plain text file" >test.deb
$ less test.deb
This is a plain text file
test.deb (END)


Having the ability to show the contents of a Debian package is nice, but
IMO the current implementation is seriously broken for the following
reasons:
- apparently it assumes that any file with the extention .deb or .udeb
  is a Debian package file, which is the Windows way of doing things;
  the Linux (and only correct) way of determining the file type is by
  checking the "magic numbers" in a file
- the current behavior violates the rule of "least surprise": if I use
  less on a Debian package and get garbled output, that's not strange;
  however, if I use less on a plain text file and I only get '***
  Contents:', it leads to the assumption that the file is broken

I saw this issue while working with the experimental busybox source package,
which has three configuration files: config.deb, config.udeb and
config.static (IMO a sensible naming scheme).
The fact that I did not see the contents of the first two confused me a
lot and eventually cost a few hours of both my time and of others [1].

Please revert this feature until it can be implemented correctly to
checks the actual file type.

Cheers,
FJP

[1] http://lists.debian.org/debian-boot/2008/03/msg00223.html

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.25-rc5 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages less depends on:
ii  debianutils               2.28.4         Miscellaneous utilities specific t
ii  libc6                     2.7-9          GNU C Library: Shared libraries
ii  libncurses5               5.6+20080203-1 Shared libraries for terminal hand

less recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to