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

Bug#490605: marked as done (debian-policy: please discourage the usage of echo -n, and echo in general)



Your message dated Fri, 11 Aug 2017 12:44:51 -0700
with message-id <87o9rlx51o.fsf@iris.silentflame.com>
and subject line Closing inactive Policy bugs
has caused the Debian Bug report #490605,
regarding debian-policy: please discourage the usage of echo -n, and echo in general
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.)


-- 
490605: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=490605
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: debian-policy
Version: 3.0.8.1
Severity: wishlist

As demonstrated by the following trivia[1], and also mentioned by SUSv3, the 
echo built-in varies from implementation to implementation and thus should be 
discouraged.

8<---trivia-starts-here--->8
$ ./echo-trivia.sh
++ bash
+ o='Foo:\n\tI do not like bar!!\n\nBar:\n\tI do not like you either'
+ set +x
++ dash
+ o='Foo:
        I do not like bar!!

Bar:
        I do not like you either'
+ set +x
++ ksh
+ o='Foo:\n\tI do not like bar!!\n\nBar:\n\tI do not like you either'
+ set +x
++ zsh
+ o='Foo:
        I do not like bar!!

Bar:
        I do not like you either'
+ set +x
++ posh
+ o='Foo:
        I do not like bar!!

Bar:
        I do not like you either'
+ set +x
++ pdksh
+ o='Foo:
        I do not like bar!!

Bar:
        I do not like you either'
+ set +x
++ mksh
+ o='Foo:
        I do not like bar!!

Bar:
        I do not like you either'
+ set +x
++ busybox sh
+ o='Foo:\n\tI do not like bar!!\n\nBar:\n\tI do not like you either'
+ set +x
==Trivia results==
Shells tested: 8
Shells expandind backslashes: 5
/bin/echo does NOT expand
8<---trivia-ends-here--->8

Additionally, the usage of echo -n should also be discouraged because it may 
not help stressing the idea of echo not being portable.

Finally, completely OT but I don't believe it warrants yet another bug report, 
the following line should also mention the [ built-in and not just test:

> test, if implemented as a shell built-in, must support -a and -o as binary
> logical operators.


[1] The script basically prints some text with 'echo' which containing 
backslashes and checks whether the backslashes were expanded or not.

Kind regards,
-- 
Atomo64 - Raphael

Please avoid sending me Word, PowerPoint or Excel attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

Attachment: signature.asc
Description: This is a digitally signed message part.


--- End Message ---
--- Begin Message ---
control: user debian-policy@packages.debian.org
control: usertag -1 +obsolete
control: tag -1 +wontfix

Russ Allbery and I did a round of in-person bug triage at DebConf17 and
we are closing this bug as inactive.

The reasons for closing fall into the following categories, from most
frequent to least frequent:

- issue is appropriate for Policy, there is a consensus on how to fix
  the problem, but preparing the patch is very time-consuming and no-one
  has volunteered to do it, and we do not judge the issue to be
  important enough to keep an open bug around;

- issue is appropriate for Policy but there does not yet exist a
  consensus on what should change, and no recent discussion.  A fresh
  discussion might allow us to reach consensus, and the messages in the
  old bug are unlikely to help very much; or

- issue is not appropriate for Policy.

If you feel this bug is still relevant and want to restart the
discussion, you can re-open the bug.  However, please consider instead
opening a new bug with a message that summarises and condenses the
previous discussion, updates the report for the current state of Debian,
and makes clear exactly what you think should change.

A lot of these old bugs have long side tangents and numerous messages,
and that old discussion is not necessarily helpful for figuring out what
Debian Policy should say today.

-- 
Sean Whitton

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply to: