Friday, November 21, 2008

error: install: %pre scriptlet failed (2), skipping coreutils

I've been working lately on OS installation into image files, along the lines of the process here.

The "/usr/bin/yum -c yum.conf --installroot=/mnt/foo.img -y groupinstall Base" step for me kept producing significant errors of the form: "error: install: %pre scriptlet failed (2), skipping coreutils-x.y.z". This occurred for 16 packages in my case.

Several google hits suggested problems with selinux, but that wasn't the source of the problems in my case. After much troubleshooting I finally discovered that an RPM macro was the culprit.

In my ~/.rpmmacros file I had this entry:

%_tmppath %(echo $HOME)/rpmbuild/tmp

That's because on some hosts the default %_tmppath of /var/tmp has insufficient space, but my home directory generally has plenty. During install, yum/rpm writes out rpm scriptlets to %_tmppath. Using --installroot with yum causes a chroot(), so that path is invalid within the chroot() environment, and for some reason a number of %pre scriptlets fail in a way that causes yum to not install the package.

I did look through the Base package group, and it wasn't just the rpms that happen to have a %pre scriptlet that failed. It was a subset of them, and I haven't had the time to determine what it is about those particular %pre scriptlets that invoked the error. Regardless, removing the %_tmppath macro from my ~/.rpmmacros eliminated the error and let the yum install work properly.

(Use the "rpm --showrc" command to see your current value for %_tmppath.)

Thursday, November 6, 2008

ChaCha

I occasionally use Google SMS to check sports scores or flight info, but its query ability is limited to a few topic areas that it knows how to process. Today I checked on an Indianapolis-based startup that I've followed over the years. It's called ChaCha and it's at http://www.chacha.com/. ChaCha uses human guides as part of its search processing, so you can send conversational free-form questions.

The interesting thing is that they now specialize in mobile searches. You simply text your question to CHACHA (242242), and you'll get a reply. This is much more flexible than Google SMS, because you can ask anything. It's basically like calling a friend and asking them to quickly research a question for you.

For example, you could text this to ChaCha: "Does everyone in Minnesota like chocolate pudding pops?"

Anyway, give ChaCha a try.