Gentoo

From NetHackWiki
Revision as of 18:13, 29 January 2010 by Isnok (talk | contribs) (added some hints to fix gentoo problems with nethack, added bugtracker link)
Jump to navigation Jump to search

Gentoo is the GNU/Linux distribution that has the users that compile all of their own software. There are other such distributions, including Source Mage, but Gentoo is leading.

http://www.gentoo.org/

The command emerge nethack will probably give the latest version of NetHack to a Gentoo user, though it helps that 3.4.3 has long been current. However, the online package database suggests that emerge slashem will continue to give you SLASH'EM 0.0.7E6F0, unless you request the unstable build for 0.0.7E7F2. Gentoo does not seem to provide 0.0.7E7F3.

Though Gentoo facilitates certain customisations of the system, such as "Hardened Gentoo", if you want to build NetHack with your own selection of patches, you are probably better to do it manually than to go through their "Portage" system.

Perhaps a fortune cookie could read:

They say that Debian and Gentoo are the best at providing current versions of packages.

However, another one may read:

They say that "emerge --sync" may give you a broken system.

The emerge --sync command upgrades the scripts that build Gentoo packages to the latest version.

Since long, the ebuild games-roguelike/nethack is masked, and emerge commands tend to fail if emerge detects an installed ebuild that is masked. The problem can be solved by removing or commenting out the line

games-roguelike/nethack

in /usr/portage/profiles/package.mask (line number ~1203). One can also automate this using the post_sync hook, which is found in /etc/portage/bin. Adding for example the following line to /etc/portage/bin/post_sync will automatically unmask nethack after each sync:

sed -i.bak 's&^\(games-roguelike/nethack\)$&# \1&' /usr/portage/profiles/package.mask

To find out why nethack is masked have a look at the gentoo bug tracker [1].