Control: tags -1 + patch

Le samedi 09 mars 2013 à 14:18 +0100, Julian Taylor a écrit :
> Package: matlab-support
> Version: 0.0.18
> Severity: serious
> 
> in a clean testing chroot:
> 
> Setting up matlab-support (0.0.18) ...
> No matlab found and maybe running in non-interactive mode. No way out --
> failing...
> dpkg: error processing matlab-support (--configure):
>  subprocess installed post-installation script returned error exit status 1
> Errors were encountered while processing:
>  matlab-support
> E: Sub-process /usr/bin/dpkg returned an error code (1)

The attached patch allows the package to install nicely even if MATLAB
is not present. Otherwise people who install the package by accident end
up with a dpkg error.

Julian: please confirm that it fixes the issue for you.

-- 
 .''`.    Sébastien Villemot
: :' :    Debian Developer
`. `'     http://www.dynare.org/sebastien
  `-      GPG Key: 4096R/381A7594

diff -Nru matlab-support-0.0.18/debian/changelog matlab-support-0.0.18+deb70u1/debian/changelog
--- matlab-support-0.0.18/debian/changelog	2012-03-07 12:19:06.000000000 +0000
+++ matlab-support-0.0.18+deb70u1/debian/changelog	2013-03-09 13:51:14.000000000 +0000
@@ -1,3 +1,11 @@
+matlab-support (0.0.18+deb70u1) testing-proposed-updates; urgency=low
+
+  * Non-maintainer upload.
+  * Have config and postinst scripts exit nicely if there is no MATLAB
+    installation. (Closes: #702637)
+
+ -- Sébastien Villemot <sebast...@debian.org>  Sat, 09 Mar 2013 13:31:13 +0000
+
 matlab-support (0.0.18) unstable; urgency=low
 
   * Update debian/copyright.
diff -Nru matlab-support-0.0.18/debian/matlab-support.config matlab-support-0.0.18+deb70u1/debian/matlab-support.config
--- matlab-support-0.0.18/debian/matlab-support.config	2011-01-05 14:53:25.000000000 +0000
+++ matlab-support-0.0.18+deb70u1/debian/matlab-support.config	2013-03-09 13:30:48.000000000 +0000
@@ -59,7 +59,7 @@
             if [ -z "$matlab_install_glob" ]; then
                 # fail in non-interactive mode
                 db_input critical matlab-support/no-matlab-found || \
-                { echo "No matlab found and maybe running in non-interactive mode. No way out -- failing..."; exit 1; }
+                { echo "No matlab found and maybe running in non-interactive mode. Exiting."; exit 0; }
                 db_fset matlab-support/matlab-install-glob seen false
                 STATE=0
             else
diff -Nru matlab-support-0.0.18/debian/matlab-support.postinst matlab-support-0.0.18+deb70u1/debian/matlab-support.postinst
--- matlab-support-0.0.18/debian/matlab-support.postinst	2012-03-07 11:17:07.000000000 +0000
+++ matlab-support-0.0.18+deb70u1/debian/matlab-support.postinst	2013-03-09 13:30:40.000000000 +0000
@@ -20,7 +20,7 @@
         # if there is no default path something went wrong
         if [ -z "$matlab_default_path" ]; then
             echo "No default Matlab path found. Exiting."
-            exit 1
+            exit 0
         fi
         # look whether there is a config file and recreate the config file if
         # missing

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to