dirname errors printed to console on startup

Bug #833780 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu (Ubuntu)
Fix Released
High
Dustin Kirkland 
Oneiric
Fix Released
High
Dustin Kirkland 

Bug Description

I have byobu by default enabled (20110824 cloud image).

When I log in, I see some dirname errors flash by. They're reproducible via 'su', so heres the captured output:

$ sudo su -
dirname: missing operand
Try `dirname --help' for more information.
dirname: missing operand
Try `dirname --help' for more information.
To launch in a nested session, run: byobu

Commenting out the followoing stanza in /usr/lib/byobu/.dirs will clean them up.
elif [ -d "$(dirname $TMUX)" ]; then
        # Or perhaps try the tmux tmpdir
        export BYOBU_RUN_DIR="$(dirname $TMUX)/$PKG"
else

You can avoid a 'dirname' fork ( you have 2 of them) there completely with:
elif [ -d "${TMUX%/*}" ]; then
   # Or perhaps try the tmux tmpdir
   export BYOBU_RUN_DIR="${TMUX%/*}/$PKG"
else

that will work for any valid file path that has a '/' in it (ie, it wont work for '.').

You can at very least save 1 fork with:

elif dir=$(dirname "$TMUX") && [ -d "$TMUX" ] ; then
   export BYOBU_RUN_DIR="$dir/$PKG"
fi

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: byobu 4.30-0ubuntu1
ProcVersionSignature: User Name 3.0.0-9.14-virtual 3.0.3
Uname: Linux 3.0.0-9-virtual x86_64
Architecture: amd64
Date: Thu Aug 25 13:44:40 2011
Ec2AMI: ami-0000004b
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: <nova.db.sqlalchemy.models.InstanceTypes object at 0x4d71150>
Ec2Kernel: aki-00000026
Ec2Ramdisk: ari-00000028
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ScreenRC:

SourcePackage: byobu
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 833780] Re: dirname errors printed to console on startup

I had fixed this in 4.31. Can you try there? I'll take your
suggestion to save one fork and commit that though.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Fixed in 4.31. Thanks for the report.

Changed in byobu (Ubuntu):
status: New → Fix Released
importance: Undecided → High
Changed in byobu (Ubuntu):
status: Fix Released → Fix Committed
Changed in byobu (Ubuntu):
assignee: nobody → Dustin Kirkland (kirkland)
milestone: none → ubuntu-11.10-beta-1
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 4.32-0ubuntu1

---------------
byobu (4.32-0ubuntu1) oneiric; urgency=low

  * usr/bin/byobu-launcher: LP: #835130
    - silence message that some users found noisy
  * usr/bin/byobu, usr/bin/byobu-launch, usr/bin/byobu-launcher,
    usr/share/man/man1/byobu.1: LP: #835152
    - fix a suite of support issues around launching byobu under sudo,
      where files/dirs would be created under the $SUDO_USER's $HOME,
      but would be owned by root
  * usr/lib/byobu/.dirs: LP: #833780
    - save a fork
 -- Dustin Kirkland <email address hidden> Tue, 23 Aug 2011 23:23:49 -0500

Changed in byobu (Ubuntu Oneiric):
status: Fix Committed → Fix Released
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.