# GF5: What are masked packages?

## rac

Navigation: [Gentoo Fundamentals] [Table of Contents]

GF5A: Masked by keyword.

KEYWORDS are a way to seperate stable ebuilds from testing ebuilds or ebuilds that simply do not work.  For each architecture (x86, ppc, sparc, sparc64, alpha, amd64, ...), an ebuild may be marked '-arch', meaning "does not work", '~arch', meaning "testing", or 'arch', meaning "stable".  You can set your level of tolerance for testing ebuilds by defining ACCEPT_KEYWORDS in /etc/make.conf - for example, ACCEPT_KEYWORDS="~x86" will accept testing packages on the x86 architecture.  By default, your profile is set to accept stable packages only.  ACCEPT_KEYWORDS can also be set on the command line for testing packages.  For example, 

```
ACCEPT_KEYWORDS="~x86" emerge -pv unstablepackage
```

 Make sure not to put spaces around the '='. Please don't use ACCEPT_KEYWORDS on the command line to actually emerge packages as this might seriously confuse portage about your settings for ACCEPT_KEYWORDS.

As described in the portage man page, as of Portage 2.0.50, you can make an entry in /etc/portage/package.keywords to have per-package keyword acceptance. This is the preferred way to mix   stable and testing packages on a system. This would look like: 

```
category/package ~arch
```

 or even more simple just 

```
category/package
```

 without ~arch.

If you are generally accepting ~arch in your make.conf, and want to make an exception for a particular package, so that only arch packages are considered, the syntax is a bit obscure: 

```
category/package -~arch arch
```

To get an overview of what versions of a package are available, you can use the "equery" command, which is included in the gentoolkit package.  For example: 

```
equery list -p package
```

*note-to also include custom ebuilds residing in your Portage Overlay add "-o" to the options.

Credits: TRauMa suggested the sample command line override.

2005-06-19: Rewrite mostly by curtis119

----------

## curtis119

Navigation: [Gentoo Fundamentals] [Table of Contents]

GF5B: Masked by package.mask (hard masked)

Hard masked packages are not supported by Gentoo. Support requests involving a masked package will NOT be answered. Use them at your own risk.

Hard masked packages will not be installed on your system unless you take specific actions. They do exist in the Portage tree and you can use them if you are testing or trying to fix bugs or simply want to try them out.

Packages are hard masked in the file "/usr/portage/profiles/package.mask"

A package will be hard masked by it's maintainer for several reasons. Some of these reasons include (but are not limited to):

experimental ebuilds

packages that have a known unfixed bug

ebuilds that are dependant on unavailable software

ebuilds that will break or are incompatible with the current tree

ebuilds that have an unfixed security vulnerability

builds that are "in-progress" such as Gnome or KDE major version updates

If you want to use one of these hard masked packages first look in the package.mask file to see why the package was hard masked and if it is something you may be interested in merging to your system. Remember, these packages can and will break your system so be very sure you know what you are doing.

Unmasking a package is simple. In the file "/etc/portage/package.unmask" add the exact same line for the package that exists in "/usr/portage/profiles/package.mask". For instance, if package =app-sys/foo-1.3 is hard masked simply add it to package.unmask:

```
=app-sys/foo-1.3
```

You can also mask a package in the same way in the file "/etc/portage/package.mask". For instance, if you are happy with your present kernel, gentoo-sources-2.6.11, and do not want Portage to download and install any new kernel packages add it to package.mask like this:

```
>sys-kernel/gentoo-sources-2.6.11
```

Useful operators include =, <=, <, >, >=. More details and other possibilities can be found in the man pages portage and ebuild (5).

----------

