Difference between revisions of "Gentoo"

From NetHackWiki
Jump to navigation Jump to search
m
(Gentoo's official solution is to use package.unmask, works better, no post_sync magic needed. Edited to reflect that.)
Line 5: Line 5:
 
The command <tt>emerge nethack</tt> 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 <tt>emerge slashem</tt> 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.
 
The command <tt>emerge nethack</tt> 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 <tt>emerge slashem</tt> 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 [[patch]]es, you are probably better to do it manually than to go through their "Portage" system.
+
Though Gentoo facilitates certain customisations of the system, such as "Hardened Gentoo", if you want to build NetHack with your own selection of [[patch]]es, you are probably better to do it manually than to go through their "Portage" system, unless you want to generate your own ebuild (configure and build script).
  
 
Perhaps a fortune cookie could read:
 
Perhaps a fortune cookie could read:
Line 15: Line 15:
 
: <tt>They say that "emerge --sync" may give you a broken system.</tt>
 
: <tt>They say that "emerge --sync" may give you a broken system.</tt>
  
The <tt>emerge --sync</tt> command upgrades the scripts that build Gentoo packages to the latest version. This also includes the list of masked packages. Since the ebuild <tt>games-roguelike/nethack</tt> is masked, further <tt>emerge</tt> commands tend to fail, because <tt>emerge</tt> detects an installed ebuild that is masked. The problem can be solved by removing or commenting out the line
+
The <tt>emerge --sync</tt> command upgrades the scripts that build Gentoo packages to the latest version. This also includes the list of masked packages. Since the ebuild <tt>games-roguelike/nethack</tt> is masked, further <tt>emerge</tt> commands tend to fail, because <tt>emerge</tt> detects an installed ebuild that is masked. The problem can be solved by inserting the line
  
 
: <tt>games-roguelike/nethack</tt>
 
: <tt>games-roguelike/nethack</tt>
  
in <tt>/usr/portage/profiles/package.mask</tt> (line number ~1203) after each sync. It can also be automated using portage's <tt>post_sync</tt> hook, which is found in <tt>/etc/portage/bin</tt>. Adding for example the following line to <tt>/etc/portage/bin/post_sync</tt> will automatically unmask nethack after each sync:
+
in <tt>/etc/portage/package.unmask</tt>. This approach is superior to removing it from <tt>/usr/portage/profiles/package.mask</tt>, since the contents of <tt>/etc/portage</tt> are not overwritten by <tt>emerge --sync</tt>. This same approach is effective for [[Sabayon Linux]] as well, since it's essentially a customized Gentoo.
  
: <tt>sed -i.bak 's&^\(games-roguelike/nethack\)$&# \1&' /usr/portage/profiles/package.mask</tt>
+
To find out why nethack (and SLASH'EM) are masked have a look at the Gentoo bug tracker [http://bugs.gentoo.org/125902].
 
 
To find out why nethack is masked have a look at the Gentoo bug tracker [http://bugs.gentoo.org/125902].
 
 
[[Category:Development]]
 
[[Category:Development]]

Revision as of 18:58, 29 January 2010

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, unless you want to generate your own ebuild (configure and build script).

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. This also includes the list of masked packages. Since the ebuild games-roguelike/nethack is masked, further emerge commands tend to fail, because emerge detects an installed ebuild that is masked. The problem can be solved by inserting the line

games-roguelike/nethack

in /etc/portage/package.unmask. This approach is superior to removing it from /usr/portage/profiles/package.mask, since the contents of /etc/portage are not overwritten by emerge --sync. This same approach is effective for Sabayon Linux as well, since it's essentially a customized Gentoo.

To find out why nethack (and SLASH'EM) are masked have a look at the Gentoo bug tracker [1].