Gentooでソフトウェアをインストール時に「have been masked」と言われた時の対応

Gentooでソフトウェアをインストール時に「have been masked」と言われたときの対応方法について記載します。

実際の現象

「dev-haskell/wxdirect」というwxHaskellのソフトウェアをインストールしようと思い、

```
emerge dev-haskell/wxdirect
```
としたところ、下記エラーが発生しました。

```
!!! All ebuilds that could satisfy "dev-haskell/wxdirect" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-haskell/wxdirect-0.92.3.0-r1::gentoo (masked by: ~amd64 keyword)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
```

「gentoo have been masked」で検索してみると下記ページが見つかりました。
[https://wiki.gentoo.org/wiki/Knowledge_Base:Accepting_a_keyword_for_a_single_package](https://wiki.gentoo.org/wiki/Knowledge_Base:Accepting_a_keyword_for_a_single_package)  

どうやらテスト中のソフトウェアはキーワードによって隠されている（マスクされている）らしいです。

インストールするソフトウェアの危険性を容認する場合は下記コマンドでマスクを解除できます。

```
emerge --ask --autounmask=y --autounmask-write [ソフトウェア名]
```

上記の場合なら

```
emerge --ask --autounmask=y --autounmask-write dev-haskell/wxdirect
```
でマスクを解除できます。
上記の場合、実行すると次のようになります。途中「Yes」で実行を継続しています。

```
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ~] dev-lang/ghc-8.10.4  USE="gmp (-big-endian) -binary -doc -elfutils -ghcbootstrap -ghcmakebinary -numa -profile -test"
[ebuild  N    ~] app-admin/haskell-updater-1.3.2
[ebuild  N    ~] dev-haskell/text-1.2.4.1_rc1  USE="-doc -hscolour -profile"
[ebuild  N    ~] dev-haskell/mtl-2.2.2  USE="-doc -hscolour -profile"
[ebuild  N    ~] dev-haskell/fail-4.9.0.0  USE="-profile"
[ebuild  N    ~] dev-haskell/transformers-0.5.6.2  USE="-doc -hscolour -profile"
[ebuild  N    ~] dev-haskell/binary-0.8.7.0  USE="-doc -hscolour -profile"
[ebuild  N    ~] dev-haskell/hashable-1.2.7.0  USE="gmp -doc -examples -hscolour -profile" CPU_FLAGS_X86="sse2 -sse4_1"
[ebuild  N    ~] dev-haskell/transformers-compat-0.6.6  USE="-doc -hscolour -profile"
[ebuild  N    ~] dev-haskell/nats-1.1.2  USE="binary hashable template-haskell -profile"
[ebuild  N    ~] dev-haskell/tagged-0.8.6  USE="-doc -hscolour -profile"
[ebuild  N    ~] dev-haskell/unordered-containers-0.2.12.0  USE="-debug -doc -hscolour -profile"
[ebuild  N    ~] dev-haskell/semigroups-0.18.5  USE="binary transformers -doc -hscolour -profile"
[ebuild  N    ~] dev-haskell/parsec-3.1.14.0  USE="-doc -hscolour -profile"
[ebuild  N    ~] dev-haskell/cabal-3.2.1.0-r1  USE="-doc -hscolour -profile"
[ebuild  N    ~] dev-haskell/strict-0.3.2-r1  USE="-doc -hscolour -profile"
[ebuild  N    ~] dev-haskell/wxdirect-0.92.3.0-r1  USE="-doc -hscolour -profile"

The following keyword changes are necessary to proceed:
 (see "package.accept_keywords" in the portage(5) man page for more details)
# required by dev-haskell/semigroups-0.18.5::gentoo
# required by dev-haskell/parsec-3.1.14.0::gentoo
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/unordered-containers-0.2.12.0 ~amd64
# required by dev-haskell/nats-1.1.2::gentoo[hashable]
# required by dev-haskell/semigroups-0.18.5::gentoo
# required by dev-haskell/parsec-3.1.14.0::gentoo
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/hashable-1.2.7.0 ~amd64
# required by dev-haskell/semigroups-0.18.5::gentoo[transformers]
# required by dev-haskell/parsec-3.1.14.0::gentoo
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/transformers-compat-0.6.6 ~amd64
# required by dev-haskell/wxdirect (argument)
=dev-haskell/wxdirect-0.92.3.0-r1 ~amd64
# required by dev-haskell/transformers-compat-0.6.6::gentoo
# required by dev-haskell/tagged-0.8.6::gentoo
# required by dev-haskell/semigroups-0.18.5::gentoo
# required by dev-haskell/parsec-3.1.14.0::gentoo
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/fail-4.9.0.0 ~amd64
# required by dev-haskell/semigroups-0.18.5::gentoo
# required by dev-haskell/parsec-3.1.14.0::gentoo
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/nats-1.1.2 ~amd64
# required by dev-haskell/transformers-compat-0.6.6::gentoo
# required by dev-haskell/tagged-0.8.6::gentoo
# required by dev-haskell/semigroups-0.18.5::gentoo
# required by dev-haskell/parsec-3.1.14.0::gentoo
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/transformers-0.5.6.2 ~amd64
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/parsec-3.1.14.0 ~amd64
# required by dev-haskell/semigroups-0.18.5::gentoo
# required by dev-haskell/parsec-3.1.14.0::gentoo
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/tagged-0.8.6 ~amd64
# required by dev-haskell/parsec-3.1.14.0::gentoo
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/semigroups-0.18.5 ~amd64
# required by dev-haskell/text-1.2.4.1_rc1::gentoo
# required by dev-haskell/hashable-1.2.7.0::gentoo
# required by dev-haskell/nats-1.1.2::gentoo[hashable]
# required by dev-haskell/semigroups-0.18.5::gentoo
# required by dev-haskell/parsec-3.1.14.0::gentoo
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-lang/ghc-8.10.4 ~amd64
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/cabal-3.2.1.0-r1 ~amd64
# required by dev-haskell/nats-1.1.2::gentoo[binary]
# required by dev-haskell/semigroups-0.18.5::gentoo
# required by dev-haskell/parsec-3.1.14.0::gentoo
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/binary-0.8.7.0 ~amd64
# required by dev-haskell/parsec-3.1.14.0::gentoo
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/text-1.2.4.1_rc1 ~amd64
# required by dev-lang/ghc-8.10.4::gentoo[-ghcbootstrap]
# required by dev-haskell/fail-4.9.0.0::gentoo
# required by dev-haskell/transformers-compat-0.6.6::gentoo
# required by dev-haskell/tagged-0.8.6::gentoo
# required by dev-haskell/semigroups-0.18.5::gentoo
# required by dev-haskell/parsec-3.1.14.0::gentoo
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=app-admin/haskell-updater-1.3.2 ~amd64
# required by dev-haskell/transformers-compat-0.6.6::gentoo
# required by dev-haskell/tagged-0.8.6::gentoo
# required by dev-haskell/semigroups-0.18.5::gentoo
# required by dev-haskell/parsec-3.1.14.0::gentoo
# required by dev-haskell/cabal-3.2.1.0-r1::gentoo
# required by dev-haskell/strict-0.3.2-r1::gentoo
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/mtl-2.2.2 ~amd64
# required by dev-haskell/wxdirect-0.92.3.0-r1::gentoo
# required by dev-haskell/wxdirect (argument)
=dev-haskell/strict-0.3.2-r1 ~amd64

Would you like to add these changes to your config files? [Yes/No] Yes

Autounmask changes successfully written.

 * IMPORTANT: config file '/etc/portage/package.accept_keywords' needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.
```
config fileのupdateが必要ということなので

```
etc-update
```
を実行します。
以下下記のとおり。途中「-3」を選択しています。

```
Scanning Configuration files...
The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
1) /etc/portage/package.accept_keywords (1)
Please select a file to edit by entering the corresponding number.
              (don't use -3, -5, -7 or -9 if you're unsure what to do)
              (-1 to exit) (-3 to auto merge all files)
                           (-5 to auto-merge AND not use 'mv -i')
                           (-7 to discard all updates)
                           (-9 to discard all updates AND not use 'rm -i'): -3
Replacing /etc/portage/package.accept_keywords with /etc/portage/._cfg0000_package.accept_keywords
Exiting: Nothing left to do; exiting. :)
```
あらためてソフトウェアのインストールを実行します。

```
emerge dev-haskell/wxdirect
```
以上