[ 
https://issues.apache.org/jira/browse/HADOOP-19758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18068890#comment-18068890
 ] 

ASF GitHub Bot commented on HADOOP-19758:
-----------------------------------------

deepujain opened a new pull request, #8387:
URL: https://github.com/apache/hadoop/pull/8387

   Summary
   Avoid invoking `tput` when it is not installed, so Hadoop shell usage 
formatting works on minimal distros without ncurses.
   
   Change
   - `hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh`: 
guard the terminal-width probe with `command -v tput` and fall back cleanly to 
the default width.
   - 
`hadoop-common-project/hadoop-common/src/test/scripts/hadoop_subcommands.bats`: 
add a regression for the missing-`tput` path.
   
   JIRA
   Fixes HADOOP-19758
   




> Hadoop shell scripts rely on ncurses in some distros
> ----------------------------------------------------
>
>                 Key: HADOOP-19758
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19758
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Edward Capriolo
>            Priority: Major
>
>  
> {code:java}
>   Client Commands:
> /opt/hadoop/bin/../libexec/hadoop-functions.sh: line 379: tput: command not 
> found
> archive-logs        combine aggregated logs into hadoop archives {code}
> From
> {code:java}
>   else                                    
>     numcols=$(tput cols) 2>/dev/null              
> - /opt/hadoop/bin/../libexec/hadoop-functions.sh [Readonly] 379/2774 13% 
> {code}
> In
> [Alpine Linux|https://www.alpinelinux.org/], the {{tput}} command is part of 
> the *{{ncurses}}* package and is not installed by default. The {{tput}} 
> utility is used by shell scripts to control terminal features like colors and 
> text positioning in a portable way
> Possibly consider removing this from shell scripts. 
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to