From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PQMlv-00073I-Tr for garchives@archives.gentoo.org; Wed, 08 Dec 2010 16:21:40 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BB819E070D; Wed, 8 Dec 2010 16:20:13 +0000 (UTC) Received: from mail-gw0-f52.google.com (mail-gw0-f52.google.com [74.125.83.52]) by pigeon.gentoo.org (Postfix) with ESMTP id 8A7C3E070D for ; Wed, 8 Dec 2010 16:20:13 +0000 (UTC) Received: by gwb11 with SMTP id 11so892497gwb.11 for ; Wed, 08 Dec 2010 08:20:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=3VM52ARiDyEd5A1jlI+41SINIKrA1uRjEvLgwID+F40=; b=qSNHkpJt8+jWm+aZdtApuV7wrcOlxt/YGxfCHjoF8TOAWUk9m9M0T7jHCLvRXvk5ht MU/M8kMX/qHHgcHXSQ1sSQnIuK0VvgGELjHthcc1MdY5tNtRVd6719DDzSN3ct2atWqg qI6StCVtMFpIREWcdYK7Syh8y4KF9bXDWR1/4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=NWuTIBwCla/6I1JZn9S36K0ytf7jkACGj76zH8QEaRg3vvl6qFMbfKsypY/nvaBTYn QU9gN+3FXJ5MSOpYJaYihF0E1mEQ9Gawmujf5JEsjr4UFsgjB+qnavFx5HBTJZ8l1zf6 gtTLlATPJYBehYlevTD1rKN/rg/bDzuDTrzso= Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.229.100.20 with SMTP id w20mr6982497qcn.233.1291825212932; Wed, 08 Dec 2010 08:20:12 -0800 (PST) Sender: daniel.pielmeier@googlemail.com Received: by 10.229.87.1 with HTTP; Wed, 8 Dec 2010 08:20:12 -0800 (PST) In-Reply-To: <1291807409.5304.6@numa-i> References: <1291807409.5304.6@numa-i> Date: Wed, 8 Dec 2010 17:20:12 +0100 X-Google-Sender-Auth: 7J36PhSOfXIPzjKDVlf1v7uSzAM Message-ID: Subject: Re: [gentoo-user] Remove redundant entries in "world" - howto From: Daniel Pielmeier To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: a9a1963d-b889-4004-91c2-1d16855d239e X-Archives-Hash: 7c488c523dfc64da9b3e13461f10ae8d Helmut Jarausch : > Hi, > > does anybody know about an easy method to remove all entries from > /var/lib/portage/world > which would have been pulled in anyway > even if they were not contained in world. > > My current attempt would be to write a script > which executes emerge -vpc on each entry in world. > If it wouldn't be removed it's obsolete in world. > > Unfortunately this has to be done in several rounds. As far as I know there is currently no tool available for something like this. I have a skript which runs emerge -pv --depclean for every entry in world. If depclean returns reverse dependencies the package in question is redundant in world. It takes quite some time but works reliable. There are false positives for packages with PDEPENDS, but you will recognize this when "emerge -pv --depclean" wants to remove packages which you want to keep afterwards and you can add them back manually. Another method would be removing the world file (backup before) and run the regenworld script afterwards. The result is not really minimal so there will still be redundant entries. I asked the portage maintainer about such a tool, as it would be best if it uses the portage API to speed things up. He didn't not see the point of such a script but thought about writing something which creates a minimal word file. If you want such a functionality I recommend to open a bug about it. -- Daniel Pielmeier