<?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>Alunduil&#039;s Hosting &#187; packages</title>
	<atom:link href="http://www.alunduil.com/tag/packages/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alunduil.com</link>
	<description>Gentoo Hackery and Other Fun ...</description>
	<lastBuildDate>Sun, 01 May 2011 22:00:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Cleaning /etc/portage/package.*</title>
		<link>http://www.alunduil.com/2009/07/23/cleaning-etcportagepackage/</link>
		<comments>http://www.alunduil.com/2009/07/23/cleaning-etcportagepackage/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 06:38:19 +0000</pubDate>
		<dc:creator>Alex Brandt</dc:creator>
				<category><![CDATA[Linux Guides]]></category>
		<category><![CDATA[cleanup]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[packages]]></category>
		<category><![CDATA[portage]]></category>

		<guid isPermaLink="false">http://www.alunduil.com/?p=61</guid>
		<description><![CDATA[Inroduction After a while the files in /etc/portage become cluttered with the common, &#8220;Let&#8217;s try this . . . whoops that didn&#8217;t work . . . let&#8217;s try this.&#8221; No matter how hard you try to keep this clean, you have probably forgotten something along the way. Installing a testing package then removing it because <a href='http://www.alunduil.com/2009/07/23/cleaning-etcportagepackage/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h1><strong>Inroduction</strong></h1>
<p>After a while the files in /etc/portage become cluttered with the common, &#8220;Let&#8217;s try this . . . whoops that didn&#8217;t work . . . let&#8217;s try this.&#8221;  No matter how hard you try to keep this clean, you have probably forgotten something along the way.  Installing a testing package then removing it because you found a better one later, etc.  Well, what&#8217;s an easy way to clean these files up and make sure that we minimize their sizes and keep our Gentoo system crisp (or as crisp as we can by just managing these files)?  I&#8217;ve written some bash one-liners that assist with this and could easily be adapted into a script that automates a lot of the cleaning for you.</p>
<p>In all of these scripts change the /etc/portage/package.use to the file you are interested in cleaning.</p>
<h1><strong>Checking for Multiple Occurrences of an Atom Within a File</strong></h1>
<p>for atom in $(gawk &#8216;{print $1}&#8217; /etc/portage/package.use); do [ "$(grep ${atom} /etc/portage/package.use | wc -l)" -gt "1" ] &amp;&amp; echo &#8220;${atom}&#8221;; done</p>
<h1><strong>Checking for N Uses of a Use Flag in /etc/portage/package.use</strong></h1>
<p>I use this to move frequently used use flags to /etc/make.conf if it seems appropriate.</p>
<p>for flag in $(gawk &#8216;{print $2}&#8217; /etc/portage/package.use); do [ "$(grep "${flag}" /etc/portage/package.use | wc -l)" -gt "2" ] &amp;&amp; echo &#8220;${flag}&#8221;; done</p>
<h1><strong>Checking for Removed Atoms Within a File</strong></h1>
<p>for atom in $(gawk &#8216;{print $1}&#8217; /etc/portage/package.use); do [ "$(portageq match / ${atom} | wc -l)" -lt "1" ] &amp;&amp; echo &#8220;${atom}&#8221;; done</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alunduil.com/2009/07/23/cleaning-etcportagepackage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached (User agent is rejected)
Database Caching 1/25 queries in 0.016 seconds using memcached
Object Caching 243/287 objects using memcached

Served from: www.alunduil.com @ 2012-02-07 23:50:11 -->
