Installing PEAR packages in an idempotent fashion
Hi,
My package needs a Pear package, specifically Pear Log, it has php-pear
in its dependencies.
The big problem is installing the package itself in, I presume, the
postinst script. My early tests were simply:
pear -q install log
but I found that when the package was installed this process would quit
with an error second time around, stopping the script from being
idempotent. At some stage this problem seemed to evaporate (maybe with
lenny).
However, somebody installed the package (currently obtained directly
from my repo) today on an etch system and the postinst barfed on this
point - strangely one other person has done this with no problems.
On Lenny, the behaviour is
-=-
imladris:/home/colin# pear -q install log
Nothing to install
imladris:/home/colin# echo $?
0
-=-
On Etch
-=-
fs1:/usr/share/opus# pear install log
Did not download optional dependencies: pear/MDB2, use --alldeps to
download automatically
Skipping package "pear/Log", already installed as version 1.9.11
No valid packages found
install failed
fs1:/usr/share/opus# echo $?
1
fs1:/usr/share/opus# pear -q install log
No valid packages found
install failed
fs1:/usr/share/opus# echo $?
1
-=-
Has anybody any words of wisdom to offer on how to handle pear module
installations in an idempotent fashion?
Thanks,
CT.
Reply to: