<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>numerodix blog &#187; gentoo</title>
	<atom:link href="http://www.matusiak.eu/numerodix/blog/index.php/category/techno-babble/gentoo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.matusiak.eu/numerodix/blog</link>
	<description>A blog about nothing</description>
	<lastBuildDate>Sun, 12 Feb 2012 18:25:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>a critical look at paludis</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2008/01/23/a-critical-look-at-paludis/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2008/01/23/a-critical-look-at-paludis/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 12:05:21 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[gentoo]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/index.php/2008/01/23/a-critical-look-at-paludis/</guid>
		<description><![CDATA[I&#8217;ve been meaning to scribble something about paludis for a while now. I was tempted to do that right after I started using it, but then I thought it would be better to get some perspective and that would also cover issues that may come up some months into actual use.
So the moment has come. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been meaning to scribble something about paludis for a while now. I was tempted to do that right after I started using it, but then I thought it would be better to get some perspective and that would also cover issues that may come up some months into actual use.</p>
<p>So the moment has come. I installed paludis sometime in mid-November 2007. Long before that it was announced portage compatible, so it should be safe enough. Migration is neither all that long nor that complicated, it&#8217;s mostly a matter of getting used to paludis&#8217;s different philosophy. One of the odd things is setting up repositories (overlays) in <code>/etc/paludis/repositories</code>, but it&#8217;s easy enough.</p>
<p>From a portage user&#8217;s perspective configuring paludis is not the most pleasant experience. <a href="http://paludis.pioto.org/">The documentation</a> is quite complete, but it really demands that you know exactly what you want. There aren&#8217;t any texts to read, it&#8217;s generally just a FAQ. As far as user guides go it&#8217;s not the most friendly one:</p>
<blockquote><p>Non-Problem: There&#8217;s no <code>PORTAGE_NICENESS</code> equivalent.</p>
<p>Rationale: Learn how to use <code>nice</code>. There&#8217;s no <code>GCC_NICENESS</code> or <code>VIM_NICENESS</code> either.</p></blockquote>
<p>To me personally (although I&#8217;m sure I&#8217;m not alone in this), it is portage&#8217;s &#8220;rounded corners&#8221; that made it such a great package manager to use from the beginning. It had all this built-in convenience, like <code>PORTAGE_NICENESS</code>, like color output, like output that is verbose enough to be informative, but not overly verbose, like <code>make.conf</code> where you could set a range of optional, useful settings, like having <code>emerge --ask</code> which I would use all the time etc. Contrast that with something like <code>apt-get</code> and there&#8217;s absolutely no doubt what the nicer tool is. Perhaps this <em>bling</em> also undermines portage&#8217;s conceptual integrity, eventually turning it into an unmanageable codebase. But it&#8217;s also what made me <em>choose</em> gentoo: the fact that it had, as <a href="http://www.gentoo.org/main/en/philosophy.xml">it aspires to</a>, the best tool.</p>
<p>Now paludis is more puritanical about this. What that means in practice is that it pushes that burden onto you, the user. We don&#8217;t want it in paludis, so it&#8217;s now <em>your</em> problem. As evidenced by advice like this:</p>
<blockquote><p>Non-Problem: Paludis doesn&#8217;t restore the xterm title on exit.</p>
<p>Rationale: Neither does anything else. Some programs do set it to a guessed value based upon a default prompt for certain distributions, but they don&#8217;t restore it. You should be using <code>PROMPT_COMMAND</code> to do that yourself &#8212; see the <code>bash</code> documentation.</p></blockquote>
<p>So since paludis won&#8217;t do this for me, it&#8217;s now my problem to set in place the proper infrastructure for this, and to maintain it. It ceases to be a configuration option, it becomes a user environment issue. And I have to maintain this environment across machines, because it&#8217;s no longer part of the application. Paludis is a tool that is technically superior, but inferior on user friendliness.</p>
<p>Not having <code>FEATURES</code> also means that I have to set all these things on the command line:</p>
<blockquote><p> $ type ipal<br />
ipal is aliased to `paludis -i &#8211;dl-reinstall if-use-changed &#8211;debug-build none &#8211;log-level warning &#8211;continue-on-failure if-independent&#8217;</p></blockquote>
<p>And I&#8217;m still not sure if I&#8217;m setting all the optimal options, because there&#8217;s tons of them. (Yes, there is <code>PALUDIS_OPTIONS</code>, but I wonder if it&#8217;s useful to have different options on install, query etc.)</p>
<p>One serious usability problem is that paludis is ridiculously verbose. I wonder what kind of giant monitors the paludis developers own, but for my part paludis = lots of scrolling. Even running <code>paludis --help</code> has to be piped to <code>less</code> to refresh my memory on the most useful switches. What&#8217;s more, the most important output is always at the top, so I always have to scroll the longest distance. If you want to flood the screen, put the crucial bits at the bottom, that&#8217;s common sense. Case in point, if I&#8217;m installing packages and I do a <code>paludis --pretend</code>, I have to scroll up through all the use flags, then I come to the list of packages, but each package entry is several lines long, so by the time I get to the top I&#8217;m quite annoyed. The verbosity of paludis has to be easily 3-4 times that of portage.</p>
<p>Furthermore, default settings matter a great deal, and as a developer I think you are entirely culpable for setting poor defaults. On my first day with paludis I reached a show stopping bug when openssl refused to compile. As it turns out, it was the test suite that was broken, and since paludis by default runs the tests (or did, anyway), it just wouldn&#8217;t install. <code>SKIP_FUNCTIONS="test"</code> fixes this, but that was clearly a misguided default setting. But there are many examples of this. <code>--debug-build</code> is enabled by default, which I think is wrong because most gentoo users don&#8217;t actively debug *every* package they install. Meanwhile, these files take up quite a bit of space. Furthermore, coming back to the verbosity problem, <code>--log-level</code> is set to <code>qa</code>. This means that I, as a user, have seen this message every time I invoked paludis for the last two months:</p>
<blockquote><p> paludis@1200787359: [QA] In program inquisitio -s perl:<br />
&#8230; When performing query action from command line:<br />
&#8230; When handling query &#8216;php&#8217;:<br />
&#8230; When fetching versions of &#8216;dev-lang/php&#8217; in gentoo:<br />
&#8230; When loading versions for &#8216;dev-lang/php&#8217; in gentoo:<br />
&#8230; When extracting version from &#8216;/usr/portage/dev-lang/php/php-5.2.4_pre200708051230-r2.ebuild&#8217;:<br />
&#8230; When parsing version spec &#8216;5.2.4_pre200708051230-r2&#8242;:<br />
&#8230; Number part &#8216;200708051230&#8242; exceeds 8 digit limit permitted by the Package Manager Specification (Paludis supports arbitrary lengths, but other package managers do not)</p></blockquote>
<p>Not only is that a trifle of a bug, how exactly am I the user served by seeing this warning? I&#8217;m not a developer, so I couldn&#8217;t fix it if I wanted to. Furthermore, the irony of it all is that apparently paludis, which gracefully handles this problem, is the one emitting the error, whereas portage, which may actually be affected by it, doesn&#8217;t. A pure exercise in futility.</p>
<p>Installing packages also outputs chunks of lines that never seem to change with any package, output I have no need to see:</p>
<blockquote><p>&gt;&gt;&gt; Running ebuild phase prepare as root:root&#8230;<br />
&gt;&gt;&gt; Starting builtin_prepare<br />
&gt;&gt;&gt; Done builtin_prepare<br />
&gt;&gt;&gt; Completed ebuild phase prepare<br />
&gt;&gt;&gt; Running ebuild phases init saveenv as root:root&#8230;<br />
&gt;&gt;&gt; Starting builtin_init<br />
&gt;&gt;&gt; Done builtin_init<br />
&gt;&gt;&gt; Starting builtin_saveenv<br />
&gt;&gt;&gt; Done builtin_saveenv<br />
&gt;&gt;&gt; Completed ebuild phases init saveenv<br />
&gt;&gt;&gt; Running ebuild phases loadenv setup saveenv as root:root&#8230;<br />
&gt;&gt;&gt; Starting builtin_loadenv<br />
&gt;&gt;&gt; Done builtin_loadenv</p></blockquote>
<p>Is this supposed to be useful information for the user? I don&#8217;t even know what it means.</p>
<p>Clearly, there are a few glaring problems. And maybe that&#8217;s not so shocking from a development team that seems dead focused on technical issues. No surprise then, perhaps, that from a technical standpoint paludis fires on all cylinders. It took me a few days to get used to paludis, but since then it hasn&#8217;t done anything weird or unexpected, it hasn&#8217;t crashed, it has been rock solid. And those &#8220;issues&#8221; that may come up in the fullness of time? They never came up.</p>
<p>And this you already knew: paludis is fast.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2008/01/23/a-critical-look-at-paludis/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>bugs are better when fun</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2007/08/12/bugs-are-better-when-fun/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2007/08/12/bugs-are-better-when-fun/#comments</comments>
		<pubDate>Sun, 12 Aug 2007 21:37:43 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[gentoo]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/index.php/2007/08/12/bugs-are-better-when-fun/</guid>
		<description><![CDATA[Gentoo is fabled to be the maverick of a distro that blows up right, left and center. While I find that to be a gross exaggeration, it does occasionally crash in scary ways.   Although I don&#8217;t think it&#8217;s any worse than the others, upgrading Ubuntu from release to another is still broken (Edgy [...]]]></description>
			<content:encoded><![CDATA[<p>Gentoo is fabled to be the maverick of a distro that blows up right, left and center. While I find that to be a gross exaggeration, it does occasionally crash in scary ways. <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/smile.png' alt=':)' class='wp-smiley' />  Although I don&#8217;t think it&#8217;s any worse than the others, upgrading Ubuntu <a href="http://www.matusiak.eu/numerodix/blog/index.php/2007/02/01/upgrading-ubuntu-the-horror/">from release to another</a> is still broken (Edgy -&gt; Feisty, check), and last time I tried the Fedora upgrade cycle it was busted as well. Obviously, I wouldn&#8217;t be running Gentoo these last <a href="http://forums.gentoo.org/viewtopic-t-8671.html">five years</a> if it were as fragile as some people think. I actually find it the most sane distro in many ways.</p>
<p>But yesterday I must say I had quite a bit of fun with it. I keep to a fairly recent upgrade path, so I rarely fall behind more than a week. The <code>expat1-&gt;2</code> upgrade had been <a href="http://www.gryniewicz.com/dang/blog/?p=449">in the works</a> for some time, but the einfo flew by without me seeing it, as it often is. Interestingly, half the packages on the system depend on <code>expat</code>, and all of them were suddenly broken. The first thing I noticed was Firefox behaving odd.</p>
<p>Some things cannot readily be captured in a picture, an audio recording, or a video. Not even in a piece of text. A cool bug is one of those things. It has to be investigated, experimented upon, to understand the extent of it. I regret that I had no way to record this work of art for posterity. So Firefox was running happily along, as it had been doing for hours. Then at one point, I open a new tab and type <em>fa</em> in the location field to call up <em>facebook</em> from the drop down list. But I never got to <em>a</em>. Just as I hit <em>f</em> on the keyboard, Firefox crashed.</p>
<p>Of course, Firefox *does* love the crash, it crashes several times a day. But it almost always crashes over Adobe&#8217;s frightfully stable flash plugin. This was not one of those times, I didn&#8217;t have flash content in any of the open tabs. Well, never mind, it was probably a coincidence. So I start it up again, I get my tabs back, and again I open a new tab to load <em>facebook</em>. Again I never get to <em>a</em>. <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/biggrin.png' alt=':D' class='wp-smiley' />  Hm, this is starting to get interesting.</p>
<p>It turns out that a single key press would crash Firefox, but it didn&#8217;t have a problem with the mouse. And not just Firefox, any Gtk application. <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/cool.png' alt=':cool:' class='wp-smiley' />  At this point I was quite amused.</p>
<p>Not surprisingly, bugs are more fun when you have an idea what to do about them. I did track down the <code>expat</code> problem after some digging, but it made me recompile a boat load of packages. All of them seem to work again, although <code>revdep-rebuild</code> hadn&#8217;t been run for a while and exposed some other problems. One package that didn&#8217;t recover, however, was <code>digikam</code>. I&#8217;m back on <code>0.8.2-r1</code> after running <code>0.9.2</code> happily for weeks. Odd.</p>
<p>The moral is this: if you&#8217;re going to crash, find a fun way to crash. <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/party.png' alt=':party:' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2007/08/12/bugs-are-better-when-fun/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>planetary eyecandy</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2007/02/11/planetary-eyecandy/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2007/02/11/planetary-eyecandy/#comments</comments>
		<pubDate>Sun, 11 Feb 2007 17:00:11 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[gentoo]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/index.php/2007/02/11/planetary-eyecandy/</guid>
		<description><![CDATA[Eyecandy is somehow nicer when it serves some purpose aside from just looking pretty, wouldn&#8217;t you say? Then it has the same kind of effect as a great car or fine architecture. &#8220;Wow, it&#8217;s great. And it looks awesome.&#8221; Otherwise the appearance on its own seems a bit shallow and pointless.  Now for the [...]]]></description>
			<content:encoded><![CDATA[<p>Eyecandy is somehow nicer when it serves some purpose aside from just looking pretty, wouldn&#8217;t you say? Then it has the same kind of effect as a great car or fine architecture. &#8220;Wow, it&#8217;s great. And it looks awesome.&#8221; Otherwise the appearance on its own seems a bit shallow and pointless.  Now for the demo, here&#8217;s my newest wallpaper (click to see the fullsize hosted on deviantart):</p>
<p style="text-align: center"> <a href="http://www.deviantart.com/deviation/48548061/"><img src="http://www.matusiak.eu/numerodix/blog/wp-content/uploads/we_call_it_planet_earth_by_numerodix.jpg" alt="we_call_it_planet_earth_by_numerodix.jpg" /></a></p>
<p><span id="more-608"></span>If you&#8217;ve ever thought that having one particular image on your desktop gets a bit dull, then this may be something for you.  <strong>xplanet</strong> generates images of the Earth at set intervals (for example every 10 minutes) that shows the Earth roughly at this point in time. In addition, what I have here is cloud cover updated every 3 hours, so it&#8217;s like a weather map. xplanet is phenomenally flexible, it can render multiple bodies at the same time (for example the Earth and the moon), it renders stars, it renders all the planets in the Solar System (yes, Pluto too) and many more bodies. What I have is a pretty standard configuration.  So where to pick up the goodies? First, install <code>xplanet</code> (it&#8217;s in portage <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/smile.png' alt=':)' class='wp-smiley' />  ). Then if you run KDE, right click on the desktop and go into the config. On the <code>Background</code> tab, click <code>Advanced Options</code> and <code>xplanet</code> should appear in the list there.</p>
<p style="text-align: center"><img src="http://www.matusiak.eu/numerodix/blog/wp-content/uploads/xplanet_adv_opts.png" alt="xplanet_adv_opts.png" /></p>
<p>When you click <code>Modify...</code> xplanet will most likely have filled in the blanks for you, but otherwise something like this will do:</p>
<p style="text-align: center"><img src="http://www.matusiak.eu/numerodix/blog/wp-content/uploads/xplanet_params.png" alt="xplanet_params.png" /></p>
<p>The <code>Preview cmd</code> isn&#8217;t really important, but for <code>Command</code> you could use:</p>
<blockquote><p><code> xplanet -config ~/.xplanet.rc -radius 60 -latitude 52 -longitude 5 --geometry %xx%y --num_times 1 --output %f.jpg &amp;&amp; mv %f.jpg %f</code></p></blockquote>
<p>This will center the view on Utrecht more or less, but you can pick your own coordinates. Since we&#8217;ve supplied a configuration file, we have to create one.</p>
<blockquote><p><code>$ echo -e "[earth]\ncloud_map=/tmp/.xplanet/clouds_2048.jpg" &gt; ~/.xplanet.rc</code></p></blockquote>
<p>Now we want to rig up a system that will download updates of the cloud map when they are available. We&#8217;ve already declared that they should be written to <code>/tmp/.xplanet/clouds_2048.jpg</code>, so let&#8217;s create that path now.</p>
<blockquote><p><code>$ mkdir -p /tmp/.xplanet</code></p></blockquote>
<p>We&#8217;ll use <a href="http://xplanet.sourceforge.net//Extras/download_clouds.py">Michal Pasternak&#8217;s python script</a> for this. First save the file in <code>/usr/local/bin</code>, make it executable, then open it and edit this line:</p>
<blockquote><p><code>defaultOutputFile = "/tmp/.xplanet/clouds_2048.jpg"</code></p></blockquote>
<p>And finally we&#8217;re going to use our friend <code>cron</code> to execute the script every hour:</p>
<blockquote><p><code>$ crontab -e</code></p></blockquote>
<p>And add this line:</p>
<blockquote><p><code>0 * * * *       python /usr/local/bin/download_clouds.py &amp;&gt;/dev/null</code></p></blockquote>
<p>And that&#8217;s it. Now you have a totally kickass wallpaper. <img src='http://www.matusiak.eu/numerodix/blog/wp-includes/images/smilies/cool.png' alt=':cool:' class='wp-smiley' /> </p>
<p><strong>References</strong></p>
<ol style="font-size: 0.85em">
<li><a href="http://karbownicki.com/2007/02/09/go-planet/">Tomasz Karbownicki&#8217;s original entry</a> which explains how to do this in Gnome [pl]</li>
<li><a href="http://www.keybi.jawnet.pl/?p=496" title=":: Until he tried Gentoo Linux ... KeyBi's Blog">Kamil Baćkowski&#8217;s follow-up entry</a> on using xplanet in KDE [pl]</li>
<li><a href="http://xplanet.sourceforge.net/">xplanet website</a> with tons of info and hacks</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2007/02/11/planetary-eyecandy/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>find sizes of installed packages</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2006/09/09/gentoo-find-sizes-of-installed-packages/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2006/09/09/gentoo-find-sizes-of-installed-packages/#comments</comments>
		<pubDate>Sat, 09 Sep 2006 08:56:22 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[gentoo]]></category>

		<guid isPermaLink="false">http://www.matusiak.eu/numerodix/blog/index.php/2006/09/09/gentoo-find-sizes-of-installed-packages/</guid>
		<description><![CDATA[Sometimes, especially when disk space is low (or when system backups grow unreasonably large), it&#8217;s nice to know exactly how much space the biggest packages occupy. Obviously, OpenOffice is never above suspicion, but certain others can take up way more space than you would think.
I wrote a little script to print the size of all [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, especially when disk space is low (or when system backups grow unreasonably large), it&#8217;s nice to know exactly how much space the biggest packages occupy. Obviously, OpenOffice is never above suspicion, but certain others can take up way more space than you would think.</p>
<p>I wrote a little script to print the size of all packages installed on the system. It uses the <code>CONTENTS</code> file for every installed ebuild to check the size of the files which belong to a package and give a sorted listing of packages by size.</p>
<p><span id="more-418"></span>
<pre class="python"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># Author: Martin Matusiak &lt;numerodix@gmail.com&gt;</span>
<span style="color: #808080; font-style: italic;"># Licensed under the GNU Public License, version 2.</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># revision 1 - bugfix for paludis symlink in pkgdb</span>
&nbsp;
pkgdb = <span style="color: #483d8b;">"/var/db/pkg"</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>, <span style="color: #dc143c;">string</span>, <span style="color: #dc143c;">stat</span>
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">operator</span> <span style="color: #ff7700;font-weight:bold;">import</span> itemgetter
&nbsp;
sizes = <span style="color: black;">&#123;</span><span style="color: black;">&#125;</span>
&nbsp;
cats = <span style="color: #dc143c;">os</span>.<span style="color: black;">listdir</span><span style="color: black;">&#40;</span>pkgdb<span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">for</span> c <span style="color: #ff7700;font-weight:bold;">in</span> cats:
	cpath = <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>pkgdb, c<span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">isdir</span><span style="color: black;">&#40;</span>cpath<span style="color: black;">&#41;</span>:
		cat = <span style="color: #dc143c;">os</span>.<span style="color: black;">listdir</span><span style="color: black;">&#40;</span>cpath<span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">for</span> p <span style="color: #ff7700;font-weight:bold;">in</span> cat:
			size = <span style="color: #ff4500;">0</span>

			cont = <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>pkgdb, c, p, <span style="color: #483d8b;">"CONTENTS"</span><span style="color: black;">&#41;</span>
			fd = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span>cont, <span style="color: #483d8b;">'r'</span><span style="color: black;">&#41;</span>

			strings = fd.<span style="color: black;">readlines</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
			<span style="color: #ff7700;font-weight:bold;">for</span> s <span style="color: #ff7700;font-weight:bold;">in</span> strings:
				line = <span style="color: #dc143c;">string</span>.<span style="color: black;">split</span><span style="color: black;">&#40;</span>s, <span style="color: #483d8b;">" "</span><span style="color: black;">&#41;</span>
				<span style="color: #ff7700;font-weight:bold;">if</span> line<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span> == <span style="color: #483d8b;">"obj"</span> <span style="color: #ff7700;font-weight:bold;">and</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">exists</span><span style="color: black;">&#40;</span>line<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>:
					size += <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">getsize</span><span style="color: black;">&#40;</span>line<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>

			fd.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>

			sizes<span style="color: black;">&#91;</span><span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>c, p<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span> = size
&nbsp;
pkglist = <span style="color: #008000;">sorted</span><span style="color: black;">&#40;</span>sizes.<span style="color: black;">items</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>, key=itemgetter<span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> pkglist:
	<span style="color: black;">&#40;</span>size, pkg<span style="color: black;">&#41;</span> = <span style="color: black;">&#40;</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>i<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>, i<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span> <span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #dc143c;">string</span>.<span style="color: black;">rjust</span><span style="color: black;">&#40;</span>size, <span style="color: #ff4500;">11</span><span style="color: black;">&#41;</span>, <span style="color: #483d8b;">" "</span>, pkg</pre>
<p><i>Download this code: </i><a href="http://www.matusiak.eu/numerodix/blog/wp-content/uploads/pkgsizepy">pkgsizepy</a></p>
<p>The output looks like this:</p>
<pre>          0   virtual/x11-7.0-r2
         66   kde-base/kde-env-3-r4
        393   kde-base/kdebase-pam-6
        889   sys-apps/coldplug-20040920-r1
...
      94217   net-ftp/ftp-0.17-r6
      94642   kde-base/kcminit-3.5.3
      95629   sys-process/psmisc-22.2
      95931   sys-apps/ivman-0.6.12
      97358   app-admin/gnomesu-0.3.1
...
  122593614   dev-java/sun-jdk-1.5.0.08
  132864794   dev-lang/ghc-6.4.2
  145477793   app-text/tetex-2.0.2-r8
  221943002   sys-kernel/gentoo-sources-2.6.17-r7
  340336824   app-office/openoffice-bin-2.0.3
&nbsp;</pre>
<p><i>Download this code: </i><a href="http://www.matusiak.eu/numerodix/blog/wp-content/uploads/pkgsize_output">pkgsize_output</a></p>
<p>Unsurprisingly, OpenOffice claims victory, but this is a small reminder about how big kernel sources are. Tetex and GHC aren&#8217;t minimalistic either.</p>
<p>UPDATE: Paludis bug fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2006/09/09/gentoo-find-sizes-of-installed-packages/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Long live Gentoo!</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2004/01/13/long-live-gentoo/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2004/01/13/long-live-gentoo/#comments</comments>
		<pubDate>Tue, 13 Jan 2004 11:56:00 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[gentoo]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[ The reason I wanted to try Linux in the first place was that I was doing some websites and needed to mess around with cgi scripts in perl. I thought since the servers run linux, it would make sense to emulate that environment at home. The first thing I tried was Slackware, I think [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/numerodix/blog/wp-content/uploads/20040123-gentoo.jpg" class="alignleft" /> The reason I wanted to try Linux in the first place was that I was doing some websites and needed to mess around with cgi scripts in perl. I thought since the servers run linux, it would make sense to emulate that environment at home. The first thing I tried was Slackware, I think v3. Well that was a little much, I had a book that I borrowed from a friend but it was quite involved and I didn&#8217;t really know what I was doing. I tried a couple versions of Red Hat in the years following that but there was no easy way for me to find out what exactly I needed to do to get an up and running install of apache and perl. I didn&#8217;t try looking on the net because I didn&#8217;t want to spend that much time on it. I also got the impression that without a thick book on Red Hat, I was totally lost. <span id="more-38"></span> Then I heard something about Gentoo. I didn&#8217;t really want to try it because I knew there are so many distros out there that trying them all doesn&#8217;t make a lot of sense. The reason I did was that someone had mentioned FreeBSD and how great the ports system is, and apparently Gentoo had something similar. I don&#8217;t think I would have given it much time if it wasn&#8217;t for that install document. Sure, it was tough to get everything to work the first time but having this forum as well to ask questions, I succeeded in the end. By this time it wasn&#8217;t really about perl anymore, I wanted to get into Linux because Windows was quite dull. So I had a working install of Gentoo, indeed I found out that portage is delightfully convenient. Apart from the time lost in compilation, packages get installed with no effort, dependencies are handled nicely and there is no issue of failed dependencies. Another thing that I really liked was the colors in the console. It&#8217;s a simple detail but it makes a difference, it makes the shell less intimidating. I also felt that the documentation was not merely trying to explain how to do it, but also briefly explain why you&#8217;re doing it. This is brilliant for someone who doesn&#8217;t know what is what.</p>
<p>Since then I&#8217;ve been running Gentoo on a server with various services like apache, samba, cvs, mail, mysql etc. Lately I&#8217;ve also started thinking about using it as a desktop OS. I still rely on certain things like Dreamweaver but</p>
<p>the list of missing software is getting shorter. I&#8217;ve stuck with Gentoo for a couple of reasons.</p>
<p>Number one is this forum. Whenever there&#8217;s a problem, chances are the issue has already been noted and fixed by someone else. Now people will say that you can get support for any distro, there are websites, mailing lists, irc channels etc. I have to say I&#8217;m not a big fan of the latter two. I happen to like fora, they&#8217;re convenient, they have a certain atmosphere to them and they&#8217;re easily searchable. I have tried finding fora for Suse but I haven&#8217;t found any, the links were either 404 or the fora were deserted.</p>
<p>Reason #2 is portage. In the past year or so I&#8217;ve tried a bunch of different distros. After all, if there is something better, why not use it? I&#8217;ve looked at Red Hat, Suse, Mandrake, Lindows, Xandros, Debian and Knoppix. I&#8217;ve come to realize that none of them work as well for me as Gentoo does. The main reason is always portage. I&#8217;ve heard people say rpm is easy, there&#8217;s a simple set of commands to use and you can compile from source if you want to. That very well may be, but for some reason I have never succeeded. Perhaps I&#8217;m not fit to understand but I can never figure out where to get the packages and how to install them smoothly. Whenever I try, I always have a list of dependencies missing and chances are that along the way one of them is incompatible with something else or a previously installed version of itself. Even when I succeed at installing something, I feel locked down because I know that should I want to upgrade it or remove it, I may have to go through another long session. And while compiling does take a long time, it&#8217;s effortless, everything is done for me. Even though I don&#8217;t have to compile rpm, it always me over an hour, sometimes more, to find the right package, solve dependencies etc. I prefer to leave emerge running while I do something else. Then there&#8217;s the option to compile, well I&#8217;ve tried that as well, a couple of weeks ago I was trying to install ntop on Red Hat 7.3. I have barely compiled anything in my life save watching portage and I tried for hours without succeeding. I thought everything was in order, but autoconf wouldn&#8217;t stop complaining about a failed dependency.</p>
<p>So that&#8217;s rpm, and unfortunately most of the biggest distros are rpm-based. They&#8217;re not very good at keeping your system up-to-date, Red Hat had that RHN service but apparently it would stop working after a short while unless you register for it. Mandrake lets you define an ftp path as a source of updates but I could never get that working evenso. And Suse takes ages often, to just figure out what packages are new and the selection is limited. This is how portage really excels, the sheer volume of packages available is stunning and unmatched in any easy-to-use distribution I have seen. So then Debian. Well, Debian is not as nice as Gentoo. And I didn&#8217;t know where to look for documentation. So as long as I have Gentoo and I don&#8217;t mind compiling everything, there is little incentive to use Debian. Xandros and Lindows are Debian based but they don&#8217;t make Debian that much easier, they just give you a nice desktop.</p>
<p>And some people say the builds always break, I can&#8217;t compile anything because it won&#8217;t finish. Perhaps I have been exceptionally fortunate but from all the packages I&#8217;ve installed, very few builds have failed to complete. Even when they don&#8217;t, all you have to do is try the older or the newer version of the ebuild, and if you&#8217;re stuck check the forum/bugzilla and that&#8217;s it.</p>
<p>Thus I&#8217;ve found out that most distributions are fine if you&#8217;re satisfied just using whatever they give you on the install disc. But if I want to use mplayer, then I&#8217;m gonna have to look elsewhere and rarely is it as easy to install as with Gentoo. And it&#8217;s not that I have to use all the newest software. But as long as I know that I can, I&#8217;m thinking there&#8217;s no reason not to be able to do it on any other distribution.</p>
<p>In the course of these two years, using the Gentoo documents and most importantly, reading this forum, I have learnt a lot about Linux. And I&#8217;m still a complete newbie but with a little guidance, I can compile a kernel, I can install a couple of services and sometimes I can even predict where to find something in this cryptic filesystem. As a Windows user for a decade, I&#8217;m not used to learning anything because there&#8217;s not a lot to learn. But I&#8217;ve come to accept that some things take a little understanding and reading documentation before trying to install something can actually save you some time later on when you&#8217;re trying to find out why this or that.</p>
<p>So thanks a lot Daniel Robbins and long live Gentoo!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2004/01/13/long-live-gentoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>aaaaarghh!!</title>
		<link>http://www.matusiak.eu/numerodix/blog/index.php/2003/10/23/aaaaarghh/</link>
		<comments>http://www.matusiak.eu/numerodix/blog/index.php/2003/10/23/aaaaarghh/#comments</comments>
		<pubDate>Wed, 22 Oct 2003 22:32:34 +0000</pubDate>
		<dc:creator>numerodix</dc:creator>
				<category><![CDATA[gentoo]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I guess it&#8217;s one of those days.. I needed to move my stuff from one drive onto another and not surprisingly, there was trouble ahead. All the partitions containing docs, software, install files etc moved along just fine, did a simple rsync in linux. The Gentoo partitions were just as well behaved, they took to [...]]]></description>
			<content:encoded><![CDATA[<p>I guess it&#8217;s one of those days.. I needed to move my stuff from one drive onto another and not surprisingly, there was trouble ahead. All the partitions containing docs, software, install files etc moved along just fine, did a simple rsync in linux. The Gentoo partitions were just as well behaved, they took to their new homes with no questions asked but then comes the big, ugly monster: the Windows partition. I had never tried copying one before and I didn&#8217;t think too much of it, I thought as long as I got all the files across it would be all good. Not so fast! Copying the files over in linux failed miseably, I ended up with a corrupt, unbootable Windows (apparently there&#8217;s more to a fat32 than meets the eye, at least as far as Windows is concerned).</p>
<p>A quick search on google revealed that I might be more successful with Norton Ghost so I tried that then, and voilá it seemed to work fine. At this point I was quite impressed and relieved that I had been able to transfer the beast without reinstalling all my software. I had set up all my partitions on the new drive and was ready to format the old one when it somehow turns out the Windows install isn&#8217;t in good shape at all. Once I plugged out the old drive, the new one was left with the exact same boot handicap I discovered earlier. Quite puzzling that was, I thought I had been booting from my new drive all this time, there was nothing to suggest otherwise and apparently Windows had been  consulting the old drive just the same. Talk about disturbing behavior under the hood.</p>
<p>Well there was no way back, the old drive had been wiped and the new wouldn&#8217;t boot. Windows installer, here I come. Basically, I had spent 3 days trying to avoid this boring, drawn out, horrible process and I ended up having to go through with it all the same. Thank you so very f. much, Redmond!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matusiak.eu/numerodix/blog/index.php/2003/10/23/aaaaarghh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

