[pca] Expected behavior when specifying a patch when required packages are not installed.

Martin Paul martin at par.univie.ac.at
Thu Mar 19 09:25:36 CET 2009


Jeff,

> We apply subsets of patches to resolve specific issues.  Something I noticed
> is if I run, as an example, "pca -i 122911", which is the Apache 1.3 patch,
> on a server that doesn't have Apache installed, it will still download the
> patch and try to apply it, at which time patchadd will fail.

If an explicit patch number is given to pca, it will assume that you 
know what you do and won't check whether this patch actually applies. 
The idea is that you often want to list a patch (or check it's 
dependencies) even if it doesn't apply to the system pca is running on. 
There's currently no command line option to modify this behaviour.

I would use a simple wrapper like:

#!/bin/sh

applies=`pca -l missing --format '%p'`
for i in $*
do
   for j in $applies
   do
     test $i = $j && echo "pca -i $i"
   done
done

It goes through the list of patches you provide on the command line and 
checks each patch against a list of patches which are missing on the 
system, created by pca. Only patches which apply to the system will be 
installed.

Hope that helps,

Martin.



More information about the pca mailing list