From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from ) id 1H12HC-0006YP-Gp for garchives@archives.gentoo.org; Sun, 31 Dec 2006 15:07:07 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.8) with SMTP id kBVF5BQu011771; Sun, 31 Dec 2006 15:05:11 GMT Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id kBVF5Alj000945 for ; Sun, 31 Dec 2006 15:05:10 GMT Received: from list by ciao.gmane.org with local (Exim 4.43) id 1H10TZ-0005B1-NX for gentoo-amd64@lists.gentoo.org; Sun, 31 Dec 2006 14:11:45 +0100 Received: from ip68-231-13-122.ph.ph.cox.net ([68.231.13.122]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 31 Dec 2006 14:11:45 +0100 Received: from 1i5t5.duncan by ip68-231-13-122.ph.ph.cox.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 31 Dec 2006 14:11:45 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-amd64@lists.gentoo.org From: Duncan <1i5t5.duncan@cox.net> Subject: [gentoo-amd64] Re: emerge --depclean question Date: Sun, 31 Dec 2006 13:11:38 +0000 (UTC) Message-ID: References: <5bdc1c8b0612301751k5f65c464nf8b9bd99c3b75091@mail.gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-amd64@gentoo.org Reply-to: gentoo-amd64@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ip68-231-13-122.ph.ph.cox.net User-Agent: pan 0.120 (Plate of Shrimp) Sender: news X-Archives-Salt: 9d952a50-4cab-495d-ae1c-08f2c53db0c8 X-Archives-Hash: 6141f56356de942d37b0789c79cf53e1 "Mark Knecht" posted 5bdc1c8b0612301751k5f65c464nf8b9bd99c3b75091@mail.gmail.com, excerpted below, on Sat, 30 Dec 2006 17:51:29 -0800: > I haven't done this in quite awhile so this evening I started > looking at dependencies a bit. I thought I might take a shot at > cleaning things up old stuff left around from updates over the last > year or so. I ran emerge -p --depclean and was told that there were > about 45 things to remove so I decided I'd try removing a few > one-at-a-time and see how it went. First I sync'ed and did an emerge > -DuN world and made sure the machine was up to date. I then removed > what seemed like a pretty random entry late on the list - imlib - and > then a revdep-rebuild -p to see what it thought. I was then told I > needed to emerge revisions of two new things - gnome-lib and > gtk-pixbuf - neither of which existed according to both emerge and > eix. I then re-emerged imlib, reran revdep-rebuild and now I see the > machine is consistent again. gnome-lib and gtk-pixbuf are GNOME-1. Somewhere, you still have something wanting GNOME-1 stuff, which has been removed from the tree as nothing current depends on it. You can use equery -d to get a list of merged packages depending on . Try that with gnome-lib and see what comes up. Maybe you don't need it any more and can unmerge it. Or, if it's still in the tree the dependencies must now be fixed, so remerging it should kill the dependencies on gnome-lib. (equery is part of gentoolkit.) It's also possible you have "orphaned" libraries around that somehow got left behind after an unmerge. Portage won't know about these so --depclean won't consider them. However, revdep-rebuild does a scan of the actual libraries and applications you have, including orphans and binary-only packages (which remerging won't fix since you just remerge the same binary libraries with the same compiled in dependencies), and thus catches things portage wouldn't. > Is this a question that certain ebuilds are not written correctly > and don't somehow call for the right dependencies, or is it something > else? It's probably either packages that have changed since you merged them, or orphans, as mentioned above. It could however also be just as you said, dependencies that aren't properly noted in the ebuild. This can be either a missed dependency that needs to be there, or something the package configure script detected on its own, that wasn't part of the ebuild. Gentoo devs try not to have any of those "autodetected" things, because it causes problems exactly like what you are seeing. Instead, they try to specify a hard dependency if the package really needs it, make it conditional on a USE flag if it's optional, or unconditionally tell the config script NOT to use it if Gentoo has a different way of handling it or something, as sometimes happens. However, sometimes upstream changes the dependencies or optional dependencies and the Gentoo devs don't catch the changed config it until someone runs into problems and files a bug. > Also, is there any better tool these days for cleaning up stale > packages left around than emerge --depclean? Not really... that I know of anyway. There are a few other tools such as dep, from the udept package, but it's worse, not better. (From what I can tell, it checks the dependencies in the ebuilds themselves but not the ones brought in by the eclasses, so it misses some. It's quite a bit faster, but it's also not anywhere near as dependable.) Basically, it's a process of using --depclean -p, and getting a list, then using common sense and trial and error to figure out what's safe to remove and what's not. It's not an easy or simple process, which is why there are such big warnings on it. However, it's worthwhile to do once in awhile, both because it helps keep the troubles away, and because stuff that it says needs removed is stuff portage won't be regularly updating, and that can quickly become a security issue if there's a vulnerability in one of those packages. One thing that makes things MUCH easier, however, and you may already be doing this, is using FEATURES=buildpkg. If you are, testing unmerges is vastly easier, since if something needs the package, you can simply emerge -k the binary package that was created during the initial merge -- that's what the buildpkg feature DOES. If you haven't been using the buildpkg feature, it's also possible to quickpkg the package already on your system before you remove it. Again, if it turns out you actually need it, you don't have to spend all that time recompiling it, all you have to do is emerge -k it, to remerge the binary package you created using quickpkg. -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman -- gentoo-amd64@gentoo.org mailing list