header_postinst.d/nvidia-common gives output to stderr

Bug #759217 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nvidia-common (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: nvidia-common

if you are on a system where nvidia-detector will fail, you'll see errors to stderr during apt-get upgrade like:
Setting up linux-headers-2.6.38-8-generic (2.6.38-8.42) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/nvidia-common 2.6.38-8-generic /boot/vmlinuz-2.6.38-8-generic
/etc/kernel/header_postinst.d/nvidia-common: line 8: [: none: unary operator expected

See in /etc/kernel/header_postinst.d/nvidia-common:
if [ -x /usr/bin/nvidia-detector ]; then
    LATEST=$(nvidia-detector)
    if [ ${LATEST} ] && [ "${LATEST}" != "none" ]; then
        db_fset nvidia-common/obsolete-driver seen false
        db_subst nvidia-common/obsolete-driver latest $LATEST
        db_input high nvidia-common/obsolete-driver || true
        db_go || true
    fi
fi

The error comes when nvidia-detector outputs nothing. The line should probably be:
    if [ -n "${LATEST}" ] && [ "${LATEST}" != "none" ]; then

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: nvidia-common 0.2.30
ProcVersionSignature: Ubuntu 2.6.38-8.41-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Tue Apr 12 17:29:41 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100318)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: nvidia-common
UpgradeStatus: Upgraded to natty on 2010-11-15 (148 days ago)

Revision history for this message
Scott Moser (smoser) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.