Project

General

Profile

« Previous | Next » 

Revision 19f1200f

Added by Michael Newton over 16 years ago

  • ID 19f1200f4f4bf7fe70752607df575f00e2374b69

[PATCH] installing pcp requires which

We have had a longstanding puzzle as to why, when a whole-machine image
that includes pcp is constructed in a chroot, pcp is chkconfig off when
the image comes to be used. Turns out to be due to which not being
available in the rpm post-install ops in the chroot.

Investigation suggests that using which from bash can be unsafe even
when its available, so the best solution seems to be to use type instead
in these cases. Here I simply say, use type if sh -c 'type -p sh'
succeeds (I think this makes sense for linux/bash); otherwise use which

There are other uses of which elsewhere that can be switched over to
also use $PCP_WHICH_PROG should it ever turn out that there are any real
systems that dont install which, or if there are problems caused
by which using a different PATH to that used by bash. The current
priority was just to catch those uses that occur during install.

  • added
  • modified
  • copied
  • renamed
  • deleted