{"id":161,"date":"2009-04-07T14:31:36","date_gmt":"2009-04-07T20:31:36","guid":{"rendered":"http:\/\/www.goodjobsucking.com\/?p=161"},"modified":"2009-04-07T14:31:36","modified_gmt":"2009-04-07T20:31:36","slug":"stupid-gentoo-tricks","status":"publish","type":"post","link":"http:\/\/www.goodjobsucking.com\/?p=161","title":{"rendered":"Stupid Gentoo Tricks"},"content":{"rendered":"<p>What initially attracted me to Gentoo is its sometimes-elegant portage system, which is Gentoo&#8217;s version of a package manager &#8212; one of the things that distinguishes Linux flavors from one another.<\/p>\n<p>Portage suffers from a sort of chicken-egg conundrum in that portage and all of its files and dependencies are <em>themselves<\/em> managed by portage, which means that upgrading libraries that everything relies upon can quickly lead to a system where portage becomes inoperative.<\/p>\n<p>Recently, I managed to mangle &#8220;wget&#8221; by deinstalling a library it relied upon.\u00a0 This is difficult to recover from since wget is essential to portage&#8217;s ability to install packages &#8230; such as wget and the libraries it requires.\u00a0 I also discovered that an ftp client is not installed by default, which is surprising, but effectively ruled out just copying a working wget from another system.<\/p>\n<p>As it turns out, the default Gentoo installation <em>does<\/em> include busybox, which is theoretically less functional, but will do the trick.\u00a0 For those unfamiliar with busybox, it&#8217;s essentially one binary that contains (and is capable of replacing) a number of tiny command line functions, from cp and cat to rm and xargs.\u00a0 If you have it installed, typing &#8220;busybox&#8221; will tell you exactly what command line tools it can replace.<\/p>\n<p>Therefore, it&#8217;s possible to [re]install wget by telling portage to use busybox&#8217;s wget instead of wget itself:<\/p>\n<p><code><br \/>\nFETCHCOMMAND=\"\/bin\/busybox wget \\${URI} -P \\${DISTDIR}\" emerge wget<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What initially attracted me to Gentoo is its sometimes-elegant portage system, which is Gentoo&#8217;s version of a package manager &#8212; one of the things that distinguishes Linux flavors from one another. Portage suffers from a sort of chicken-egg conundrum in that portage and all of its files and dependencies are \u2026 <a class=\"continue-reading-link\" href=\"http:\/\/www.goodjobsucking.com\/?p=161\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[79,77,75,78,76],"_links":{"self":[{"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=\/wp\/v2\/posts\/161"}],"collection":[{"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=161"}],"version-history":[{"count":1,"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=\/wp\/v2\/posts\/161\/revisions"}],"predecessor-version":[{"id":162,"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=\/wp\/v2\/posts\/161\/revisions\/162"}],"wp:attachment":[{"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=161"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodjobsucking.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}