#6 make ncurses optional, move to common
Merged 3 years ago by kdudka. Opened 3 years ago by cyberpear.
rpms/ cyberpear/coreutils fix-ncurses-dep  into  master

file modified
+1 -1
@@ -15,7 +15,7 @@ 

  set COLORS=/etc/DIR_COLORS

  

  if ($?TERM) then

-   if ( -e "/etc/DIR_COLORS.256color" ) then

+   if ( -e "/etc/DIR_COLORS.256color" && -e "/usr/bin/tput" ) then

      if ( "`/usr/bin/tput colors`" == "256" ) then

         set COLORS=/etc/DIR_COLORS.256color

      endif

file modified
+6 -2
@@ -1,7 +1,7 @@ 

  Summary: A set of basic GNU tools commonly used in shell scripts

  Name:    coreutils

  Version: 8.32

- Release: 6%{?dist}

+ Release: 7%{?dist}

  License: GPLv3+

  Url:     https://www.gnu.org/software/coreutils/

  Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
@@ -94,7 +94,6 @@ 

  %endif

  

  Requires: %{name}-common = %{version}-%{release}

- Requires: ncurses

  

  Provides: coreutils-full = %{version}-%{release}

  %include %{SOURCE51}
@@ -125,6 +124,7 @@ 

  # yum obsoleting rules explained at:

  # https://bugzilla.redhat.com/show_bug.cgi?id=1107973#c7

  Obsoletes: %{name} < 8.24-100

+ Recommends: ncurses

  Summary:  coreutils common optional components

  %description common

  Optional though recommended components,
@@ -266,6 +266,10 @@ 

  %license COPYING

  

  %changelog

+ * Fri Jun 26 2020 James Cassell <cyberpear@fedoraproject.org> - 8.32-7

+ - move ncurses to -common package since it's needed for colorls.sh

+ - make ncurses optional

+ 

  * Fri May 15 2020 Kamil Dudka <kdudka@redhat.com> - 8.32-6

  - compile with -Dlint to enable optional initialization and cleanup code

  

ncurses is used only by the colorls.{c,}sh script ( https://bugzilla.redhat.com/show_bug.cgi?id=469277 ) which got moved to the coreutils-common package, leaving its ncurses dep behind on the coreutils main package.

This PR fixes that, and also tweaks the colorls.csh script so we can downgrade the ncurses dep to a "Recommends". (The colorls.sh script already gracefully handled absence of the tput command.)

Pull-Request has been merged by kdudka

3 years ago