On Fri, 30 Nov 2012, Jeffrey Johnson wrote:

> Try each of the 2 order permutations.
> 
> FWIW the behavior of triggers from already installed packages when both
> Packages are in the same transaction
> Has _NEVER_ been documented anywhere I am aware of precisely.

As I understand the docs, it should work exacty the same regardles if
it's in one transaction or not.

Quote:

Recall that the $1 passed to regular scripts contains the number of
instances of the package which will be installed when the operation has
completed. $1 for triggers is exactly the same -- it is the number of
instances of the source (or triggered) package which will remain when
the trigger has completed. Similarly, $2 is the number of instances of
the target package which will remain.

> I'll actually try the test.spec if my guess above isn't correct ;-)

Both permutations are wrong, $1 and $2 should be 1 in both cases.

[root@sith RPMS]# rpm -Uvh test-0.1-0.1.noarch.rpm 
Preparing...                ########################################### [100%]
   1:test                   ########################################### [100%]
[root@sith RPMS]# rpm -Uvh test-target-0.1-0.1.noarch.rpm 
Preparing...                ########################################### [100%]
   1:test-target            ########################################### [100%]
triggerin:test-0.1-0.1
#: 2
1: 1
2: 0

[root@sith RPMS]# rpm -Uvh test-target-0.1-0.1.noarch.rpm 
Preparing...                ########################################### [100%]
   1:test-target            ########################################### [100%]
[root@sith RPMS]# rpm -Uvh test-0.1-0.1.noarch.rpm 
Preparing...                ########################################### [100%]
   1:test                   ########################################### [100%]
triggerin:test-0.1-0.1
#: 2
1: 0
2: 1


-- 
Jan Rękorajski                                 | PLD/Linux
SysAdm                                         | http://www.pld-linux.org/
baggins<at>mimuw.edu.pl
baggins<at>pld-linux.org
_______________________________________________
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en

Reply via email to