Your message dated Sat, 6 Apr 2024 00:18:07 +0200
with message-id <d65f6ab5-e420-481f-9ac3-875566aa3...@svario.it>
and subject line Re: Bug#400046: bash: man page tells me "typeset +r" will undo 
a "typeset -r" but it doesn't
has caused the Debian Bug report #400046,
regarding bash: man page tells me "typeset +r" will undo a "typeset -r" but it 
doesn't
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 ow...@bugs.debian.org
immediately.)


-- 
400046: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=400046
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: bash
Version: 3.1dfsg-7
Severity: normal

"typeset -r" will make a variable readonly.  From bash(1):

                -r   Make names  readonly.  These names  cannot then be
                        assigned    values   by    subsequent   assignment
                        statements or unset.

The man page then goes on to say:

                Using  `+'  instead  of  `-' turns  off  the  attribute
                instead, with the exception that  +a may not be used to
                destroy an  array variable.

This means I should be able to "typeset +r" to undo the "-r", but it doesn't:

------------------------------------------------------------------------
(debian) chris@chrislap:~$ var=xxx
(debian) chris@chrislap:~$ echo $var
xxx
(debian) chris@chrislap:~$ typeset -r var
(debian) chris@chrislap:~$ var=yyy
bash: var: readonly variable
(debian) chris@chrislap:~$ typeset +r var
bash: typeset: var: readonly variable
(debian) chris@chrislap:~$ var=yyy
bash: var: readonly variable
(debian) chris@chrislap:~$ echo $var
xxx
------------------------------------------------------------------------

I don't know if this is a documentation bug or a bash bug, but one or
the other seems to be wrong here.





-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-2-vserver-686
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_GB.UTF-8)

Versions of packages bash depends on:
ii  base-files                   4           Debian base system miscellaneous f
ii  debianutils                  2.17.3      Miscellaneous utilities specific t
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  libncurses5                  5.5-5       Shared libraries for terminal hand

bash recommends no packages.

-- no debconf information


--- End Message ---
--- Begin Message ---
Version: 5.0-6

On Thu, 23 Nov 2006 17:51:35 +0100 Chris Moore <doog...@gmail.com> wrote:
"typeset -r" will make a variable readonly.  From bash(1):

                -r   Make names  readonly.  These names  cannot then be
                        assigned    values   by    subsequent   assignment
                        statements or unset.

The man page then goes on to say:

                Using  `+'  instead  of  `-' turns  off  the  attribute
                instead, with the exception that  +a may not be used to
                destroy an  array variable.

This means I should be able to "typeset +r" to undo the "-r", but it doesn't:

------------------------------------------------------------------------
(debian) chris@chrislap:~$ var=xxx
(debian) chris@chrislap:~$ echo $var
xxx
(debian) chris@chrislap:~$ typeset -r var
(debian) chris@chrislap:~$ var=yyy
bash: var: readonly variable
(debian) chris@chrislap:~$ typeset +r var
bash: typeset: var: readonly variable
(debian) chris@chrislap:~$ var=yyy
bash: var: readonly variable
(debian) chris@chrislap:~$ echo $var
xxx
------------------------------------------------------------------------

I don't know if this is a documentation bug or a bash bug, but one or
the other seems to be wrong here.

The documentation was incomplete. It now says:

Using `+' instead of `-' turns off the attribute instead, with the
exceptions that +a and +A may not be used to destroy array variables
and +r will not remove the readonly attribute.
Regards,

--
Gioele Barabucci

--- End Message ---

Reply via email to