[Groonga-commit] droonga/droonga-http-server at 6f6f6d9 [master] Disable EPEL by default

Back to archive index

HAYASHI Kentaro hayas****@clear*****
Wed Sep 17 10:02:57 JST 2014


On Tue, 16 Sep 2014 19:14:09 +0900
YUKI Hiroshi <null+****@clear*****> wrote:

> YUKI Hiroshi	2014-09-16 19:14:09 +0900 (Tue, 16 Sep 2014)
> 
>   New Revision: 6f6f6d9ea67105d5e434d30fb7c90b5c06221201
>   https://github.com/droonga/droonga-http-server/commit/6f6f6d9ea67105d5e434d30fb7c90b5c06221201
> 
>   Message:
>     Disable EPEL by default
> 
>   Modified files:
>     install.sh
> 
>   Modified: install.sh (+13 -7)
> ===================================================================
> --- install.sh    2014-09-16 18:54:56 +0900 (6e6f320)
> +++ install.sh    2014-09-16 19:14:09 +0900 (b9653fd)
> @@ -238,13 +238,19 @@ install_in_debian() {
>  }
>  
>  install_in_centos() {
> -  #TODO: We have to take care of a case when EPEL is already activated.
> -  #      If EPEL is not activated, we have to activate it temporally
> -  #      and disable it after installation.
> -  #      Otherwise we should not do anything around EPEL.
> -  yum -y update
> -  yum -y install epel-release
> -  yum -y install npm
> +  if [ $(yum repolist | grep epel | wc -l) -lt 1 ]; then
> +    # epel-release is not installed, so install it.
> +    yum -y install epel-release
> +    # however, we should disable it by default because.
> +    # the system administrator won't expect to use it
> +    # in his daily use.
> +    epel_repo=/etc/yum.repos.d/epel.repo
> +    backup=/tmp/$(basename $file).bak
> +    mv $epel_repo $backup
> +    cat $backup | $sed -e "s/enabled=1/enabled=0/" \
> +      > $epel_repo
> +  fi
> +  yum -y --enablerepo=epel install npm
>  
>    echo ""
>  

if [ ! rpm -q epel-release > /dev/null ]; then
     yum -y install epel-release
fi

パッケージの有無をチェックするなら↑とかどうでしょうか?
パッケージじゃなくて手で.repo書いているケースも救いたい意図ならダメですが。。。

-- 
HAYASHI Kentaro <hayas****@clear*****>




More information about the Groonga-commit mailing list
Back to archive index