Re: [CentOS] Understanding RPM trigger scripts?

2013-07-10 Thread James Pearson
Denniston, Todd A CIV NAVSURFWARCENDIV Crane wrote:
> While looking into doing similar things a few years ago I ran across the
> following PDF.
> It has several pages on doing triggers, and looked promising to help my
> understanding, I just got pulled onto a different project before getting
> to test out the ideas.
> I think page 25 would be of interest to you.
> 
> http://www.redhat.com/promo/summit/2010/presentations/summit/opensource-
> for-it-leaders/thurs/pwaterma-2-rpm/RPM-ifying-System-Configurations.pdf
> 
> I hope this pointer to info helps.

Thanks - but it doesn't really give any more info that isn't elsewhere 
on the Web e.g. it doesn't give any clues on how to check if the trigger 
script is being run by the RPM containing the trigger script or by the 
triggering RPM

After several hours of installing, upgrading, removing, etc (in various 
combinations) test trigger and triggering RPMS, I think I've now got 
something that I can work with - it's a bit messy, but it will now work 
in a predictable fashion

Thanks

James Pearson
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Understanding RPM trigger scripts?

2013-07-09 Thread Denniston, Todd A CIV NAVSURFWARCENDIV Crane
> -Original Message-
> From: James Pearson [mailto:jame...@moving-picture.com]
> Sent: Monday, July 08, 2013 11:45
> To: CentOS mailing list
> Subject: [CentOS] Understanding RPM trigger scripts?
> 
> I'm trying to get my head around RPM trigger scripts - but currently
> getting very confused ...
> 
> I have a custom RPM which has in its spec file a '%triggerin' script
> for
> the 'kernel' RPM - i.e. a script that I want to run when the kernel
RPM
> is upgraded/installed
> 
> This works OK - once my custom RPM is installed, if the kernel is
> subsequently upgraded/installed, my trigger script is run
> 
> However, the same trigger script is also run when I upgrade my custom
> RPM - which I don't want - and so far, I can't find a reliable way of
> making sure it isn't run in this case. The more I search for an
answer,
> the more I get confused :-)
> 
> I know this is a bit off-topic and obscure, but does anyone know how
to
> make sure such a trigger script is only run when the RPM that triggers
> it is upgraded/installed - and not when the RPM that contains the
> trigger script is upgraded?
> 
> Thanks
> 
> James Pearson

While looking into doing similar things a few years ago I ran across the
following PDF.
It has several pages on doing triggers, and looked promising to help my
understanding, I just got pulled onto a different project before getting
to test out the ideas.
I think page 25 would be of interest to you.

http://www.redhat.com/promo/summit/2010/presentations/summit/opensource-
for-it-leaders/thurs/pwaterma-2-rpm/RPM-ifying-System-Configurations.pdf


I hope this pointer to info helps.

Even when this disclaimer is not here:
I am not a contracting officer. I do not have authority to make or
modify the terms of any contract.


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Understanding RPM trigger scripts?

2013-07-08 Thread James Pearson
I'm trying to get my head around RPM trigger scripts - but currently 
getting very confused ...

I have a custom RPM which has in its spec file a '%triggerin' script for 
the 'kernel' RPM - i.e. a script that I want to run when the kernel RPM 
is upgraded/installed

This works OK - once my custom RPM is installed, if the kernel is 
subsequently upgraded/installed, my trigger script is run

However, the same trigger script is also run when I upgrade my custom 
RPM - which I don't want - and so far, I can't find a reliable way of 
making sure it isn't run in this case. The more I search for an answer, 
the more I get confused :-)

I know this is a bit off-topic and obscure, but does anyone know how to 
make sure such a trigger script is only run when the RPM that triggers 
it is upgraded/installed - and not when the RPM that contains the 
trigger script is upgraded?

Thanks

James Pearson
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos