rpm5 triggers

Elan Ruusamäe glen at pld-linux.org
Wed Nov 28 17:09:47 CET 2012


On 28.11.2012 18:01, Elan Ruusamäe wrote:
> where's the doc describing how triggers in rpm5 work? them seem to 
> misbehave, ie $1 should be 1 on package first install, but my test 
> shows that it is 0 with rpm5
>
> rpm-5.4.10-35.x86_64
>
>
$1 which should be 1 on first install, is 0 with rpm5, which is breaking 
our webapps install trigger

webapps macros defined here:
http://git.pld-linux.org/?p=packages/rpm-build-macros.git;a=blob;f=rpm.macros;h=5a9c6d2c1e507fb8460c212b79a8f2083c3f8d78;hb=0a9bb9747529d8f89a74f6db5f317abe1454d8ac#l1244

test.spec from 
http://git.pld-linux.org/?p=packages/test.git;a=shortlog;h=refs/heads/rpm5-trigger

resulting rpm:
http://carme.pld-linux.org/~glen/test-0.1-0.1.noarch.rpm

installing with rpm-0:4.5-70.amd64:

$ sudo rpm -Uhv test-0.1-0.1.noarch.rpm
warning: test-0.1-0.1.noarch.rpm: Header V4 DSA signature: NOKEY, key ID 
0e26e127
Preparing... ########################################### [100%]
    1:test ########################################### [100%]
+ echo triggerin:%{N}-%{V}-%{R}
triggerin:%{N}-%{V}-%{R}
+ [ -n  ]
+ [ 1 = 1 ]
+ [ 1 = 1 ]
+ /usr/sbin/webapp register lighttpd test
+ [ -L /etc/lighttpd/webapps.d/test.conf ]
+ [ 1 -lt 2 ]
+ skip_auto_restart
+ [ no = no ]
+ [ ! -x /bin/systemd_booted ]
+ [ -f /var/lock/subsys/lighttpd ]
+ /sbin/service lighttpd reload
+ >&2
Reloading Lighttpd Web Server service..............................[ DIED ]
...

installed with rpm-5.4.10-35.x86_64 :
# rpm -Uhv test-0.1-0.1.noarch.rpm
Preparing... ########################################### [100%]
    1:test ########################################### [100%]
+ echo triggerin:%{N}-%{V}-%{R}
triggerin:%{N}-%{V}-%{R}
+ [ -n  ]
+ [ 0 = 1 ]
+ [ -L /etc/lighttpd/webapps.d/test.conf ]
...

-- 
glen



More information about the pld-devel-en mailing list