Wow, thanks. It worked like a charm.... Thanks again... Ram Prakash. R Panu Matilainen wrote: > On Sun, 28 Mar 2004, Ram Prakash R wrote: > > > Hi, > > I have a strange problem. I have built a RPM wchich has a %pre > > section as below > > > > %pre > > if [ -d /opt/running ] ; then > > if [ ! -L /opt/nimRunning ]; then > > ln -sf /opt/running /opt/nimRunning > > fi > > fi > > > > This RPM installs without any problem through the CLI (rpm -ivh > > my.rpm). But through a C program using the RPM - APIs it fails with the > > following error > > > > error: %pre(hub1000-3.2.0.1-1) scriptlet failed, exit status 255 > > error: install: %pre scriptlet failed (2), skipping > > hub1000-3.2.0.1-1 > > > > I suspected the script and tried with an empty %pre section with no > > change in the outcome. > > > > Can someone please point to me what I am doing wrong? > > Since you don't provide any code all we can do is guess, but one thing > that does cause scriptlets failing with rpm >= 4.1 is not initializing > transaction root (even if it's / ) > > Try adding rpmtsSetRootDir(TS, NULL) right after creating the transaction > set (TS) if you're not already doing that. > > - Panu - > > _______________________________________________ > Rpm-list mailing list > Rpm-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/rpm-list _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list