← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1073077] Re: zsh complains about locale_warn on launch

 

This bug was fixed in the package cloud-init - 0.6.3-0ubuntu1.3

---------------
cloud-init (0.6.3-0ubuntu1.3) precise-proposed; urgency=low

  * debian/patches/lp-1070345-landscape-restart-after-change.patch,
    debian/patches/lp-1066115-landscape-install-fix-perms.patch:
    fix missing or incorrect imports (LP: #1070345, LP: #1066115).

cloud-init (0.6.3-0ubuntu1.2) precise-proposed; urgency=low

  * debian/patches/lp-978127-maas-oauth-fix-bad-clock.patch: fix usage of
    oauth in maas data source if local system has a bad clock (LP: #978127)
  * debian/cloud-init.preinst: fix bug where user data scripts re-ran on
    upgrade from 10.04 versions (LP: #1049146)
  * debian/patches/lp-974509-detect-dns-server-redirection.patch: detect dns
    server redirection and disable searching dns for a mirror named
    'ubuntu-mirror' (LP: #974509)
  * debian/patches/lp-1018554-shutdown-message-to-console.patch: write a
    message to the console on system shutdown. (LP: #1018554)
  * debian/patches/lp-1066115-landscape-install-fix-perms.patch: install
    landscape package if needed which will ensure proper permissions on config
    file (LP: #1066115).
  * debian/patches/lp-1070345-landscape-restart-after-change.patch: restart
    landscape after modifying config (LP: #1070345)
  * debian/patches/lp-1073077-zsh-workaround-for-locale_warn.patch: avoid
    warning when user's shell is zsh (LP: #1073077)
  * debian/patches/rework-mirror-selection.patch: improve mirror selection by:
    * allowing region/availability-zone to be part of mirror (LP: #1037727)
    * making mirror selection arch aware (LP: #1028501)
    * allow specification of a security mirror (LP: #1006963)
 -- Scott Moser <smoser@xxxxxxxxxx>   Thu, 13 Dec 2012 12:16:56 -0500

** Changed in: cloud-init (Ubuntu Precise)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1073077

Title:
  zsh complains about locale_warn on launch

Status in Init scripts for use on cloud images:
  Fix Released
Status in “cloud-init” package in Ubuntu:
  Fix Released
Status in “zsh” package in Ubuntu:
  New
Status in “cloud-init” source package in Precise:
  Fix Released
Status in “cloud-init” source package in Quantal:
  Fix Released

Bug description:
  == SRU Information ==
  [Impact] 
   * Users who select zsh as shell and invoke /etc/profile.d scripts
     see an error message like:
      locale_warn:13: * not found
   * This contained fix makes that error message go away, and makes
     the Z99-cloud-locale-test.sh script in /etc/profile.d function
     properly with zsh.
   * The fix adds new code to run 'emulate -L sh' if and only if the variable
     ZSH_NAME is defined (which is only likely to be true if shell is zsh).
     Per zshbuiltins(1), '-L' to 'emulate' indicates that the change in
     behavior should be limited to the containing function.

  [Test Case]
   * launch cloud-image instance, get IP address and set 'IP' for use below.
   * install zsh, change the 'ubuntu' user's shell
       LC_ALL=en_US.UTF-8 ssh ubuntu@$IP \
          "sudo DEBIAN_FRONTEND=noninteractive apt-get install -y zsh"
   * problem is then reproduced with:
       LC_ALL=fr_FR.UTF-8 zsh /etc/profile.d/Z99-cloud-locale-test.sh
     Instead of seeing a message about invalid locale and how to fix it, the
     user will see:
       locale_warn:13: * not found

  [Regression Potential] 
   * chance for regression is low, since the only real change is contained
     with a condition that will limit it to the case where the shell is zsh.
   * If there was fallout, it would one of:
     * 'emulate -L' being run with non-zsh shell, likely resulting in an error
       message but nothing worse.
     * user's zsh shell being changed to 'emulate sh' (if the '-L' did not
       get applied correctly)

  == End SRU Information ==

  
  zsh complains if an '=' occurs in a suffix or prefix shell parameter expansion.

    $ sh -c 'f="foo=bar"; echo ${f%%=*}'
    foo
    $ bash -c 'f="foo=bar"; echo ${f%%=*}'
    foo
    $ zsh -c 'f="foo=bar"; echo ${f%%=*}'
    zsh:1: * not found

  It is work-aroundable by escaping the '=' in the shell suffix match with a '\'. Ie:
    $ zsh -c 'f="foo=bar"; echo ${f%%\=*}'
    foo

  == original bug report ==

  After upgrading my Amazon machine to Ubuntu 12.04, every time I run zsh I get the following output:
      locale_warn:13: * not found

  Apparenlty this is caused by the file /etc/profile.d/Z99-cloud-locale-
  test.sh in the cloud-init package. zsh always outputs an error when a
  glob like * fails to match any files.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: cloud-init 0.6.3-0ubuntu1
  ProcVersionSignature: Ubuntu 3.2.0-32.51-virtual 3.2.30
  Uname: Linux 3.2.0-32-virtual i686
  ApportVersion: 2.0.1-0ubuntu14
  Architecture: i386
  Date: Tue Oct 30 11:03:46 2012
  Ec2AMI: ami-fb9ca98f
  Ec2AMIManifest: (unknown)
  Ec2AvailabilityZone: eu-west-1c
  Ec2InstanceType: c1.medium
  Ec2Kernel: aki-4deec439
  Ec2Ramdisk: unavailable
  PackageArchitecture: all
  ProcEnviron:
   TERM=xterm
   PATH=(custom, user)
   LANG=en_GB.UTF-8
   SHELL=/usr/bin/zsh
  SourcePackage: cloud-init
  UpgradeStatus: Upgraded to precise on 2012-10-29 (0 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1073077/+subscriptions