[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#473857: marked as done (tzdata.postinst fails when TZ is not in the environment)



Your message dated Wed, 02 Apr 2008 20:42:36 +0200
with message-id <47F3D39C.2050702@aurel32.net>
and subject line Re: Bug#473857: tzdata.postinst fails when TZ is not in the environment
has caused the Debian Bug report #473857,
regarding tzdata.postinst fails when TZ is not in the environment
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
473857: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473857
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: tzdata
Version: 2008b-1
Severity: important

If I do not have TZ in my environment, then the postinst fails. It has an unprotected "unset TZ", which will fail the script if TZ is not actually in the environment.

The simple fix is to use "|| true" in the 2 places where this occurs.



--- End Message ---
--- Begin Message ---
Adam Heath a écrit :
> Aurelien Jarno wrote:
>> Adam Heath a écrit :
>>> Package: tzdata
>>> Version: 2008b-1
>>> Severity: important
>>>
>>> If I do not have TZ in my environment, then the postinst fails.  It
>>> has an unprotected "unset TZ", which will fail the script if TZ is
>>> not actually in the environment.
>>
>> Huh?!? Which strange shell are you using?
>>
>>> The simple fix is to use "|| true" in the 2 places where this occurs.
>>
>> That's a wrong fix. The correct one is to fix your shell.
> 
> No, the correct fix is to fix the dependencies, and/or fix your shell
> script.  Garbage in, garbage out and all.

POSIX is clear about that:

| Unsetting a variable or function that was not previously set shall not
| be considered an error and does not cause the shell to abort.

> Bash 2.x returns false if you try to unset a non-existance variable.

That's unreproducible with bash from Sarge.

> Bash 3.x returns true.
> 
> So, either add the || true, or add a versioned depends on bash.  I
> prefer the former, 'cuz it won't increase the dependency graph size.
> 

Bash 2.x is only available in Sarge, not in Etch. Anyway we don't
support direct upgrades from Sarge to Lenny. Closing the bug.

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net


--- End Message ---

Reply to: