Re: gbrowse: auto tests added
Le Sun, Apr 03, 2011 at 09:12:58AM +0200, Olivier Sallou a écrit :
>
> as requested by Charles, I added auto test step to rules file .
>
> Tests are run in non-interactive way.
Thanks a lot.
I had a little time to make more tests.
Strangely, the package is not installable twice in a row. It think that it
will makes it impossible to upgrade. The symptom is that the directory
/usr/share/gbrowse/databases dissapears after installation, which makes
postinst fail when trying to chown it:
chouca⁅build-area⁆$ LC_ALL=C sudo dpkg -i gbrowse_2.26~dfsg-1_all.deb
(Reading database ... 210031 files and directories currently installed.)
Preparing to replace gbrowse 2.26~dfsg-1 (using gbrowse_2.26~dfsg-1_all.deb) ...
Unpacking replacement gbrowse ...
Setting up gbrowse (2.26~dfsg-1) ...
chown: cannot access `/usr/share/gbrowse/databases': No such file or directory
dpkg: error processing gbrowse (--install):
subprocess installed post-installation script returned error exit status 1
Processing triggers for man-db ...
Errors were encountered while processing:
gbrowse
I have not figured out the reason. The gbrowse package contains the directory,
and therefore should create it:
chouca⁅build-area⁆$ dpkg -c gbrowse_2.26~dfsg-1_all.deb | grep /usr/share/gbrowse/databases
drwxr-xr-x root/root 0 2011-04-06 08:13 ./usr/share/gbrowse/databases/
-rw-r--r-- root/root 0 2011-04-06 08:13 ./usr/share/gbrowse/databases/users.sqlite
Although the problem could be silenced by testing for the presence of
/usr/share/gbrowse/databases/ before running chown, I think that it would be
more safer to understand the cause and solve it properly. This is one of the
reasons I am working on reducing the complexity of debian/rules and the
postinst and postrm scripts, to make them easier to analyze.
Have a nice day,
--
Charles Plessy
Debian Med packaging team,
http://www.debian.org/devel/debian-med
Tsurumi, Kanagawa, Japan
Reply to: