Saturday, April 14, 2007

HOWTO cleanup gentoo portage distfiles, packages that are unused (eclean)

eclean can be your friend, it is a part of the gentoolkit. If you don't have the gentoolkit: emerge gentoolkit.

eclean can cleanup distribution files and packages. Because you are a regular emerge --sync, emerge --update --deep --ask world sort of person, you will likely be using disk space on all those old packages you have upgraded out of.

eclean distfiles
eclean packages


eclean is small tool to remove obsolete portage sources files and binary packages. Used on a regular basis, it prevents your DISTDIR and PKGDIR directories to infinitely grow, while not deleting files which may still be useful.

By default, eclean will protect all distfiles or binary packages corresponding to some ebuilds available in the Portage tree. This is the safest mode, since it will protect whatever may still be useful, for instance to downgrade a package without downloading its sources for the second time, or to reinstall a package you unmerge by mistake without recompiling it. Sure, it's also a mode in which your DISTDIR and PKGDIR will stay rather big (although still not growing infinitly). For the 'distfiles', this mode is also quit slow mode because it requiries some access to the whole Portage tree.

If you use the --destructive option, eclean will only protect files corresponding to some currently installed package (taking their exact version into account). It will save much more space, while still preserving sources files around for minor revision bumps, and binaries for reinstallation of corrupted packages. But it won't keep files for less usual operations like downgrading or reinstalling an unmerged package. This is also the fastest execution mode (big difference for distfiles), and the one used by most other cleaning scripts around like yacleaner (at least in its version 0.3).

Somewhere in the middle, adding the --package-names option when using --destructive will protect files corresponding to all existing versions of installed packages. It will allow easy downgrading without recompilation or redownloading in case of trouble, but won't protect you against package uninstallation.

In addition to this main modes, some options allow to declare a few special cases file protection rules:

--time-limit is useful to protect files which are more recent than a given amount of time.
--size-limit (for distfiles only) is useful if you want to protect files bigger than a given size.
--fetch-restricted (for distfiles only) is useful to protect manually downloaded files. But it's also very slow (again, it's a reading of the whole Portage tree data)...
Finally, you can list some categories or package names to protect in exclusion files (see EXCLUSION FILES below).

Keywords:gentoo, portage, cleanup, portage cleanup, eclean, cleanup portage directory, cleanup portage storage /usr/portage/distfiles, /usr/portage/distfiles, cleanup of /usr/portage/distfiles

Sunday, April 01, 2007

VMWare with Gentoo Guest - why is fit guest now grayed out?

My configuration
HOST: Windows XP
Guest: Linux Gentoo 2006.1
VMWARE Version: VMWare Server 1.0.2 build-39867
X Windows: 7.2
Desktop Environment: KDE 3.5

I wished to fill my 1600X1400 monitor with my Gentoo VMWare image while in 'Quick switch' mode. However, the Fit Guest Now was grayed out. The reason? I needed to have vmware-user running (location for me: /usr/lib/vmware-tools/bin32/vmware-user). This is a tool in the VMWare tools. For VMWare tools installation see Install Gentoo on VMWare - VMWare Tools Section.

As soon as I launched the vmware-user, the Fit Guest Now menu becomes un-grayed and works beautifully. Enjoy your new found desktop real estate.

I've yet to have the autofit guest work, but I am happy enough that the fit guest now works. Another day for the autofitting.

Keywords: fit guest now grayed out, gentoo, vmware, linux, VMWare server, vmware-user, maximizing desktop for Gentoo Guest in VMWare, autofit guest.

VMWare with Gentoo Guest - why does copy and paste not work

My configuration
HOST: Windows XP
Guest: Linux Gentoo 2006.1
VMWARE Version: VMWare Server 1.0.2 build-39867

First off, the copy and paste is provided by VMWare Tools. VMWare Tools run under X Windows.

There are a number of articles out there describing how to do this for various flavors of VMWare; however, my experience has demonstrated that these work just fine for VMWare Server. I would worry not.

I found that with these instructions (HOWTO install Gentoo on VMWARE - installation of VMWARE Tool Section) and my original version of X11 R6.8 did not work out as well with driver module installation. Perhaps I was careless, but my solution was simply to upgrade to X Windows 7.2 - a seamless upgrade for me. Note to you: you may as well take a snapshot to allow a roll back.

I would recommend following the path of upgrading if you've not, insuring that you have in your make.conf: INPUT_DEVICES="keyboard vmmouse" VIDEO_CARDS="vmware". If you have/want to upgrade, as I did, follow these instructions: Migrating to Modular X HOWTO

After migrating to Modular X Windows 7.2 the VMWare tools launch automatically as I start X so copy and paste works seamlessly now.

Keywords: gentoo, vmware, copy and paste, vmware tools, vmware server, gentoo guest, x windows, why doesn't copy and paste work?