[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Help: trigger scripts executing with wrong args



Could someone be so kind as to take a look at this test case and verify 
that I'm not seeing things? Unpack this archive, then run:

	make
	runtest1

as root. Since you must execute these as root, be sure to examine EVERY 
file in the package for a TROJAN horse, etc. and only proceed when you are
COMPLETELY sure you understand what will happen.

I have three RPMs, test4a-1, test4a-2 and test4c.

test4c has several triggers (for test4a-1 and test4a-2). I install
test4c, install test4a-1, then upgrade to test4a-2. Here is the 
result of running runtest:

SCRIPT INSTALL test4c-1
SCRIPT test4c pre install number src pkgs (ARG1)=1 number tgt pkgs (ARG2)=
SCRIPT test4c post install number src pkgs (ARG1)=1 number tgt pkgs (ARG2)=
SCRIPT INSTALL test4a-1
SCRIPT test4a-1 pre install number src pkgs (ARG1)=1 number tgt pkgs (ARG2)=
SCRIPT test4a-1 post install number src pkgs (ARG1)=1 number tgt pkgs (ARG2)=
SCRIPT test4c triggerin: trigger=test4a 1.0-1 number src pkgs (ARG1)=1 number tgt pkgs (ARG2)=1
SCRIPT UPGRADE test4a-2
SCRIPT test4a-2 pre install number src pkgs (ARG1)=2 number tgt pkgs (ARG2)=
SCRIPT test4a-2 post install number src pkgs (ARG1)=2 number tgt pkgs (ARG2)=

Wrong? (below) ARG1 = 2, indicating there will be 2 copies of the source 
package (test4c) when this operation is complete but there will never be more than
one copy of test4c

->SCRIPT test4c triggerin: trigger=test4a 2.0-1 number src pkgs (ARG1)=2 number tgt pkgs (ARG2)=2

ditto (below)

->SCRIPT test4c triggerun: trigger=test4a 1.0-1 number src pkgs (ARG1)=2 number tgt pkgs (ARG2)=1
SCRIPT test4a-1 pre uninstall number src pkgs (ARG1)=1 number tgt pkgs (ARG2)=
SCRIPT test4a-1 post uninstall number src pkgs (ARG1)=1 number tgt pkgs (ARG2)=

ditto(below)

->SCRIPT test4c triggerpostun: trigger=test4a 1.0-1 number src pkgs (ARG1)=2 number tgt pkgs (ARG2)=1
SCRIPT ERASE test4a-2
SCRIPT test4c triggerun: trigger=test4a 2.0-1 number src pkgs (ARG1)=1 number tgt pkgs (ARG2)=0
SCRIPT test4a-2 pre uninstall number src pkgs (ARG1)=0 number tgt pkgs (ARG2)=
SCRIPT test4a-2 post uninstall number src pkgs (ARG1)=0 number tgt pkgs (ARG2)=
SCRIPT test4c triggerpostun: trigger=test4a 2.0-1 number src pkgs (ARG1)=1 number tgt pkgs (ARG2)=0
SCRIPT ERASE test4c-1
SCRIPT test4c pre uninstall number src pkgs (ARG1)=0 number tgt pkgs (ARG2)=
SCRIPT test4c post uninstall number src pkgs (ARG1)=0 number tgt pkgs (ARG2)=
Test complete

Thanks.

Regards,

Howard (KG6MEW)

Attachment: rpmtests.tarz
Description: Binary data


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []