#2 Error in %pre section in Rocks.

closed
nobody
None
5
2008-02-29
2008-02-28
No

Hi.

I've just included the collectl rpm into our rocks setup and it seems to be a slight problem in the %pre section. From the install log:

Installing collectl-2.4-3.noarch.
/var/tmp/rpm-tmp.74966: line 2: rm: command not found
/var/tmp/rpm-tmp.74966: line 3: rm: command not found
error: %pre(collectl-2.4-3.noarch) scriptlet failed, exit status 127
error: install: %pre scriptlet failed (2), skipping collectl-2.4-3

The rm command isn't in the path since the system isn't installed yet when the %pre section is executed. Changing it to /usr/bin/rm seems to fix the problem, but introduces a problem when installing on a running system where rm is in /bin. So instead we just check if /bin/rm exists and use it, if it doesn't we can just skip the rest as we probably is in the install process and no old bits should be laying around.

I also took the liberty to change the version setup in the spec file to make it easier to do new rpm releases without having to change the source version. Use it if you want to.
See attached patch.

Hope you find this useful.

Regards,
r.

Discussion

  • Roy Dragseth

    Roy Dragseth - 2008-02-28

    Patch to collectl.spec

     
  • Mark Seger

    Mark Seger - 2008-02-29
    • status: open --> closed
     
  • Mark Seger

    Mark Seger - 2008-02-29

    Logged In: YES
    user_id=1047330
    Originator: NO

    Fixed in V2.5.0

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks