Failure to run %post in rpms

Ian Leonard ian at smallworld.cx
Fri Jul 15 19:00:16 UTC 2005


Philip Rowlands wrote:
> On Fri, 15 Jul 2005, Ian Leonard wrote:
> 
> 
>>Dan Carpenter wrote:
>>
>>>%post is run in a chroot on the system.
>>
>>Just to be sure, this is the %post script in the rpm, not the kickstart
>>file.
>>
>>
>>>What did the error messages look like?
>>
>>I see lines like this:
>>
>>/var/tmp/rpm-tmp.34500:line 4: /bin/cp: No such file or directory
>>/var/tmp/rpm-tmp.34500:line 18: /bin/cat: No such file or directory
>>error: %post(microplay-1.0.0.31.i386) scriplet failed, exit 127
> 
> 
> Much badness; does your package list those as dependencies? (or just
> coreutils as a whole?)

My RPM does not list anything as dependencies. This may be wrong but it 
is not the only one to fail, a few more do.

> I really ought to check up on the current status of this, but there
> is/was a bug in anaconda which didn't realise when package orders were
> messed up, and the workaround was to call "genhdlist; pkgorder;
> genhdlist" with some flags. How did you build the custom CD (genhdlist
> specifically)?

A big question. I am trying to make a general purpose script for handle 
several cd builds. I have a list of files which my script reads, deletes 
from the comps.xml file and deletes the rpms. This leaves me with a 
distribution small enough for a single cd. I also add in my own rpm.

The I run:

/usr/lib/anaconda-runtime/genhdlist --productpath Fedora $distro/$arch

Next:

/usr/lib/anaconda-runtime/getfullcomps.py comps.xml $distro i386 
 >/tmp/comps.out

I grep this for the word CRITICAL and bomb out if there is a problem.


If all is well:

/usr/lib/anaconda-runtime/pkgorder $distro i386 i386/Fedora > 
$distro/pkgorder.txt

and

/usr/lib/anaconda-runtime/genhdlist --withnumbers --fileorder 
$distro/pkgorder.txt --productpath Fedora $distro


That should be the main distribution made, so the next step is to split 
it up:


/usr/lib/anaconda-runtime/splittree.py --arch=i386 \
           --total-discs=$max_disks --bin-discs=$discs 
--src-discs=$source_disks \
           --release-string="$product" \
           --pkgorderfile=$distro/pkgorder.txt \
           --distdir=$distro/i386 \
           --srcdir=$distro/SRPMS --productpath=Fedora


and finally run genhdlist on the tree for each disc:

/usr/lib/anaconda-runtime/genhdlist --withnumbers --productpath Fedora 
$distro/i386-disc1



And that's it. I used kickstart with a RH 7.3 distribution several years 
ago but basically I am new to this. Please let me know if I have got any 
of it wrong.


Thanks.


-- 
Ian Leonard

Please ignore spelling and punctuation - I did.




More information about the Kickstart-list mailing list